Show More
@@ -738,7 +738,7 b' def between(repo, old, new, keep):' | |||||
738 | When keep is false, the specified set can't have children.""" |
|
738 | When keep is false, the specified set can't have children.""" | |
739 | ctxs = list(repo.set('%n::%n', old, new)) |
|
739 | ctxs = list(repo.set('%n::%n', old, new)) | |
740 | if ctxs and not keep: |
|
740 | if ctxs and not keep: | |
741 |
if (not obsolete. |
|
741 | if (not obsolete.isenabled(repo, obsolete.allowunstableopt) and | |
742 | repo.revs('(%ld::) - (%ld)', ctxs, ctxs)): |
|
742 | repo.revs('(%ld::) - (%ld)', ctxs, ctxs)): | |
743 | raise util.Abort(_('cannot edit history that would orphan nodes')) |
|
743 | raise util.Abort(_('cannot edit history that would orphan nodes')) | |
744 | if repo.revs('(%ld) and merge()', ctxs): |
|
744 | if repo.revs('(%ld) and merge()', ctxs): |
@@ -303,7 +303,8 b' def rebase(ui, repo, **opts):' | |||||
303 | ('+'.join(str(repo[r]) for r in base), dest)) |
|
303 | ('+'.join(str(repo[r]) for r in base), dest)) | |
304 | return 1 |
|
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 | and repo.revs('first(children(%ld) - %ld)', |
|
308 | and repo.revs('first(children(%ld) - %ld)', | |
308 | rebaseset, rebaseset)): |
|
309 | rebaseset, rebaseset)): | |
309 | raise util.Abort( |
|
310 | raise util.Abort( |
@@ -1450,7 +1450,8 b' def commit(ui, repo, *pats, **opts):' | |||||
1450 | raise util.Abort(_('cannot amend public changesets')) |
|
1450 | raise util.Abort(_('cannot amend public changesets')) | |
1451 | if len(repo[None].parents()) > 1: |
|
1451 | if len(repo[None].parents()) > 1: | |
1452 | raise util.Abort(_('cannot amend while merging')) |
|
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 | raise util.Abort(_('cannot amend changeset with children')) |
|
1455 | raise util.Abort(_('cannot amend changeset with children')) | |
1455 |
|
1456 | |||
1456 | # commitfunc is used only for temporary amend commit by cmdutil.amend |
|
1457 | # commitfunc is used only for temporary amend commit by cmdutil.amend |
General Comments 0
You need to be logged in to leave comments.
Login now