# HG changeset patch # User Boris Feld # Date 2017-08-03 12:08:39 # Node ID ed99d3afef889177ef37be21fb0ea0dbb18b0027 # Parent f078d7358e908e92648f20e450538066de047d75 revset: rename bumped into phasedivergent Don't touch bumped 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/D252 diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -4992,13 +4992,13 @@ def summary(ui, repo, **opts): ui.status(_('phases: %s\n') % ', '.join(t)) if obsolete.isenabled(repo, obsolete.createmarkersopt): - for trouble in ("orphan", "contentdivergent", "bumped"): + for trouble in ("orphan", "contentdivergent", "phasedivergent"): numtrouble = len(repo.revs(trouble + "()")) # We write all the possibilities to ease translation troublemsg = { "orphan": _("orphan: %d changesets"), "contentdivergent": _("content-divergent: %d changesets"), - "bumped": _("phase-divergent: %d changesets"), + "phasedivergent": _("phase-divergent: %d changesets"), } if numtrouble > 0: ui.status(troublemsg[trouble] % numtrouble + "\n") diff --git a/mercurial/revset.py b/mercurial/revset.py --- a/mercurial/revset.py +++ b/mercurial/revset.py @@ -459,12 +459,20 @@ def branch(repo, subset, x): @predicate('bumped()', safe=True) def bumped(repo, subset, x): + msg = ("'bumped()' is deprecated, " + "use 'phasedivergent()'") + repo.ui.deprecwarn(msg, '4.4') + + return phasedivergent(repo, subset, x) + +@predicate('phasedivergent()', safe=True) +def phasedivergent(repo, subset, x): """Mutable changesets marked as successors of public changesets. - Only non-public and non-obsolete changesets can be `bumped`. + Only non-public and non-obsolete changesets can be `phasedivergent`. """ - # i18n: "bumped" is a keyword - getargs(x, 0, 0, _("bumped takes no arguments")) + # i18n: "phasedivergent" is a keyword + getargs(x, 0, 0, _("phasedivergent takes no arguments")) bumped = obsmod.getrevs(repo, 'bumped') return subset & bumped diff --git a/tests/test-obsolete.t b/tests/test-obsolete.t --- a/tests/test-obsolete.t +++ b/tests/test-obsolete.t @@ -223,7 +223,7 @@ If we didn't filtered obsolete changeset note that the bumped changeset (5:5601fb93a350) is not a direct successor of the public changeset - $ hg log --hidden -r 'bumped()' + $ hg log --hidden -r 'phasedivergent()' 5:5601fb93a350 (draft phase-divergent) [tip ] add new_3_c And that we can't push bumped changeset @@ -261,7 +261,7 @@ We need to create a clone of 5 and add a created new head $ hg debugobsolete -d '1338 0' --flags 1 `getid new_3_c` `getid n3w_3_c` obsoleted 1 changesets - $ hg log -r 'bumped()' + $ hg log -r 'phasedivergent()' $ hg log -G @ 6:6f9641995072 (draft) [tip ] add n3w_3_c | @@ -910,7 +910,7 @@ Several troubles on the same changeset ( $ hg debugobsolete `getid obsolete_e` obsoleted 1 changesets $ hg debugobsolete `getid original_c` `getid babar` - $ hg log --config ui.logtemplate= -r 'bumped() and orphan()' + $ hg log --config ui.logtemplate= -r 'phasedivergent() and orphan()' changeset: 7:50c51b361e60 user: test date: Thu Jan 01 00:00:00 1970 +0000 @@ -925,12 +925,12 @@ test the "obsolete" templatekw test the "troubles" templatekw - $ hg log -r 'bumped() and orphan()' + $ hg log -r 'phasedivergent() and orphan()' 7:50c51b361e60 (draft orphan phase-divergent) [ ] add babar test the default cmdline template - $ hg log -T default -r 'bumped()' + $ hg log -T default -r 'phasedivergent()' changeset: 7:50c51b361e60 user: test date: Thu Jan 01 00:00:00 1970 +0000 @@ -947,7 +947,7 @@ test the default cmdline template test summary output - $ hg up -r 'bumped() and orphan()' + $ hg up -r 'phasedivergent() and orphan()' 1 files updated, 0 files merged, 1 files removed, 0 files unresolved $ hg summary parent: 7:50c51b361e60 (orphan, phase-divergent)