[issue2764] Deleting a file and then copying another onto it yields surprising results
Dan Villiom Podlaski Christiansen
bugs at mercurial.selenic.com
Thu Apr 14 10:30:39 UTC 2011
New submission from Dan Villiom Podlaski Christiansen <danchr at gmail.com>:
Removing a file and then copying another onto it results in the file being
marked as an addition with a copy source. Committing it, however, results in
a mere modification to the file.
See the following little test:
$ hg init x
$ cd x
$ echo ABC > X
$ echo DEF > Y
$ hg add X Y
$ hg ci -m 'initial commit'
$ hg rm Y
$ hg cp X Y
$ hg status --copies
A Y
X
$ hg diff --git
diff --git a/X b/Y
copy from X
copy to Y
$ hg ci -m 'Replace Y with X'
$ hg status --copies --rev 'p1(p1())' --rev 'p1()'
M Y
$ hg diff --git --change .
diff --git a/Y b/Y
--- a/Y
+++ b/Y
@@ -1,1 +1,1 @@
-DEF
+ABC
----------
messages: 16057
nosy: danchr
priority: bug
status: unread
title: Deleting a file and then copying another onto it yields surprising results
____________________________________________________
Mercurial issue tracker <bugs at mercurial.selenic.com>
<http://mercurial.selenic.com/bts/issue2764>
____________________________________________________
More information about the Mercurial-devel
mailing list