Mercurial > hg
changeset 8148:adce97d28389
convert/bzr: fix symlink handling (issue1626)
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Fri, 24 Apr 2009 10:34:11 +0200 |
parents | 13b36eb14324 |
children | ddbee2d0d634 78658990c725 |
files | hgext/convert/bzr.py tests/test-convert-bzr tests/test-convert-bzr.out |
diffstat | 3 files changed, 11 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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))
--- 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
--- 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