Mercurial > hg-stable
changeset 33796:f078d7358e90
revset: remane divergent into contentdivergent
Don't touch divergent 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/D251
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Thu, 03 Aug 2017 14:01:51 +0200 |
parents | 9dcc3529e002 |
children | ed99d3afef88 |
files | mercurial/commands.py mercurial/revset.py tests/test-obsolete-divergent.t tests/test-rebase-obsolete.t tests/test-revset.t |
diffstat | 5 files changed, 23 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py Thu Aug 03 13:48:39 2017 +0200 +++ b/mercurial/commands.py Thu Aug 03 14:01:51 2017 +0200 @@ -4992,12 +4992,12 @@ ui.status(_('phases: %s\n') % ', '.join(t)) if obsolete.isenabled(repo, obsolete.createmarkersopt): - for trouble in ("orphan", "divergent", "bumped"): + for trouble in ("orphan", "contentdivergent", "bumped"): numtrouble = len(repo.revs(trouble + "()")) # We write all the possibilities to ease translation troublemsg = { "orphan": _("orphan: %d changesets"), - "divergent": _("content-divergent: %d changesets"), + "contentdivergent": _("content-divergent: %d changesets"), "bumped": _("phase-divergent: %d changesets"), } if numtrouble > 0:
--- a/mercurial/revset.py Thu Aug 03 13:48:39 2017 +0200 +++ b/mercurial/revset.py Thu Aug 03 14:01:51 2017 +0200 @@ -711,11 +711,19 @@ @predicate('divergent()', safe=True) def divergent(repo, subset, x): + msg = ("'divergent()' is deprecated, " + "use 'contentdivergent()'") + repo.ui.deprecwarn(msg, '4.4') + + return contentdivergent(repo, subset, x) + +@predicate('contentdivergent()', safe=True) +def contentdivergent(repo, subset, x): """ Final successors of changesets with an alternative set of final successors. """ - # i18n: "divergent" is a keyword - getargs(x, 0, 0, _("divergent takes no arguments")) + # i18n: "contentdivergent" is a keyword + getargs(x, 0, 0, _("contentdivergent takes no arguments")) divergent = obsmod.getrevs(repo, 'divergent') return subset & divergent
--- a/tests/test-obsolete-divergent.t Thu Aug 03 13:48:39 2017 +0200 +++ b/tests/test-obsolete-divergent.t Thu Aug 03 14:01:51 2017 +0200 @@ -80,7 +80,7 @@ 82623d38b9ba 392fd25390da 392fd25390da - $ hg log -r 'divergent()' + $ hg log -r 'contentdivergent()' 2:82623d38b9ba A_1 3:392fd25390da A_2 $ hg debugsuccessorssets 'all()' --closest @@ -147,7 +147,7 @@ 01f36c5a8fda 01f36c5a8fda 01f36c5a8fda - $ hg log -r 'divergent()' + $ hg log -r 'contentdivergent()' 2:82623d38b9ba A_1 4:01f36c5a8fda A_3 $ hg debugsuccessorssets 'all()' --closest @@ -199,7 +199,7 @@ 82623d38b9ba 392fd25390da 392fd25390da - $ hg log -r 'divergent()' + $ hg log -r 'contentdivergent()' 2:82623d38b9ba A_1 3:392fd25390da A_2 $ hg debugsuccessorssets 'all()' --closest @@ -278,7 +278,7 @@ 01f36c5a8fda 01f36c5a8fda 01f36c5a8fda - $ hg log -r 'divergent()' + $ hg log -r 'contentdivergent()' $ hg debugsuccessorssets 'all()' --closest d20a80d4def3 d20a80d4def3 @@ -322,7 +322,7 @@ 82623d38b9ba 392fd25390da 392fd25390da - $ hg log -r 'divergent()' + $ hg log -r 'contentdivergent()' $ hg debugsuccessorssets 'all()' --closest d20a80d4def3 d20a80d4def3 @@ -410,7 +410,7 @@ e442cfc57690 e442cfc57690 e442cfc57690 - $ hg log -r 'divergent()' + $ hg log -r 'contentdivergent()' Check more complex obsolescence graft (with divergence) @@ -515,7 +515,7 @@ 14608b260df8 bed64f5d2f5a bed64f5d2f5a - $ hg log -r 'divergent()' + $ hg log -r 'contentdivergent()' 4:01f36c5a8fda A_3 8:7ae126973a96 A_7 9:14608b260df8 A_8 @@ -614,7 +614,7 @@ a139f71be9da a139f71be9da a139f71be9da - $ hg log -r 'divergent()' + $ hg log -r 'contentdivergent()' $ cd ..
--- a/tests/test-rebase-obsolete.t Thu Aug 03 13:48:39 2017 +0200 +++ b/tests/test-rebase-obsolete.t Thu Aug 03 14:01:51 2017 +0200 @@ -215,7 +215,7 @@ 08483444fef91d6224f6655ee586a65d263ad34c 4596109a6a4328c398bde3a4a3b6737cfade3003 0 (*) {'user': 'test'} (glob) 8877864f1edb05d0e07dc4ba77b67a80a7b86672 462a34d07e599b87ea08676a449373fe4e2e1347 0 (*) {'user': 'test'} (glob) 5ae4c968c6aca831df823664e706c9d4aa34473d 98f6af4ee9539e14da4465128f894c274900b6e5 0 (*) {'user': 'test'} (glob) - $ hg log --rev 'divergent()' + $ hg log --rev 'contentdivergent()' $ hg log -G o 13:98f6af4ee953 C |
--- a/tests/test-revset.t Thu Aug 03 13:48:39 2017 +0200 +++ b/tests/test-revset.t Thu Aug 03 14:01:51 2017 +0200 @@ -4504,10 +4504,10 @@ E G - $ hg log -r 'successors(B+A)-divergent()' -T '{desc}\n' + $ hg log -r 'successors(B+A)-contentdivergent()' -T '{desc}\n' A Z B - $ hg log -r 'successors(B+A)-divergent()-obsolete()' -T '{desc}\n' + $ hg log -r 'successors(B+A)-contentdivergent()-obsolete()' -T '{desc}\n' Z