##// 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 operation=None):
959 operation=None):
960 """Add obsolete markers between changesets in a repo
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 tuple. `old` and `news` are changectx. metadata is an optional dictionary
963 tuple. `old` and `news` are changectx. metadata is an optional dictionary
964 containing metadata for this marker only. It is merged with the global
964 containing metadata for this marker only. It is merged with the global
965 metadata specified through the `metadata` argument of this function.
965 metadata specified through the `metadata` argument of this function.
@@ -993,8 +993,14 b' def createmarkers(repo, relations, flag='
993 with repo.transaction('add-obsolescence-marker') as tr:
993 with repo.transaction('add-obsolescence-marker') as tr:
994 markerargs = []
994 markerargs = []
995 for rel in relations:
995 for rel in relations:
996 prec = rel[0]
996 predecessors = rel[0]
997 if True:
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 sucs = rel[1]
1004 sucs = rel[1]
999 localmetadata = metadata.copy()
1005 localmetadata = metadata.copy()
1000 if 2 < len(rel):
1006 if 2 < len(rel):
General Comments 0
You need to be logged in to leave comments. Login now