https://bz.mercurial-scm.org/show_bug.cgi?id=6882
Bug ID: 6882 Summary: "hg merge" changes file not in other branch Product: Mercurial Version: 6.7.4 Hardware: PC OS: Linux Status: UNCONFIRMED Severity: feature Priority: wish Component: Mercurial Assignee: bugzi...@mercurial-scm.org Reporter: err...@raelity.com CC: mercurial-de...@mercurial-scm.org Python Version: --- I put together a script to do some simple stuff to explore merge and "hg glog" history. But I ran into something that doesn't seem right. The script is at the end. After doing hg up 0 hg copy foo.txt legacy.txt hg ci -m 'create legacy.txt from foo.txt' There is a file legacy.txt with contents This is foo. Then do hg merge hg ci -m 'merge into legacy' And now the file legacy.txt is changed to This is foo. More foo. How can a file that does not exist in the other branch get changed by the merge? Unless, maybe, the "hg copy" is acting more like creating a hard link. -ernie #!/bin/sh set -e hg init c1 cd c1 echo 'This is foo.' > foo.txt hg add foo.txt hg ci -m 'create foo.txt' # rev 0 echo 'This is bar.' > bar.txt hg add bar.txt hg ci -m 'create bar.txt' # rev 1 echo 'More foo.' >> foo.txt hg ci -m 'more foo.txt' # rev 2 echo 'More bar.' >> bar.txt hg ci -m 'more bar.txt' # rev 3 hg up 0 hg copy foo.txt legacy.txt hg ci -m 'create legacy.txt from foo.txt' if true then hg merge hg ci -m 'merge into legacy' else hg up 3 hg merge hg ci -m 'merge from legacy' fi -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ Mercurial-devel mailing list Mercurial-devel@lists.mercurial-scm.org https://lists.mercurial-scm.org/mailman/listinfo/mercurial-devel