# HG changeset patch # User Patrick Mezard # Date 2008-06-15 11:01:03 # Node ID deda205a00e1019755131639a4470a37c2c8a4ad # Parent d286ec1bdcff3b2b63d327371900770363088b26 Ignore dummy copies in dirstate and localrepo.filecommit() diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py --- a/mercurial/dirstate.py +++ b/mercurial/dirstate.py @@ -167,6 +167,8 @@ class dirstate(object): self._dirty = False def copy(self, source, dest): + if source == dest: + return self._dirty = True self._copymap[dest] = source diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -688,7 +688,7 @@ class localrepository(repo.repository): meta = {} cp = self.dirstate.copied(fn) - if cp: + if cp and cp != fn: # Mark the new revision of this file as a copy of another # file. This copy data will effectively act as a parent # of this new revision. If this is a merge, the first diff --git a/tests/test-convert-svn-branches.out b/tests/test-convert-svn-branches.out --- a/tests/test-convert-svn-branches.out +++ b/tests/test-convert-svn-branches.out @@ -117,7 +117,7 @@ o branch=old3 11 branch trunk@1 into ol | | | | o | branch= 3 change a files: a | | | -| | o branch=old 2 branch trunk, remove c files: a b +| | o branch=old 2 branch trunk, remove c files: | |/ | o branch= 1 hello files: a b c |/