995 for rel in relations: |
995 for rel in relations: |
996 predecessors = rel[0] |
996 predecessors = rel[0] |
997 if not isinstance(predecessors, tuple): |
997 if not isinstance(predecessors, tuple): |
998 # preserve compat with old API until all caller are migrated |
998 # preserve compat with old API until all caller are migrated |
999 predecessors = (predecessors,) |
999 predecessors = (predecessors,) |
1000 if 1 < len(predecessors) and len(rel[1]) != 1: |
1000 if len(predecessors) > 1 and len(rel[1]) != 1: |
1001 msg = 'Fold markers can only have 1 successors, not %d' |
1001 msg = 'Fold markers can only have 1 successors, not %d' |
1002 raise error.ProgrammingError(msg % len(rel[1])) |
1002 raise error.ProgrammingError(msg % len(rel[1])) |
1003 for prec in predecessors: |
1003 for prec in predecessors: |
1004 sucs = rel[1] |
1004 sucs = rel[1] |
1005 localmetadata = metadata.copy() |
1005 localmetadata = metadata.copy() |
1006 if 2 < len(rel): |
1006 if len(rel) > 2: |
1007 localmetadata.update(rel[2]) |
1007 localmetadata.update(rel[2]) |
1008 |
1008 |
1009 if not prec.mutable(): |
1009 if not prec.mutable(): |
1010 raise error.Abort(_("cannot obsolete public changeset: %s") |
1010 raise error.Abort(_("cannot obsolete public changeset: %s") |
1011 % prec, |
1011 % prec, |