1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-11-19 15:34:51 +01:00
git/perl/Git/SVN
Jonathan Nieder b8c78e2a9d git svn: work around SVN 1.7 mishandling of svn:special changes
Subversion represents symlinks as ordinary files with content starting
with "link " and the svn:special property set to "*".  Thus a file can
switch between being a symlink and a non-symlink simply by toggling
its svn:special property, and new checkouts will automatically write a
file of the appropriate type.  Likewise, in subversion 1.6 and older,
running "svn update" would notice changes in filetype and update the
working copy appropriately.

Starting in subversion 1.7 (issue 4091), changes to the svn:special
property trip an assertion instead:

	$ svn up svn-tree
	Updating 'svn-tree':
	svn: E235000: In file 'subversion/libsvn_wc/update_editor.c' \
	line 1583: assertion failed (action == svn_wc_conflict_action_edit \
	|| action == svn_wc_conflict_action_delete || action == \
	svn_wc_conflict_action_replace)

Revisions prepared with ordinary svn commands ("svn add" and not "svn
propset") don't trip this because they represent these filetype
changes using a replace operation, which is approximately equivalent
to removal followed by adding a new file and works fine.  Follow suit.

Noticed using t9100.  After this change, git-svn's file-to-symlink
changes are sent in a format that modern "svn update" can handle and
tests t9100.11-13 pass again.

[ew: s,git-svn\.perl,perl/Git/SVN/Editor.pm,g]

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Eric Wong <normalperson@yhbt.net>
2012-10-10 20:02:33 +00:00
..
Memoize git-svn: use YAML format for mergeinfo cache when possible 2012-06-10 08:47:53 +00:00
Editor.pm git svn: work around SVN 1.7 mishandling of svn:special changes 2012-10-10 20:02:33 +00:00
Fetcher.pm use Git::SVN->path accessor globally 2012-08-02 21:42:58 +00:00
GlobSpec.pm Make git-svn branch patterns match complete URL 2012-10-05 22:48:12 +00:00
Log.pm Extract Git::SVN::Log from git-svn. 2012-07-27 22:36:06 +00:00
Migration.pm use Git::SVN{,::RA}->url accessor globally 2012-08-02 21:42:59 +00:00
Prompt.pm
Ra.pm git-svn: use path accessor for Git::SVN objects 2012-10-05 22:48:12 +00:00
Utils.pm git-svn: keep leading slash when canonicalizing paths (fallback case) 2012-10-05 22:52:52 +00:00