# HG changeset patch # User Patrick Mezard # Date 1191148571 -7200 # Node ID 9c0f864fddcab05385150c9cef74a82c37112c0d # Parent cc34be74eeecd33ddf1d6a578a8930e8163d20e1# Parent 9f35d0bcf00e01acee96f563ccb7a314e1efe41f Merge with crew-stable diff --git a/hgext/convert/hg.py b/hgext/convert/hg.py --- a/hgext/convert/hg.py +++ b/hgext/convert/hg.py @@ -61,7 +61,7 @@ class mercurial_sink(converter_sink): try: util.unlink(self.repo.wjoin(f)) #self.repo.remove([f]) - except: + except OSError: pass def setbranch(self, branch, pbranch, parents): diff --git a/tests/test-convert-git b/tests/test-convert-git --- a/tests/test-convert-git +++ b/tests/test-convert-git @@ -25,16 +25,26 @@ mkdir git-repo cd git-repo git init-db >/dev/null 2>/dev/null echo a > a -git add a -commit -m t1 +mkdir d +echo b > d/b +git add a d +commit -a -m t1 + +# Remove the directory, then try to replace it with a file +# (issue 754) +git rm -r d +commit -m t2 +echo d > d +git add d +commit -m t3 echo b >> a -commit -a -m t2.1 +commit -a -m t4.1 git checkout -b other HEAD^ >/dev/null 2>/dev/null echo c > a echo a >> a -commit -a -m t2.2 +commit -a -m t4.2 git checkout master >/dev/null 2>/dev/null git pull --no-commit . other > /dev/null 2>/dev/null diff --git a/tests/test-convert-git.out b/tests/test-convert-git.out --- a/tests/test-convert-git.out +++ b/tests/test-convert-git.out @@ -1,18 +1,21 @@ +rm 'd/b' assuming destination git-repo-hg initializing destination git-repo-hg repository scanning source... sorting... converting... -3 t1 -2 t2.1 -1 t2.2 +5 t1 +4 t2 +3 t3 +2 t4.1 +1 t4.2 0 Merge branch other -changeset: 3:69b3a302b4a1 +changeset: 5:c6d72c98aa00 tag: tip -parent: 1:0de2a40e261b -parent: 2:8815d3b33506 +parent: 3:a18bdfccf429 +parent: 4:48cb5b72ce56 user: test -date: Mon Jan 01 00:00:13 2007 +0000 +date: Mon Jan 01 00:00:15 2007 +0000 files: a description: Merge branch other