# HG changeset patch # User Matt Mackall # Date 1240782587 18000 # Node ID c8c231da59c36b8a19f86c090e2f9f450d7b7029 # Parent 1467705473d5fa1fbe02b5efca603ac8750246ef# Parent 78658990c7254a08c1339d1e50bed48b6b666de2 Merge with crew-stable diff -r 1467705473d5 -r c8c231da59c3 hgext/convert/bzr.py --- a/hgext/convert/bzr.py Thu Apr 23 15:25:27 2009 -0500 +++ b/hgext/convert/bzr.py Sun Apr 26 16:49:47 2009 -0500 @@ -123,9 +123,8 @@ def getchangedfiles(self, rev, i): self._modecache = {} curtree = self.sourcerepo.revision_tree(rev) - parentids = self._parentids.pop(rev) if i is not None: - parentid = parentids[i] + parentid = self._parentids[rev][i] else: # no parent id, get the empty revision parentid = revision.NULL_REVISION @@ -192,7 +191,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 1467705473d5 -r c8c231da59c3 tests/test-convert-bzr --- a/tests/test-convert-bzr Thu Apr 23 15:25:27 2009 -0500 +++ b/tests/test-convert-bzr Sun Apr 26 16:49:47 2009 -0500 @@ -27,6 +27,12 @@ echo "% test --rev option" hg convert -r 1 source source-1-hg glog -R source-1-hg +echo "% test with filemap" +cat > filemap < 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 1467705473d5 -r c8c231da59c3 tests/test-convert-bzr.out --- a/tests/test-convert-bzr.out Thu Apr 23 15:25:27 2009 -0500 +++ b/tests/test-convert-bzr.out Sun Apr 26 16:49:47 2009 -0500 @@ -25,6 +25,16 @@ 0 Initial add: a, c, e o 0 "Initial add: a, c, e" files: a c e +% test with filemap +initializing destination source-filemap-hg repository +scanning source... +sorting... +converting... +1 Initial add: a, c, e +0 rename a into b, create a, rename c into d +b +d +f % merge initializing destination source-hg repository scanning source... @@ -50,9 +60,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