Mercurial > public > mercurial-scm > hg-stable
diff mercurial/revset.py @ 33795:9dcc3529e002
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
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Thu, 03 Aug 2017 13:48:39 +0200 |
parents | d1b13d4995ed |
children | f078d7358e90 |
line wrap: on
line diff
--- 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