Patchwork D8835: largefiles: override merge.emptyactions() to include `lfmr`

login
register
mail settings
Submitter phabricator
Date July 25, 2020, 10:03 a.m.
Message ID <differential-rev-PHID-DREV-a5frmhoab6jbgcfn7j72-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/46906/
State Superseded
Headers show

Comments

phabricator - July 25, 2020, 10:03 a.m.
pulkit created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  I found it weird that we were not already doing this. I encountered this while
  using `emptyactions()` in mergeresult() class.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D8835

AFFECTED FILES
  hgext/largefiles/overrides.py

CHANGE DETAILS




To: pulkit, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/hgext/largefiles/overrides.py b/hgext/largefiles/overrides.py
--- a/hgext/largefiles/overrides.py
+++ b/hgext/largefiles/overrides.py
@@ -495,6 +495,14 @@ 
         orig(ui, repo, *pats, **opts)
 
 
+# Register the `lfmr` merge action in emptyactions() return type
+@eh.wrapfunction(merge, b'emptyactions')
+def overrideemptyactions(origfn):
+    ret = origfn()
+    ret[b'lfmr'] = []
+    return ret
+
+
 # Before starting the manifest merge, merge.updates will call
 # _checkunknownfile to check if there are any files in the merged-in
 # changeset that collide with unknown files in the working copy.