Comments
Patch
@@ -2119,7 +2119,7 @@ def fold(ui, repo, *revs, **opts):
raise util.Abort("set has multiple roots")
root = repo[roots[0]]
if root.phase() <= phases.public:
- raise util.Abort("can't fold public revisions")
+ raise util.Abort(_("cannot fold public revisions"))
heads = repo.revs('heads(%ld)', revs)
if len(heads) > 1:
raise util.Abort("set has multiple heads")
@@ -623,6 +623,10 @@ Test fold
abort: cannot fold non-linear revisions
(given revisions are unrelated to parent of working directory)
[255]
+ $ hg phase --public 0
+ $ hg fold -r 0
+ abort: cannot fold public revisions
+ [255]
$ hg fold -r 5
3 changesets folded
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -652,7 +656,7 @@ Test fold with wc parent is not the head
|
| o 1:73d38bb17fd7@default(draft) add 1
|/
- o 0:8685c6d34325@default(draft) add 0
+ o 0:8685c6d34325@default(public) add 0
$ hg log --template '{rev}: {author}\n'
12: victor