git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] git-svn: fix symlink-to-file changes when using command-line svn 1.4.0

From
EWEric Wong <normalperson@yhbt.net>
Date
Oct 24, 2006, 09:50 UTC
Message-ID
<20061024095037.GA15936@soma>
In-Reply-To
<20061018085948.GA27357@cepheus.pub>

I incorrectly thought this was hopelessly broken in svn 1.4.0, but now it's just broken in that the old method didn't work. It looks like svn propdel and svn propset must be used now and the (imho) more obvious svn rm --force && svn add no longer works.

make -C t full-svn-test should now work
Signed-off-by: Eric Wong <normalperson@yhbt.net>
---
 git-svn.perl |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/git-svn.perl b/git-svn.perl
index 54d2356..37ecc51 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -1501,10 +1501,13 @@ sub svn_checkout_tree {
 			apply_mod_line_blob($m);
 			svn_check_prop_executable($m);
 		} elsif ($m->{chg} eq 'T') {
-			sys(qw(svn rm --force),$m->{file_b});
-			apply_mod_line_blob($m);
-			sys(qw(svn add), $m->{file_b});
 			svn_check_prop_executable($m);
+			apply_mod_line_blob($m);
+			if ($m->{mode_a} =~ /^120/ && $m->{mode_b} !~ /^120/) {
+				sys(qw(svn propdel svn:special), $m->{file_b});
+			} else {
+				sys(qw(svn propset svn:special *),$m->{file_b});
+			}
 		} elsif ($m->{chg} eq 'A') {
 			svn_ensure_parent_path( $m->{file_b} );
 			apply_mod_line_blob($m);
-- 
1.4.3.2.g125940
Previous: Uwe ZeisbergerNext: Uwe Zeisberger
Message 2 of 3 in “t9100-git-svn-basic.sh fails”
  1. Uwe ZeisbergerOct 18, 2006
  2. git-svn: fix symlink-to-file changes when using command-line svn 1.4.0Eric Wong, Oct 24, 2006
  3. Uwe ZeisbergerOct 24, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.