Mon, 30 Apr 2012 20:45:45 +0200 amend: fix copy records handling (issue3410) stable
Patrick Mezard <patrick@mezard.eu> [Mon, 30 Apr 2012 20:45:45 +0200] rev 16553
amend: fix copy records handling (issue3410) Messing with the dirstate before the intermediate commit seems error prone. Instead, commit and recompute the copies with copies.pathcopies(), then use that with commitctx(). Since copies.pathcopies() does not support file replacement very well, the whole .renamed() condition in samefile() is removed and the "file replacement caused by differing copy source" effect is discarded. Test shamelessly stolen from Idan Kamara <idankk86@gmail.com>
Mon, 30 Apr 2012 20:36:29 +0200 test-commit-amend: exhibit an --amend weirdness stable
Patrick Mezard <patrick@mezard.eu> [Mon, 30 Apr 2012 20:36:29 +0200] rev 16552
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.
(0) -10000 -3000 -1000 -300 -100 -30 -10 -2 +2 +10 +30 +100 +300 +1000 +3000 +10000 +30000 tip