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.
--- 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()