[PATCH] convert: svn-sink: test if execute bit was actually stored
Maxim Dounin
mdounin at mdounin.ru
Wed Dec 19 09:13:43 CST 2007
Hello!
On Sat, 15 Dec 2007, Maxim Dounin wrote:
> 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.
I've spent some more time investigating this - and it looks like 'hg log
-vC' also does wrong thing in this case depite the fact it has much more
code to correctly detect copies.
Testcase:
hg init a
cd a
echo a > a
hg ci -Ama
hg cp a b
hg ci -A -m 'copy a to b'
chmod +x b
hg ci -A -m 'set execute bit on b'
hg log -vC --template '{rev} {file_copies%filecopy}\n'
I can't figure out how to fix this correctly though. Not reporting copies
when filelog wasn't changed by particular changelog revision doesn't look
like a way to go - it will break test/test-log, notably issue391 test.
Any comments/suggestions?
Maxim Dounin
More information about the Mercurial-devel
mailing list