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.
hg-reviewers |
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.
Automatic diff as part of commit; lint not applicable. |
Automatic diff as part of commit; unit tests not applicable. |
Path | Packages | |||
---|---|---|---|---|
M | mercurial/commands.py (4 lines) | |||
M | mercurial/revset.py (12 lines) | |||
M | tests/test-obsolete-divergent.t (16 lines) | |||
M | tests/test-rebase-obsolete.t (2 lines) | |||
M | tests/test-revset.t (4 lines) |
Status | Author | Revision | |
---|---|---|---|
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan |
secret = len(repo.revs('secret()')) | secret = len(repo.revs('secret()')) | ||||
if secret: | if secret: | ||||
t.append(_('%d secret') % secret) | t.append(_('%d secret') % secret) | ||||
if draft or secret: | if draft or secret: | ||||
ui.status(_('phases: %s\n') % ', '.join(t)) | ui.status(_('phases: %s\n') % ', '.join(t)) | ||||
if obsolete.isenabled(repo, obsolete.createmarkersopt): | if obsolete.isenabled(repo, obsolete.createmarkersopt): | ||||
for trouble in ("orphan", "divergent", "bumped"): | for trouble in ("orphan", "contentdivergent", "bumped"): | ||||
numtrouble = len(repo.revs(trouble + "()")) | numtrouble = len(repo.revs(trouble + "()")) | ||||
# We write all the possibilities to ease translation | # We write all the possibilities to ease translation | ||||
troublemsg = { | troublemsg = { | ||||
"orphan": _("orphan: %d changesets"), | "orphan": _("orphan: %d changesets"), | ||||
"divergent": _("content-divergent: %d changesets"), | "contentdivergent": _("content-divergent: %d changesets"), | ||||
"bumped": _("phase-divergent: %d changesets"), | "bumped": _("phase-divergent: %d changesets"), | ||||
} | } | ||||
if numtrouble > 0: | if numtrouble > 0: | ||||
ui.status(troublemsg[trouble] % numtrouble + "\n") | ui.status(troublemsg[trouble] % numtrouble + "\n") | ||||
cmdutil.summaryhooks(ui, repo) | cmdutil.summaryhooks(ui, repo) | ||||
if opts.get('remote'): | if opts.get('remote'): |
r = src | r = src | ||||
src = _getrevsource(repo, r) | src = _getrevsource(repo, r) | ||||
return subset.filter(dests.__contains__, | return subset.filter(dests.__contains__, | ||||
condrepr=lambda: '<destination %r>' % sorted(dests)) | condrepr=lambda: '<destination %r>' % sorted(dests)) | ||||
@predicate('divergent()', safe=True) | @predicate('divergent()', safe=True) | ||||
def divergent(repo, subset, x): | 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. | Final successors of changesets with an alternative set of final successors. | ||||
""" | """ | ||||
# i18n: "divergent" is a keyword | # i18n: "contentdivergent" is a keyword | ||||
getargs(x, 0, 0, _("divergent takes no arguments")) | getargs(x, 0, 0, _("contentdivergent takes no arguments")) | ||||
divergent = obsmod.getrevs(repo, 'divergent') | divergent = obsmod.getrevs(repo, 'divergent') | ||||
return subset & divergent | return subset & divergent | ||||
@predicate('extinct()', safe=True) | @predicate('extinct()', safe=True) | ||||
def extinct(repo, subset, x): | def extinct(repo, subset, x): | ||||
"""Obsolete changesets with obsolete descendants only. | """Obsolete changesets with obsolete descendants only. | ||||
""" | """ | ||||
# i18n: "extinct" is a keyword | # i18n: "extinct" is a keyword |
d20a80d4def3 | d20a80d4def3 | ||||
007dc284c1f8 | 007dc284c1f8 | ||||
82623d38b9ba | 82623d38b9ba | ||||
392fd25390da | 392fd25390da | ||||
82623d38b9ba | 82623d38b9ba | ||||
82623d38b9ba | 82623d38b9ba | ||||
392fd25390da | 392fd25390da | ||||
392fd25390da | 392fd25390da | ||||
$ hg log -r 'divergent()' | $ hg log -r 'contentdivergent()' | ||||
2:82623d38b9ba A_1 | 2:82623d38b9ba A_1 | ||||
3:392fd25390da A_2 | 3:392fd25390da A_2 | ||||
$ hg debugsuccessorssets 'all()' --closest | $ hg debugsuccessorssets 'all()' --closest | ||||
d20a80d4def3 | d20a80d4def3 | ||||
d20a80d4def3 | d20a80d4def3 | ||||
82623d38b9ba | 82623d38b9ba | ||||
82623d38b9ba | 82623d38b9ba | ||||
392fd25390da | 392fd25390da | ||||
82623d38b9ba | 82623d38b9ba | ||||
01f36c5a8fda | 01f36c5a8fda | ||||
82623d38b9ba | 82623d38b9ba | ||||
82623d38b9ba | 82623d38b9ba | ||||
392fd25390da | 392fd25390da | ||||
01f36c5a8fda | 01f36c5a8fda | ||||
01f36c5a8fda | 01f36c5a8fda | ||||
01f36c5a8fda | 01f36c5a8fda | ||||
$ hg log -r 'divergent()' | $ hg log -r 'contentdivergent()' | ||||
2:82623d38b9ba A_1 | 2:82623d38b9ba A_1 | ||||
4:01f36c5a8fda A_3 | 4:01f36c5a8fda A_3 | ||||
$ hg debugsuccessorssets 'all()' --closest | $ hg debugsuccessorssets 'all()' --closest | ||||
d20a80d4def3 | d20a80d4def3 | ||||
d20a80d4def3 | d20a80d4def3 | ||||
82623d38b9ba | 82623d38b9ba | ||||
82623d38b9ba | 82623d38b9ba | ||||
01f36c5a8fda | 01f36c5a8fda | ||||
d20a80d4def3 | d20a80d4def3 | ||||
007dc284c1f8 | 007dc284c1f8 | ||||
82623d38b9ba | 82623d38b9ba | ||||
392fd25390da | 392fd25390da | ||||
82623d38b9ba | 82623d38b9ba | ||||
82623d38b9ba | 82623d38b9ba | ||||
392fd25390da | 392fd25390da | ||||
392fd25390da | 392fd25390da | ||||
$ hg log -r 'divergent()' | $ hg log -r 'contentdivergent()' | ||||
2:82623d38b9ba A_1 | 2:82623d38b9ba A_1 | ||||
3:392fd25390da A_2 | 3:392fd25390da A_2 | ||||
$ hg debugsuccessorssets 'all()' --closest | $ hg debugsuccessorssets 'all()' --closest | ||||
d20a80d4def3 | d20a80d4def3 | ||||
d20a80d4def3 | d20a80d4def3 | ||||
82623d38b9ba | 82623d38b9ba | ||||
82623d38b9ba | 82623d38b9ba | ||||
392fd25390da | 392fd25390da | ||||
007dc284c1f8 | 007dc284c1f8 | ||||
01f36c5a8fda | 01f36c5a8fda | ||||
82623d38b9ba | 82623d38b9ba | ||||
01f36c5a8fda | 01f36c5a8fda | ||||
392fd25390da | 392fd25390da | ||||
01f36c5a8fda | 01f36c5a8fda | ||||
01f36c5a8fda | 01f36c5a8fda | ||||
01f36c5a8fda | 01f36c5a8fda | ||||
$ hg log -r 'divergent()' | $ hg log -r 'contentdivergent()' | ||||
$ hg debugsuccessorssets 'all()' --closest | $ hg debugsuccessorssets 'all()' --closest | ||||
d20a80d4def3 | d20a80d4def3 | ||||
d20a80d4def3 | d20a80d4def3 | ||||
01f36c5a8fda | 01f36c5a8fda | ||||
01f36c5a8fda | 01f36c5a8fda | ||||
$ hg debugsuccessorssets 'all()' --closest --hidden | $ hg debugsuccessorssets 'all()' --closest --hidden | ||||
d20a80d4def3 | d20a80d4def3 | ||||
d20a80d4def3 | d20a80d4def3 | ||||
d20a80d4def3 | d20a80d4def3 | ||||
d20a80d4def3 | d20a80d4def3 | ||||
007dc284c1f8 | 007dc284c1f8 | ||||
82623d38b9ba 392fd25390da | 82623d38b9ba 392fd25390da | ||||
82623d38b9ba | 82623d38b9ba | ||||
82623d38b9ba | 82623d38b9ba | ||||
392fd25390da | 392fd25390da | ||||
392fd25390da | 392fd25390da | ||||
$ hg log -r 'divergent()' | $ hg log -r 'contentdivergent()' | ||||
$ hg debugsuccessorssets 'all()' --closest | $ hg debugsuccessorssets 'all()' --closest | ||||
d20a80d4def3 | d20a80d4def3 | ||||
d20a80d4def3 | d20a80d4def3 | ||||
82623d38b9ba | 82623d38b9ba | ||||
82623d38b9ba | 82623d38b9ba | ||||
392fd25390da | 392fd25390da | ||||
392fd25390da | 392fd25390da | ||||
$ hg debugsuccessorssets 'all()' --closest --hidden | $ hg debugsuccessorssets 'all()' --closest --hidden | ||||
392fd25390da | 392fd25390da | ||||
392fd25390da | 392fd25390da | ||||
01f36c5a8fda | 01f36c5a8fda | ||||
01f36c5a8fda | 01f36c5a8fda | ||||
6a411f0d7a0a | 6a411f0d7a0a | ||||
e442cfc57690 | e442cfc57690 | ||||
e442cfc57690 | e442cfc57690 | ||||
e442cfc57690 | e442cfc57690 | ||||
$ hg log -r 'divergent()' | $ hg log -r 'contentdivergent()' | ||||
Check more complex obsolescence graft (with divergence) | Check more complex obsolescence graft (with divergence) | ||||
$ mkcommit B_0; hg up 0 | $ mkcommit B_0; hg up 0 | ||||
0 files updated, 0 files merged, 2 files removed, 0 files unresolved | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | ||||
$ hg debugobsolete `getid B_0` `getid A_2` | $ hg debugobsolete `getid B_0` `getid A_2` | ||||
obsoleted 1 changesets | obsoleted 1 changesets | ||||
$ mkcommit A_7; hg up 0 | $ mkcommit A_7; hg up 0 | ||||
3750ebee865d | 3750ebee865d | ||||
392fd25390da | 392fd25390da | ||||
7ae126973a96 | 7ae126973a96 | ||||
7ae126973a96 | 7ae126973a96 | ||||
14608b260df8 | 14608b260df8 | ||||
14608b260df8 | 14608b260df8 | ||||
bed64f5d2f5a | bed64f5d2f5a | ||||
bed64f5d2f5a | bed64f5d2f5a | ||||
$ hg log -r 'divergent()' | $ hg log -r 'contentdivergent()' | ||||
4:01f36c5a8fda A_3 | 4:01f36c5a8fda A_3 | ||||
8:7ae126973a96 A_7 | 8:7ae126973a96 A_7 | ||||
9:14608b260df8 A_8 | 9:14608b260df8 A_8 | ||||
10:bed64f5d2f5a A_9 | 10:bed64f5d2f5a A_9 | ||||
fix the divergence | fix the divergence | ||||
$ mkcommit A_A; hg up 0 | $ mkcommit A_A; hg up 0 | ||||
7ae126973a96 | 7ae126973a96 | ||||
a139f71be9da | a139f71be9da | ||||
14608b260df8 | 14608b260df8 | ||||
a139f71be9da | a139f71be9da | ||||
bed64f5d2f5a | bed64f5d2f5a | ||||
a139f71be9da | a139f71be9da | ||||
a139f71be9da | a139f71be9da | ||||
a139f71be9da | a139f71be9da | ||||
$ hg log -r 'divergent()' | $ hg log -r 'contentdivergent()' | ||||
$ cd .. | $ cd .. | ||||
Subset does not diverge | Subset does not diverge | ||||
------------------------------ | ------------------------------ | ||||
Do not report divergent successors-set if it is a subset of another | Do not report divergent successors-set if it is a subset of another |
rebasing 10:5ae4c968c6ac "C" | rebasing 10:5ae4c968c6ac "C" | ||||
$ hg debugobsolete | $ hg debugobsolete | ||||
42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 {cd010b8cd998f3981a5a8115f94f8da4ab506089} (*) {'user': 'test'} (glob) | 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 {cd010b8cd998f3981a5a8115f94f8da4ab506089} (*) {'user': 'test'} (glob) | ||||
5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 5ae4c968c6aca831df823664e706c9d4aa34473d 0 (*) {'user': 'test'} (glob) | 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 5ae4c968c6aca831df823664e706c9d4aa34473d 0 (*) {'user': 'test'} (glob) | ||||
32af7686d403cf45b5d95f2d70cebea587ac806a 0 {5fddd98957c8a54a4d436dfe1da9d87f21a1b97b} (*) {'user': 'test'} (glob) | 32af7686d403cf45b5d95f2d70cebea587ac806a 0 {5fddd98957c8a54a4d436dfe1da9d87f21a1b97b} (*) {'user': 'test'} (glob) | ||||
08483444fef91d6224f6655ee586a65d263ad34c 4596109a6a4328c398bde3a4a3b6737cfade3003 0 (*) {'user': 'test'} (glob) | 08483444fef91d6224f6655ee586a65d263ad34c 4596109a6a4328c398bde3a4a3b6737cfade3003 0 (*) {'user': 'test'} (glob) | ||||
8877864f1edb05d0e07dc4ba77b67a80a7b86672 462a34d07e599b87ea08676a449373fe4e2e1347 0 (*) {'user': 'test'} (glob) | 8877864f1edb05d0e07dc4ba77b67a80a7b86672 462a34d07e599b87ea08676a449373fe4e2e1347 0 (*) {'user': 'test'} (glob) | ||||
5ae4c968c6aca831df823664e706c9d4aa34473d 98f6af4ee9539e14da4465128f894c274900b6e5 0 (*) {'user': 'test'} (glob) | 5ae4c968c6aca831df823664e706c9d4aa34473d 98f6af4ee9539e14da4465128f894c274900b6e5 0 (*) {'user': 'test'} (glob) | ||||
$ hg log --rev 'divergent()' | $ hg log --rev 'contentdivergent()' | ||||
$ hg log -G | $ hg log -G | ||||
o 13:98f6af4ee953 C | o 13:98f6af4ee953 C | ||||
| | | | ||||
o 12:462a34d07e59 B | o 12:462a34d07e59 B | ||||
| | | | ||||
@ 11:4596109a6a43 D | @ 11:4596109a6a43 D | ||||
| | | | ||||
o 7:02de42196ebe H | o 7:02de42196ebe H |
F | F | ||||
G | G | ||||
$ hg log -r 'successors(B)-obsolete()' -T '{desc}\n' --hidden | $ hg log -r 'successors(B)-obsolete()' -T '{desc}\n' --hidden | ||||
D | D | ||||
E | E | ||||
G | G | ||||
$ hg log -r 'successors(B+A)-divergent()' -T '{desc}\n' | $ hg log -r 'successors(B+A)-contentdivergent()' -T '{desc}\n' | ||||
A | A | ||||
Z | Z | ||||
B | B | ||||
$ hg log -r 'successors(B+A)-divergent()-obsolete()' -T '{desc}\n' | $ hg log -r 'successors(B+A)-contentdivergent()-obsolete()' -T '{desc}\n' | ||||
Z | Z |