Mercurial > hg
comparison hgext/largefiles/overrides.py @ 48431:6b1049d71c3e
filemerge: make `_filemerge()` do both premerge and merge
This patch removes the `premerge` argument from `_filemerge()` and
makes it do both the "premerge" and "merge" steps without the caller
having to call it twice.
Differential Revision: https://phab.mercurial-scm.org/D11859
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Fri, 03 Dec 2021 21:41:43 -0800 |
parents | 322525db4c98 |
children | f45a4a47f6a8 |
comparison
equal
deleted
inserted
replaced
48430:921853391276 | 48431:6b1049d71c3e |
---|---|
666 | 666 |
667 # Override filemerge to prompt the user about how they wish to merge | 667 # Override filemerge to prompt the user about how they wish to merge |
668 # largefiles. This will handle identical edits without prompting the user. | 668 # largefiles. This will handle identical edits without prompting the user. |
669 @eh.wrapfunction(filemerge, b'_filemerge') | 669 @eh.wrapfunction(filemerge, b'_filemerge') |
670 def overridefilemerge( | 670 def overridefilemerge( |
671 origfn, premerge, repo, wctx, mynode, orig, fcd, fco, fca, labels=None | 671 origfn, repo, wctx, mynode, orig, fcd, fco, fca, labels=None |
672 ): | 672 ): |
673 if not lfutil.isstandin(orig) or fcd.isabsent() or fco.isabsent(): | 673 if not lfutil.isstandin(orig) or fcd.isabsent() or fco.isabsent(): |
674 return origfn( | 674 return origfn(repo, wctx, mynode, orig, fcd, fco, fca, labels=labels) |
675 premerge, repo, wctx, mynode, orig, fcd, fco, fca, labels=labels | |
676 ) | |
677 | 675 |
678 ahash = lfutil.readasstandin(fca).lower() | 676 ahash = lfutil.readasstandin(fca).lower() |
679 dhash = lfutil.readasstandin(fcd).lower() | 677 dhash = lfutil.readasstandin(fcd).lower() |
680 ohash = lfutil.readasstandin(fco).lower() | 678 ohash = lfutil.readasstandin(fco).lower() |
681 if ( | 679 if ( |