##// END OF EJS Templates
rebase: check no-op before checking phase (issue3891)...
Siddharth Agarwal -
r19059:53eadcb8 default
parent child Browse files
Show More
@@ -209,10 +209,6 b' def rebase(ui, repo, **opts):'
209 _("can't remove original changesets with"
209 _("can't remove original changesets with"
210 " unrebased descendants"),
210 " unrebased descendants"),
211 hint=_('use --keep to keep original changesets'))
211 hint=_('use --keep to keep original changesets'))
212 elif not keepf and not repo[root].mutable():
213 raise util.Abort(_("can't rebase immutable changeset %s")
214 % repo[root],
215 hint=_('see hg help phases for details'))
216 else:
212 else:
217 result = buildstate(repo, dest, rebaseset, collapsef)
213 result = buildstate(repo, dest, rebaseset, collapsef)
218
214
@@ -220,6 +216,10 b' def rebase(ui, repo, **opts):'
220 # Empty state built, nothing to rebase
216 # Empty state built, nothing to rebase
221 ui.status(_('nothing to rebase\n'))
217 ui.status(_('nothing to rebase\n'))
222 return 1
218 return 1
219 elif not keepf and not repo[root].mutable():
220 raise util.Abort(_("can't rebase immutable changeset %s")
221 % repo[root],
222 hint=_('see hg help phases for details'))
223 else:
223 else:
224 originalwd, target, state = result
224 originalwd, target, state = result
225 if collapsef:
225 if collapsef:
@@ -276,6 +276,9 b' C onto A - rebase onto an ancestor:'
276 Check rebasing public changeset
276 Check rebasing public changeset
277
277
278 $ hg pull --config phases.publish=True -q -r 6 . # update phase of 6
278 $ hg pull --config phases.publish=True -q -r 6 . # update phase of 6
279 $ hg rebase -d 0 -b 6
280 nothing to rebase
281 [1]
279 $ hg rebase -d 5 -b 6
282 $ hg rebase -d 5 -b 6
280 abort: can't rebase immutable changeset e1c4361dd923
283 abort: can't rebase immutable changeset e1c4361dd923
281 (see hg help phases for details)
284 (see hg help phases for details)
General Comments 0
You need to be logged in to leave comments. Login now