##// END OF EJS Templates
phases: rewrite "immutable changeset" to "public changeset"...
Jordi Gutiérrez Hermoso -
r25411:d298805f default
parent child Browse files
Show More
@@ -928,7 +928,7 def between(repo, old, new, keep):
928 raise util.Abort(_('cannot edit history that contains merges'))
928 raise util.Abort(_('cannot edit history that contains merges'))
929 root = ctxs[0] # list is already sorted by repo.set
929 root = ctxs[0] # list is already sorted by repo.set
930 if not root.mutable():
930 if not root.mutable():
931 raise util.Abort(_('cannot edit immutable changeset: %s') % root)
931 raise util.Abort(_('cannot edit public changeset: %s') % root)
932 return [c.node() for c in ctxs]
932 return [c.node() for c in ctxs]
933
933
934 def makedesc(repo, action, rev):
934 def makedesc(repo, action, rev):
@@ -1526,7 +1526,7 class queue(object):
1526 "managed by this patch queue"))
1526 "managed by this patch queue"))
1527 if not repo[self.applied[-1].node].mutable():
1527 if not repo[self.applied[-1].node].mutable():
1528 raise util.Abort(
1528 raise util.Abort(
1529 _("popping would remove an immutable revision"),
1529 _("popping would remove a public revision"),
1530 hint=_('see "hg help phases" for details'))
1530 hint=_('see "hg help phases" for details'))
1531
1531
1532 # we know there are no local changes, so we can make a simplified
1532 # we know there are no local changes, so we can make a simplified
@@ -1597,7 +1597,7 class queue(object):
1597 if repo.changelog.heads(top) != [top]:
1597 if repo.changelog.heads(top) != [top]:
1598 raise util.Abort(_("cannot refresh a revision with children"))
1598 raise util.Abort(_("cannot refresh a revision with children"))
1599 if not repo[top].mutable():
1599 if not repo[top].mutable():
1600 raise util.Abort(_("cannot refresh immutable revision"),
1600 raise util.Abort(_("cannot refresh public revision"),
1601 hint=_('see "hg help phases" for details'))
1601 hint=_('see "hg help phases" for details'))
1602
1602
1603 cparents = repo.changelog.parents(top)
1603 cparents = repo.changelog.parents(top)
@@ -330,7 +330,7 def rebase(ui, repo, **opts):
330
330
331 root = min(rebaseset)
331 root = min(rebaseset)
332 if not keepf and not repo[root].mutable():
332 if not keepf and not repo[root].mutable():
333 raise util.Abort(_("can't rebase immutable changeset %s")
333 raise util.Abort(_("can't rebase public changeset %s")
334 % repo[root],
334 % repo[root],
335 hint=_('see "hg help phases" for details'))
335 hint=_('see "hg help phases" for details'))
336
336
@@ -869,7 +869,7 def abort(repo, originalwd, target, stat
869 immutable = [d for d in dstates if not repo[d].mutable()]
869 immutable = [d for d in dstates if not repo[d].mutable()]
870 cleanup = True
870 cleanup = True
871 if immutable:
871 if immutable:
872 repo.ui.warn(_("warning: can't clean up immutable changesets %s\n")
872 repo.ui.warn(_("warning: can't clean up public changesets %s\n")
873 % ', '.join(str(repo[r]) for r in immutable),
873 % ', '.join(str(repo[r]) for r in immutable),
874 hint=_('see "hg help phases" for details'))
874 hint=_('see "hg help phases" for details'))
875 cleanup = False
875 cleanup = False
@@ -1214,7 +1214,7 def createmarkers(repo, relations, flag=
1214 localmetadata.update(rel[2])
1214 localmetadata.update(rel[2])
1215
1215
1216 if not prec.mutable():
1216 if not prec.mutable():
1217 raise util.Abort("cannot obsolete immutable changeset: %s"
1217 raise util.Abort("cannot obsolete public changeset: %s"
1218 % prec)
1218 % prec)
1219 nprec = prec.node()
1219 nprec = prec.node()
1220 nsucs = tuple(s.node() for s in sucs)
1220 nsucs = tuple(s.node() for s in sucs)
@@ -219,7 +219,7 Check that histedit respect immutability
219 o 0:cb9a9f314b8b (public) a
219 o 0:cb9a9f314b8b (public) a
220
220
221 $ hg histedit -r '.~2'
221 $ hg histedit -r '.~2'
222 abort: cannot edit immutable changeset: cb9a9f314b8b
222 abort: cannot edit public changeset: cb9a9f314b8b
223 [255]
223 [255]
224
224
225
225
@@ -25,17 +25,17 Try to operate on public mq changeset
25 $ hg phase --public qbase
25 $ hg phase --public qbase
26 $ echo babar >> foo
26 $ echo babar >> foo
27 $ hg qref
27 $ hg qref
28 abort: cannot refresh immutable revision
28 abort: cannot refresh public revision
29 (see "hg help phases" for details)
29 (see "hg help phases" for details)
30 [255]
30 [255]
31 $ hg revert -a
31 $ hg revert -a
32 reverting foo
32 reverting foo
33 $ hg qpop
33 $ hg qpop
34 abort: popping would remove an immutable revision
34 abort: popping would remove a public revision
35 (see "hg help phases" for details)
35 (see "hg help phases" for details)
36 [255]
36 [255]
37 $ hg qfold bar
37 $ hg qfold bar
38 abort: cannot refresh immutable revision
38 abort: cannot refresh public revision
39 (see "hg help phases" for details)
39 (see "hg help phases" for details)
40 [255]
40 [255]
41 $ hg revert -a
41 $ hg revert -a
@@ -258,7 +258,7 Change phase on B and B'
258 Abort the rebasing:
258 Abort the rebasing:
259
259
260 $ hg rebase --abort
260 $ hg rebase --abort
261 warning: can't clean up immutable changesets 45396c49d53b
261 warning: can't clean up public changesets 45396c49d53b
262 rebase aborted
262 rebase aborted
263
263
264 $ hg tglogp
264 $ hg tglogp
@@ -308,7 +308,7 Check rebasing public changeset
308 nothing to rebase
308 nothing to rebase
309 [1]
309 [1]
310 $ hg rebase -d 5 -b 6
310 $ hg rebase -d 5 -b 6
311 abort: can't rebase immutable changeset e1c4361dd923
311 abort: can't rebase public changeset e1c4361dd923
312 (see "hg help phases" for details)
312 (see "hg help phases" for details)
313 [255]
313 [255]
314
314
General Comments 0
You need to be logged in to leave comments. Login now