diff mercurial/obsutil.py @ 35049:b81ad5b78a81

obsfate: makes successorsetverb takes the markers as argument Right now, successorsetverb only needs successors to compute the verb. But we will want use additional information (effect-flags and operation) in the near future to compute a better verb. Add the markers parameter now so extensions (like Evolve) could wrap the function and start experimenting around better obsfate verbs. As successorsetverb now takes both successorset and markers parameters, rename it to obsfateverb, successorsetandmarkersverb was too long. Differential Revision: https://phab.mercurial-scm.org/D1191
author Boris Feld <boris.feld@octobus.net>
date Thu, 19 Oct 2017 12:35:47 +0200
parents aa849cf5d089
children 137a08d82232
line wrap: on
line diff
--- a/mercurial/obsutil.py	Tue Nov 07 13:48:33 2017 -0800
+++ b/mercurial/obsutil.py	Thu Oct 19 12:35:47 2017 +0200
@@ -751,8 +751,9 @@
 
     return values
 
-def successorsetverb(successorset):
-    """ Return the verb summarizing the successorset
+def obsfateverb(successorset, markers):
+    """ Return the verb summarizing the successorset and potentially using
+    information from the markers
     """
     if not successorset:
         verb = 'pruned'
@@ -795,7 +796,7 @@
     line = []
 
     # Verb
-    line.append(successorsetverb(successors))
+    line.append(obsfateverb(successors, markers))
 
     # Operations
     operations = markersoperations(markers)