changeset 45297:ab57793dec5b

largefiles: override merge.emptyactions() to include `lfmr` I found it weird that we were not already doing this. I encountered this while using `emptyactions()` in mergeresult() class. Differential Revision: https://phab.mercurial-scm.org/D8835
author Pulkit Goyal <7895pulkit@gmail.com>
date Sat, 25 Jul 2020 14:41:20 +0530
parents cb0cd87e16b4
children a3cd63d6005b
files hgext/largefiles/overrides.py
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/largefiles/overrides.py	Sat Jul 25 01:17:35 2020 +0530
+++ b/hgext/largefiles/overrides.py	Sat Jul 25 14:41:20 2020 +0530
@@ -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.