##// END OF EJS Templates
obsolete: allow multiple predecessors in createmarkers...
Boris Feld -
r39958:6335c0de default
parent child Browse files
Show More
@@ -959,7 +959,7 b' def createmarkers(repo, relations, flag='
959 959 operation=None):
960 960 """Add obsolete markers between changesets in a repo
961 961
962 <relations> must be an iterable of (<old>, (<new>, ...)[,{metadata}])
962 <relations> must be an iterable of ((<old>,...), (<new>, ...)[,{metadata}])
963 963 tuple. `old` and `news` are changectx. metadata is an optional dictionary
964 964 containing metadata for this marker only. It is merged with the global
965 965 metadata specified through the `metadata` argument of this function.
@@ -993,8 +993,14 b' def createmarkers(repo, relations, flag='
993 993 with repo.transaction('add-obsolescence-marker') as tr:
994 994 markerargs = []
995 995 for rel in relations:
996 prec = rel[0]
997 if True:
996 predecessors = rel[0]
997 if not isinstance(predecessors, tuple):
998 # preserve compat with old API until all caller are migrated
999 predecessors = (predecessors,)
1000 if 1 < len(predecessors) and len(rel[1]) != 1:
1001 msg = 'Fold markers can only have 1 successors, not %d'
1002 raise error.ProgrammingError(msg % len(rel[1]))
1003 for prec in predecessors:
998 1004 sucs = rel[1]
999 1005 localmetadata = metadata.copy()
1000 1006 if 2 < len(rel):
General Comments 0
You need to be logged in to leave comments. Login now