merge: notice uncommited copies (issue1000)
authorAlexis S. L. Carvalho <alexis@cecm.usp.br>
Fri, 14 Mar 2008 11:01:31 -0500
changeset 6268 7e4f66fe964b
parent 6267 d036ea711140
child 6269 ffdf70e74623
merge: notice uncommited copies (issue1000) As mentioned in msg5349 in issue988, "hg update" doesn't take into account uncommitted copies. To reproduce: ---------------- hg init repo cd repo touch foo hg ci -Am 'add foo' echo >> foo hg ci -m 'change foo' hg up -C 0 hg mv foo bar HGMERGE=false thg --debug -y update -------------------------- A similar problem happens with hg merge --force. I'm attaching a possible patch.
mercurial/merge.py
--- a/mercurial/merge.py	Sun Mar 02 08:51:02 2008 -0800
+++ b/mercurial/merge.py	Fri Mar 14 11:01:31 2008 -0500
@@ -106,7 +106,7 @@
             seen[s] = 1
             if fc.path() != orig and fc.path() not in old:
                 old[fc.path()] = 1
-            if fc.rev() < limit:
+            if fc.rev() < limit and fc.rev() is not None:
                 continue
             visit += fc.parents()