Show More
@@ -1313,6 +1313,10 b' class queue(object):' | |||
|
1313 | 1313 | if heads != [self.applied[-1].node]: |
|
1314 | 1314 | raise util.Abort(_("popping would remove a revision not " |
|
1315 | 1315 | "managed by this patch queue")) |
|
1316 | if not repo[self.applied[-1].node].mutable(): | |
|
1317 | raise util.Abort( | |
|
1318 | _("popping would remove an immutable revision"), | |
|
1319 | hint=_('see "hg help phases" for details')) | |
|
1316 | 1320 | |
|
1317 | 1321 | # we know there are no local changes, so we can make a simplified |
|
1318 | 1322 | # form of hg.update. |
@@ -1374,6 +1378,9 b' class queue(object):' | |||
|
1374 | 1378 | (top, patchfn) = (self.applied[-1].node, self.applied[-1].name) |
|
1375 | 1379 | if repo.changelog.heads(top) != [top]: |
|
1376 | 1380 | raise util.Abort(_("cannot refresh a revision with children")) |
|
1381 | if not repo[top].mutable(): | |
|
1382 | raise util.Abort(_("cannot refresh immutable revision"), | |
|
1383 | hint=_('see "hg help phases" for details')) | |
|
1377 | 1384 | |
|
1378 | 1385 | inclsubs = self.checksubstate(repo) |
|
1379 | 1386 |
@@ -1,5 +1,6 b'' | |||
|
1 | 1 | $ echo '[extensions]' >> $HGRCPATH |
|
2 | $ echo 'mq =' >> $HGRCPATH | |
|
2 | $ echo 'hgext.mq =' >> $HGRCPATH | |
|
3 | $ echo 'hgext.graphlog =' >> $HGRCPATH | |
|
3 | 4 | |
|
4 | 5 | $ hg init repo |
|
5 | 6 | $ cd repo |
@@ -17,6 +18,35 b'' | |||
|
17 | 18 | $ echo bar >> foo |
|
18 | 19 | $ hg qrefresh -m 'append bar' |
|
19 | 20 | |
|
21 | Try to operate on public mq changeset | |
|
22 | ||
|
23 | $ hg qpop | |
|
24 | popping bar | |
|
25 | now at: foo | |
|
26 | $ hg phase --public qbase | |
|
27 | $ echo babar >> foo | |
|
28 | $ hg qref | |
|
29 | abort: cannot refresh immutable revision | |
|
30 | (see "hg help phases" for details) | |
|
31 | [255] | |
|
32 | $ hg revert -a | |
|
33 | reverting foo | |
|
34 | $ hg qpop | |
|
35 | abort: popping would remove an immutable revision | |
|
36 | (see "hg help phases" for details) | |
|
37 | [255] | |
|
38 | $ hg qfold bar | |
|
39 | abort: cannot refresh immutable revision | |
|
40 | (see "hg help phases" for details) | |
|
41 | [255] | |
|
42 | $ hg revert -a | |
|
43 | reverting foo | |
|
44 | ||
|
45 | restore state for remaining test | |
|
46 | ||
|
47 | $ hg qpush | |
|
48 | applying bar | |
|
49 | now at: bar | |
|
20 | 50 | |
|
21 | 51 | try to commit on top of a patch |
|
22 | 52 |
General Comments 0
You need to be logged in to leave comments.
Login now