# HG changeset patch # User Patrick Mezard # Date 2009-04-24 08:34:11 # Node ID adce97d28389a82ea455f32bc036e0b67fe0d406 # Parent 13b36eb143249b1430e80e0fcfff0f1d46a77106 convert/bzr: fix symlink handling (issue1626) diff --git a/hgext/convert/bzr.py b/hgext/convert/bzr.py --- a/hgext/convert/bzr.py +++ b/hgext/convert/bzr.py @@ -192,7 +192,7 @@ class bzr_source(converter_source): # 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 --git a/tests/test-convert-bzr b/tests/test-convert-bzr --- a/tests/test-convert-bzr +++ b/tests/test-convert-bzr @@ -72,7 +72,10 @@ cd source 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 --git a/tests/test-convert-bzr.out b/tests/test-convert-bzr.out --- a/tests/test-convert-bzr.out +++ b/tests/test-convert-bzr.out @@ -50,9 +50,13 @@ converting... 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