Comments
Patch
@@ -997,6 +997,11 @@
if useoperation and operation:
metadata['operation'] = operation
+ # Effect flag metadata handling
+ saveeffectflag = repo.ui.configbool('experimental',
+ 'evolution.effect-flags',
+ False)
+
tr = repo.transaction('add-obsolescence-marker')
try:
markerargs = []
@@ -1020,6 +1025,12 @@
raise error.Abort(_("changeset %s cannot obsolete itself")
% prec)
+ # Effect flag can be different by relation
+ if saveeffectflag:
+ # The effect flag is saved in a versioned field name for future
+ # evolution
+ localmetadata["ef1"] = "%d" % obsutil.geteffectflag(rel)
+
# Creating the marker causes the hidden cache to become invalid,
# which causes recomputation when we ask for prec.parents() above.
# Resulting in n^2 behavior. So let's prepare all of the args
@@ -535,3 +535,13 @@
final.reverse() # put small successors set first
cache[current] = final
return cache[initialnode]
+
+def geteffectflag(relation):
+ """ From an obs-marker relation, compute what changed between the
+ predecessor and the successor.
+ """
+ effects = 0
+
+ source = relation[0]
+
+ return effects