# HG changeset patch # User Patrick Mezard # Date 1240562051 -7200 # Node ID adce97d28389a82ea455f32bc036e0b67fe0d406 # Parent 13b36eb143249b1430e80e0fcfff0f1d46a77106 convert/bzr: fix symlink handling (issue1626) diff -r 13b36eb14324 -r adce97d28389 hgext/convert/bzr.py --- a/hgext/convert/bzr.py Thu Apr 23 15:07:05 2009 +0200 +++ b/hgext/convert/bzr.py Fri Apr 24 10:34:11 2009 +0200 @@ -192,7 +192,7 @@ # populate the mode cache kind, executable = [e[1] for e in (kind, executable)] - mode = ((executable and 'x') or (kind == 'symlink' and 's') + mode = ((executable and 'x') or (kind == 'symlink' and 'l') or '') self._modecache[(topath, revid)] = mode changes.append((topath, revid)) diff -r 13b36eb14324 -r adce97d28389 tests/test-convert-bzr --- a/tests/test-convert-bzr Thu Apr 23 15:07:05 2009 +0200 +++ b/tests/test-convert-bzr Fri Apr 24 10:34:11 2009 +0200 @@ -72,7 +72,10 @@ touch program chmod +x program ln -s program altname -bzr add -q altname program +mkdir d +echo a > d/a +ln -s a syma +bzr add -q altname program syma d/a bzr commit -q -m 'Initial setup' touch newprog chmod +x newprog diff -r 13b36eb14324 -r adce97d28389 tests/test-convert-bzr.out --- a/tests/test-convert-bzr.out Thu Apr 23 15:07:05 2009 +0200 +++ b/tests/test-convert-bzr.out Fri Apr 24 10:34:11 2009 +0200 @@ -50,9 +50,13 @@ 1 Initial setup 0 Symlink changed, x bits changed % manifest of 0 -644 altname +644 @ altname +644 d/a 755 * program +644 @ syma % manifest of tip -644 altname +644 @ altname +644 d/a 755 * newprog 644 program +644 @ syma