revset: rename unstable into orphan
Don't touch unstable volatile set name, only the revset name. The volatile set
name will be updated in a later patch.
The renaming is done according to
https://www.mercurial-scm.org/wiki/CEDVocabulary.
Differential Revision: https://phab.mercurial-scm.org/D250
--- a/mercurial/commands.py Fri Aug 04 18:41:16 2017 +0200
+++ b/mercurial/commands.py Thu Aug 03 13:48:39 2017 +0200
@@ -4992,11 +4992,11 @@
ui.status(_('phases: %s\n') % ', '.join(t))
if obsolete.isenabled(repo, obsolete.createmarkersopt):
- for trouble in ("unstable", "divergent", "bumped"):
+ for trouble in ("orphan", "divergent", "bumped"):
numtrouble = len(repo.revs(trouble + "()"))
# We write all the possibilities to ease translation
troublemsg = {
- "unstable": _("orphan: %d changesets"),
+ "orphan": _("orphan: %d changesets"),
"divergent": _("content-divergent: %d changesets"),
"bumped": _("phase-divergent: %d changesets"),
}
--- a/mercurial/revset.py Fri Aug 04 18:41:16 2017 +0200
+++ b/mercurial/revset.py Thu Aug 03 13:48:39 2017 +0200
@@ -1919,10 +1919,18 @@
@predicate('unstable()', safe=True)
def unstable(repo, subset, x):
+ msg = ("'unstable()' is deprecated, "
+ "use 'orphan()'")
+ repo.ui.deprecwarn(msg, '4.4')
+
+ return orphan(repo, subset, x)
+
+@predicate('orphan()', safe=True)
+def orphan(repo, subset, x):
"""Non-obsolete changesets with obsolete ancestors.
"""
- # i18n: "unstable" is a keyword
- getargs(x, 0, 0, _("unstable takes no arguments"))
+ # i18n: "orphan" is a keyword
+ getargs(x, 0, 0, _("orphan takes no arguments"))
unstables = obsmod.getrevs(repo, 'unstable')
return subset & unstables
--- a/tests/test-commit-amend.t Fri Aug 04 18:41:16 2017 +0200
+++ b/tests/test-commit-amend.t Thu Aug 03 13:48:39 2017 +0200
@@ -604,7 +604,7 @@
babar
$ hg commit --amend
- $ hg log -r 'unstable()'
+ $ hg log -r 'orphan()'
changeset: 18:b99e5df575f7
branch: a
parent: 11:3334b7925910
--- a/tests/test-histedit-obsolete.t Fri Aug 04 18:41:16 2017 +0200
+++ b/tests/test-histedit-obsolete.t Thu Aug 03 13:48:39 2017 +0200
@@ -223,12 +223,12 @@
$ echo c >> c
$ hg histedit --continue
- $ hg log -r 'unstable()'
+ $ hg log -r 'orphan()'
11:c13eb81022ca f (no-eol)
stabilise
- $ hg rebase -r 'unstable()' -d .
+ $ hg rebase -r 'orphan()' -d .
rebasing 11:c13eb81022ca "f"
$ hg up tip -q
--- a/tests/test-obsolete.t Fri Aug 04 18:41:16 2017 +0200
+++ b/tests/test-obsolete.t Thu Aug 03 13:48:39 2017 +0200
@@ -527,7 +527,7 @@
update: 1 new changesets, 2 branch heads (merge)
phases: 3 draft
orphan: 1 changesets
- $ hg log -G -r '::unstable()'
+ $ hg log -G -r '::orphan()'
@ 5:cda648ca50f5 (draft orphan) [tip ] add original_e
|
x 4:94b33453f93b (draft *obsolete*) [ ] add original_d
@@ -910,7 +910,7 @@
$ hg debugobsolete `getid obsolete_e`
obsoleted 1 changesets
$ hg debugobsolete `getid original_c` `getid babar`
- $ hg log --config ui.logtemplate= -r 'bumped() and unstable()'
+ $ hg log --config ui.logtemplate= -r 'bumped() and orphan()'
changeset: 7:50c51b361e60
user: test
date: Thu Jan 01 00:00:00 1970 +0000
@@ -925,7 +925,7 @@
test the "troubles" templatekw
- $ hg log -r 'bumped() and unstable()'
+ $ hg log -r 'bumped() and orphan()'
7:50c51b361e60 (draft orphan phase-divergent) [ ] add babar
test the default cmdline template
@@ -947,7 +947,7 @@
test summary output
- $ hg up -r 'bumped() and unstable()'
+ $ hg up -r 'bumped() and orphan()'
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
$ hg summary
parent: 7:50c51b361e60 (orphan, phase-divergent)