[PATCH] convert: svn-sink: test if execute bit was actually stored

Maxim Dounin mdounin at mdounin.ru
Fri Dec 14 17:22:34 CST 2007


Hello!

As of now, the command sequence in tests/test-convert-svn-sink leads
to conversion crash while converting revision where execute bit is set. As 
a result - execute bit isn't stored in converted repo. Attached patch 
makes it clear.

As far as I debugged this, actual problem isn't in subversion sink code - 
but instead in mercurial conversion source code. It reports extra copy 
operation when setting execute bit follows copy for the particular file - 
because execute bit is stored in manifest and file itself "thinks" it was 
copied in last revision.

It would be good if somebody with better knowledge of mercurial internals 
(BOS?) take a look at this.

Maxim Dounin
-------------- next part --------------
# HG changeset patch
# User Maxim Dounin <mdounin at mdounin.ru>
# Date 1197673387 -10800
# Node ID be0ee65e33611d89795acad46710135aee8eb07b
# Parent  165cda754d9e3bb54fed9e3d0038ad64ff24eae8
convert: svn-sink: test if execute bit was actually stored

As of now, the command sequence in tests/test-convert-svn-sink leads
to conversion crash. Make sure we aren't confused by execute bit set
in working directory.

Actual problem is mercurial repo used as a source, it reports extra copy
when only execute bit was changed.

diff -r 165cda754d9e -r be0ee65e3361 tests/test-convert-svn-sink
--- a/tests/test-convert-svn-sink	Fri Dec 14 16:47:41 2007 +0100
+++ b/tests/test-convert-svn-sink	Sat Dec 15 02:03:07 2007 +0300
@@ -56,7 +56,7 @@ hg --cwd a tip -q
 hg --cwd a tip -q
 
 hg convert -d svn a
-(cd a-hg-wc; svn up; svn st -v; svn log --xml -v --limit=1 | sed 's,<date>.*,<date/>,')
+(cd a-hg-wc; svn up; rm c; svn revert c)
 test -x a-hg-wc/c && echo executable || echo not executable
 
 echo % branchy history
diff -r 165cda754d9e -r be0ee65e3361 tests/test-convert-svn-sink.out
--- a/tests/test-convert-svn-sink.out	Fri Dec 14 16:47:41 2007 +0100
+++ b/tests/test-convert-svn-sink.out	Sat Dec 15 02:03:07 2007 +0300
@@ -166,34 +166,7 @@ c
 c
 d1
 % executable
-5:f205b3636d77
-svn: Path 'b' does not exist
-assuming destination a-hg
-initializing svn wc 'a-hg-wc'
-scanning source...
-sorting...
-converting...
-0 make a file executable
-abort: svn exited with status 1
-At revision 5.
-                5        5 test         .
- M              5        4 test         c
-                5        1 test         d1
-                5        1 test         d1/d2
-                5        1 test         d1/d2/b
-<?xml version="1.0"?>
-<log>
-<logentry
-   revision="5">
-<author>test</author>
-<date/>
-<paths>
-<path
-   action="D">/b</path>
-</paths>
-<msg>remove a file</msg>
-</logentry>
-</log>
+### known unfixed bug
 executable
 % branchy history
 adding b


More information about the Mercurial-devel mailing list