##// END OF EJS Templates
largefiles: rewrite merge code using dictionary with entry per file...
largefiles: rewrite merge code using dictionary with entry per file In overridecalculateupdates(), we currently only deal with conflicts that result in a 'g' action for either the largefile or a standin. We will soon want to deal cases with 'cd' and 'dc' actions here. It will be easier to reason about such cases if we rewrite it using a dict from filename to action. A side-effect of this change is that the output can only have one action per file (which should be a good change). Before this change, when one of the tests in test-issue3084 received this input (the 'a' in the input was a result of 'cd' conflict resolved in favor of the modified file): 'g': [('.hglf/f', ('',), 'remote created')], 'a': [('f', None, 'prompt keep')], and the user chose to keep the local largefile, it produced this output: 'g': [('.hglf/f', ('',), 'remote created')], 'r': [('f', None, 'replaced by standin')], 'a': [('f', None, 'prompt keep')], Although 'a' actions are processed after 'r' actions by recordupdates(), it still worked because 'a' actions have no effect on merges (only on updates). After this change, the output is: 'g': [('.hglf/f', ('',), 'remote created')], 'r': [('f', None, 'replaced by standin')], Similarly, there are several tests in test-largefiles-update that get inputs like: 'a': [('.hglf/large2', None, 'prompt keep')], 'g': [('large2', ('',), 'remote created')], and when the user chooses to keep the local largefile, they produce this output: 'a': [('.hglf/large2', None, 'prompt keep'), ('.hglf/large2', None, 'keep standin')], 'lfmr': [('large2', None, 'forget non-standin largefile')], In this case, it was not a merge but an update, so the 'a' action does have an effect. However, since dirstate.add() is idempotent, it still has no obserable effect. After this change, the output is: 'a': [('.hglf/large2', None, 'keep standin')], 'lfmr': [('large2', None, 'forget non-standin largefile')],
Martin von Zweigbergk -
r23529:38e55e55 default
Show More
Name Size Modified Last Commit Author
/ hgext
convert
highlight
largefiles
zeroconf
__init__.py Loading ...
acl.py Loading ...
blackbox.py Loading ...
bugzilla.py Loading ...
children.py Loading ...
churn.py Loading ...
color.py Loading ...
eol.py Loading ...
extdiff.py Loading ...
factotum.py Loading ...
fetch.py Loading ...
gpg.py Loading ...
graphlog.py Loading ...
hgcia.py Loading ...
hgk.py Loading ...
histedit.py Loading ...
keyword.py Loading ...
mq.py Loading ...
notify.py Loading ...
pager.py Loading ...
patchbomb.py Loading ...
progress.py Loading ...
purge.py Loading ...
rebase.py Loading ...
record.py Loading ...
relink.py Loading ...
schemes.py Loading ...
share.py Loading ...
shelve.py Loading ...
strip.py Loading ...
transplant.py Loading ...
win32mbcs.py Loading ...
win32text.py Loading ...