This is an archive of the discontinued Mercurial Phabricator instance.

copies: clarify mutually exclusive cases in _chain() with a s/if/elif/
ClosedPublic

Authored by martinvonz on Apr 18 2019, 12:55 PM.

Details

Summary

If the 'b' dict has a rename from 'x' to 'y', it shouldn't be possible
for 'x' to be both (a key) in 'a' and in 'src'. That would mean that
'x' is a file in the source commit and also a rename destination in
the intermediate commit. But we currently don't allow renaming files
onto existing files, so that shouldn't happen. So let's clarify that
by using an "elif" instead of an "if". And if we did allow renaming
files onto existing files, we should prefer to use the rename
destination in the intermediate commit as source anyway.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.