##// END OF EJS Templates
copies: make mergecopies() distinguish between copies on each side...
copies: make mergecopies() distinguish between copies on each side I find it confusing that most of the dicts returned from `mergecopies()` have entries specific to one branch of the merge, but they're still combined into dict. For example, you can't tell if `copy = {"bar": "foo"}` means that "foo" was copied to "bar" on the first branch or the second. It also feels like there are bugs lurking here because we may mistake which side the copy happened on. However, for most of the dicts, it's not possible that there is disagreement. For example, `renamedelete` keeps track of renames that happened on one side of the merge where the other side deleted the file. There can't be a disagreement there (because we record that in the `diverge` dict instead). For regular copies/renames, there can be a disagreement. Let's say file "foo" was copied to "bar" on one branch and file "baz" was copied to "bar" on the other. Beacause we only return one `copy` dict, we end up replacing the `{"bar": "foo"}` entry by `{"bar": "baz"}`. The merge code (`manifestmerge()`) will then decide that that means "both renamed from 'baz'". We should probably treat it as a conflict instead. The next few patches will make `mergecopies()` return two instances of most of the returned copies. That will lead to a bit more code (~40 lines), but I think it makes both `copies.mergecopies()` and `merge.manifestmerge()` clearer. Differential Revision: https://phab.mercurial-scm.org/D7986
Martin von Zweigbergk -
r44657:6ca9f45b default
Show More
Name Size Modified Last Commit Author
/ hgext / convert
__init__.py Loading ...
bzr.py Loading ...
common.py Loading ...
convcmd.py Loading ...
cvs.py Loading ...
cvsps.py Loading ...
darcs.py Loading ...
filemap.py Loading ...
git.py Loading ...
gnuarch.py Loading ...
hg.py Loading ...
monotone.py Loading ...
p4.py Loading ...
subversion.py Loading ...
transport.py Loading ...