No subject


Sat Oct 9 14:44:13 UTC 2010


I know it can matter in case you actually have a remote guy who does this:

rev:0 nspr/nsinstall/nsinstall.c

rev:A (parent:0) copy nspr/nsinstall/nsinstall.c to ldap/nsinstall/nsinstall.c

rev:B (parent:0) bugfix nspr/nsinstall/nsinstall.c

hg init xx; cd xx; touch a; hg commit -Am init; echo a > a; hg commit
-m BugFix; hg up -r 0; hg ren a b; hg commit -m RenameAsB; hg up -r 0;
hg ren a c; hg commit -m RenameAsC; hg up -r 0; hg copy a d; hg commit
-m CopyAsD; hg glog

timeless-mbp:xx timeless$ hg up -C -r 4; hg merge 1
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
merging d and a to d
1 files updated, 1 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)

In this case I got a warning.

I think the right time for the warning is when I try to merge rev
BugFixA and rev CopyAsD, not when I merge RenameAsC with RenameAsB.

from my perspective, the same general logic should apply to renames:

timeless-mbp:xx timeless$ hg up -C -r 3; hg merge 2
1 files updated, 0 files merged, 2 files removed, 0 files unresolved
warning: detected divergent renames of a to:
 c
 b
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)

I shouldn't get a warning here.

timeless-mbp:xx timeless$ (hg up -C -r 3; hg merge 2) 2> /dev/null >
/dev/null ; hg commit -m MergeBC; hg merge 1
created new head
merging b and a to b
merging c and a to c
0 files updated, 2 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)

I should get a warning here, and in fact, I do.

If someone has already integrated the Rename, then the someone
*should* be aware of its contents. Otherwise, they can work on a
revision from before the rename and get mercurial's help (which is
already available).


More information about the Mercurial-devel mailing list