Skip to content
Snippets Groups Projects
Commit 90ca344a authored by Patrick Mézard's avatar Patrick Mézard
Browse files

test-commit-amend: exhibit an --amend weirdness

The weirdness is --amend let you replace one file with another with same data
and flags if the new file copy record differ from the one in the parent
revision. In theory, there is no problem with this kind of thing, subversion
supports it, but here we see log and status disagree. The reason is log reads
the copy record from the filelog, while status calls copies.pathcopies() which
eventually invokes some expensiveness argument to discard this case (copies.py,
_forwardcopies(), line 132). Since the next patch will side with pathcopies(),
I prefer to call this behaviour a bug.
parent ebf6d38c
No related branches found
No related tags found
No related merge requests found
......@@ -287,6 +287,18 @@
A f
d
$ mv f f.orig
$ hg rm -A f
$ hg ci -m removef
$ hg cp a f
$ mv f.orig f
$ hg ci --amend -m replacef
saved backup bundle to $TESTTMP/.hg/strip-backup/0ce2c92dc50d-amend-backup.hg
$ hg st --change . --copies
M f
$ hg log -r . --template "{file_copies}\n"
f (a)
Can't rollback an amend:
$ hg rollback
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment