##// END OF EJS Templates
obsolete: add allowunstable option...
Durham Goode -
r22952:8792ac09 default
parent child Browse files
Show More
@@ -738,7 +738,7 b' def between(repo, old, new, keep):'
738 738 When keep is false, the specified set can't have children."""
739 739 ctxs = list(repo.set('%n::%n', old, new))
740 740 if ctxs and not keep:
741 if (not obsolete._enabled and
741 if (not obsolete.isenabled(repo, obsolete.allowunstableopt) and
742 742 repo.revs('(%ld::) - (%ld)', ctxs, ctxs)):
743 743 raise util.Abort(_('cannot edit history that would orphan nodes'))
744 744 if repo.revs('(%ld) and merge()', ctxs):
@@ -303,7 +303,8 b' def rebase(ui, repo, **opts):'
303 303 ('+'.join(str(repo[r]) for r in base), dest))
304 304 return 1
305 305
306 if (not (keepf or obsolete._enabled)
306 allowunstable = obsolete.isenabled(repo, obsolete.allowunstableopt)
307 if (not (keepf or allowunstable)
307 308 and repo.revs('first(children(%ld) - %ld)',
308 309 rebaseset, rebaseset)):
309 310 raise util.Abort(
@@ -1450,7 +1450,8 b' def commit(ui, repo, *pats, **opts):'
1450 1450 raise util.Abort(_('cannot amend public changesets'))
1451 1451 if len(repo[None].parents()) > 1:
1452 1452 raise util.Abort(_('cannot amend while merging'))
1453 if (not obsolete._enabled) and old.children():
1453 allowunstable = obsolete.isenabled(repo, obsolete.allowunstableopt)
1454 if not allowunstable and old.children():
1454 1455 raise util.Abort(_('cannot amend changeset with children'))
1455 1456
1456 1457 # commitfunc is used only for temporary amend commit by cmdutil.amend
@@ -83,6 +83,7 b' from i18n import _'
83 83
84 84 # Options for obsolescence
85 85 createmarkersopt = 'createmarkers'
86 allowunstableopt = 'allowunstable'
86 87
87 88 ### obsolescence marker flag
88 89
General Comments 0
You need to be logged in to leave comments. Login now