obshistory: be more flexible about createmarkers API
authorPierre-Yves David <pierre-yves.david@octobus.net>
Sun, 21 May 2017 23:58:55 +0200
changeset 2463 08c552a5eb37
parent 2461 3c9a74763c20
child 2470 5d015dfd7753
obshistory: be more flexible about createmarkers API The API got touched in core.
hgext3rd/evolve/obshistory.py
--- a/hgext3rd/evolve/obshistory.py	Sun May 21 14:27:23 2017 +0200
+++ b/hgext3rd/evolve/obshistory.py	Sun May 21 23:58:55 2017 +0200
@@ -437,7 +437,8 @@
     return True
 
 @eh.wrapfunction(obsolete, 'createmarkers')
-def createmarkerswithbits(orig, repo, relations, flag=0, date=None, metadata=None):
+def createmarkerswithbits(orig, repo, relations, flag=0, date=None,
+                          metadata=None, **kwargs):
     """compute 'effect-flag' and augment the created markers
 
     Wrap obsolete.createmarker in order to compute the effect of each
@@ -453,7 +454,7 @@
     provide precomputed effect to avoid the overhead.
     """
     if not repo.ui.configbool('experimental', 'evolution.effect-flags', False):
-        return orig(repo, relations, flag, date, metadata)
+        return orig(repo, relations, flag, date, metadata, **kwargs)
     if metadata is None:
         metadata = {}
     tr = repo.transaction('add-obsolescence-marker')
@@ -470,7 +471,7 @@
             m['ef1'] = "%d" % effect
 
             # And call obsolete.createmarkers for creating the obsmarker for real
-            orig(repo, [r], flag, date, m)
+            orig(repo, [r], flag, date, m, **kwargs)
 
         tr.close()
     finally: