# HG changeset patch # User Mads Kiilerich # Date 2013-11-16 20:46:29 # Node ID 8f412d03417375896e5b76372a706883bbd38d9a # Parent 675f578856dd14383c7185f1c326c7e52f69cf5b largefiles: show hashes before prompting for conflict resolution The largefile hashes are mostly an implementation detail, but they are "leaked" in several places anyway, and showing the hashes is better than not giving the user any information about the options in the prompt. The hashes are long, but it is largefile hashes and it would thus be confusing to shorten them. diff --git a/hgext/largefiles/overrides.py b/hgext/largefiles/overrides.py --- a/hgext/largefiles/overrides.py +++ b/hgext/largefiles/overrides.py @@ -426,10 +426,13 @@ def overridefilemerge(origfn, repo, myno if not fcother.cmp(fcdest): # files identical? return None - if repo.ui.promptchoice(_('largefile %s has a merge conflict\n' - 'keep (l)ocal or take (o)ther?' - '$$ &Local $$ &Other') % - lfutil.splitstandin(orig), 0) == 0: + if repo.ui.promptchoice( + _('largefile %s has a merge conflict\nancestor was %s\n' + 'keep (l)ocal %s or\ntake (o)ther %s?' + '$$ &Local $$ &Other') % + (lfutil.splitstandin(orig), + fca.data().strip(), fcd.data().strip(), fco.data().strip()), + 0) == 0: return 0 else: repo.wwrite(fcdest.path(), fcother.data(), fcother.flags()) diff --git a/tests/test-largefiles.t b/tests/test-largefiles.t --- a/tests/test-largefiles.t +++ b/tests/test-largefiles.t @@ -1375,7 +1375,9 @@ correctly. 2 largefiles cached $ hg merge largefile sub/large4 has a merge conflict - keep (l)ocal or take (o)ther? l + ancestor was 971fb41e78fea4f8e0ba5244784239371cb00591 + keep (l)ocal d846f26643bfa8ec210be40cc93cc6b7ff1128ea or + take (o)ther e166e74c7303192238d60af5a9c4ce9bef0b7928? l 3 files updated, 1 files merged, 0 files removed, 0 files unresolved (branch merge, don't forget to commit) getting changed largefiles