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.
hg-reviewers |
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.
Automatic diff as part of commit; lint not applicable. |
Automatic diff as part of commit; unit tests not applicable. |
mercurial/revset.py | ||
---|---|---|
472 | I'm not sure to see why, are phases out of the experimental status? |
mercurial/revset.py | ||
---|---|---|
472 | My bad, these revset are Evolution-related and not phases-related, I will send a follow-up marking them as experimental. |
Path | Packages | |||
---|---|---|---|---|
M | mercurial/commands.py (4 lines) | |||
M | mercurial/revset.py (14 lines) | |||
M | tests/test-obsolete.t (12 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", "contentdivergent", "bumped"): | for trouble in ("orphan", "contentdivergent", "phasedivergent"): | ||||
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"), | ||||
"contentdivergent": _("content-divergent: %d changesets"), | "contentdivergent": _("content-divergent: %d changesets"), | ||||
"bumped": _("phase-divergent: %d changesets"), | "phasedivergent": _("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'): | ||||
needsincoming, needsoutgoing = True, True | needsincoming, needsoutgoing = True, True |
And that bumped changeset are detected | And that bumped changeset are detected | ||||
-------------------------------------- | -------------------------------------- | ||||
If we didn't filtered obsolete changesets out, 3 and 4 would show up too. Also | If we didn't filtered obsolete changesets out, 3 and 4 would show up too. Also | ||||
note that the bumped changeset (5:5601fb93a350) is not a direct successor of | note that the bumped changeset (5:5601fb93a350) is not a direct successor of | ||||
the public changeset | the public changeset | ||||
$ hg log --hidden -r 'bumped()' | $ hg log --hidden -r 'phasedivergent()' | ||||
5:5601fb93a350 (draft phase-divergent) [tip ] add new_3_c | 5:5601fb93a350 (draft phase-divergent) [tip ] add new_3_c | ||||
And that we can't push bumped changeset | And that we can't push bumped changeset | ||||
$ hg push ../tmpa -r 0 --force #(make repo related) | $ hg push ../tmpa -r 0 --force #(make repo related) | ||||
pushing to ../tmpa | pushing to ../tmpa | ||||
searching for changes | searching for changes | ||||
warning: repository is unrelated | warning: repository is unrelated | ||||
$ hg up '5^' | $ hg up '5^' | ||||
0 files updated, 0 files merged, 1 files removed, 0 files unresolved | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | ||||
$ hg revert -ar 5 | $ hg revert -ar 5 | ||||
adding new_3_c | adding new_3_c | ||||
$ hg ci -m 'add n3w_3_c' | $ hg ci -m 'add n3w_3_c' | ||||
created new head | created new head | ||||
$ hg debugobsolete -d '1338 0' --flags 1 `getid new_3_c` `getid n3w_3_c` | $ hg debugobsolete -d '1338 0' --flags 1 `getid new_3_c` `getid n3w_3_c` | ||||
obsoleted 1 changesets | obsoleted 1 changesets | ||||
$ hg log -r 'bumped()' | $ hg log -r 'phasedivergent()' | ||||
$ hg log -G | $ hg log -G | ||||
@ 6:6f9641995072 (draft) [tip ] add n3w_3_c | @ 6:6f9641995072 (draft) [tip ] add n3w_3_c | ||||
| | | | ||||
| o 2:245bde4270cd (public) [ ] add original_c | | o 2:245bde4270cd (public) [ ] add original_c | ||||
|/ | |/ | ||||
o 1:7c3bad9141dc (public) [ ] add b | o 1:7c3bad9141dc (public) [ ] add b | ||||
| | | | ||||
o 0:1f0dee641bb7 (public) [ ] add a | o 0:1f0dee641bb7 (public) [ ] add a | ||||
$ rm hg.pid access.log errors.log | $ rm hg.pid access.log errors.log | ||||
#endif | #endif | ||||
Several troubles on the same changeset (create an unstable and bumped changeset) | Several troubles on the same changeset (create an unstable and bumped changeset) | ||||
$ hg debugobsolete `getid obsolete_e` | $ hg debugobsolete `getid obsolete_e` | ||||
obsoleted 1 changesets | obsoleted 1 changesets | ||||
$ hg debugobsolete `getid original_c` `getid babar` | $ 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 | changeset: 7:50c51b361e60 | ||||
user: test | user: test | ||||
date: Thu Jan 01 00:00:00 1970 +0000 | date: Thu Jan 01 00:00:00 1970 +0000 | ||||
instability: orphan, phase-divergent | instability: orphan, phase-divergent | ||||
summary: add babar | summary: add babar | ||||
test the "obsolete" templatekw | test the "obsolete" templatekw | ||||
$ hg log -r 'obsolete()' | $ hg log -r 'obsolete()' | ||||
6:3de5eca88c00 (draft *obsolete*) [ ] add obsolete_e | 6:3de5eca88c00 (draft *obsolete*) [ ] add obsolete_e | ||||
test the "troubles" 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 | 7:50c51b361e60 (draft orphan phase-divergent) [ ] add babar | ||||
test the default cmdline template | test the default cmdline template | ||||
$ hg log -T default -r 'bumped()' | $ hg log -T default -r 'phasedivergent()' | ||||
changeset: 7:50c51b361e60 | changeset: 7:50c51b361e60 | ||||
user: test | user: test | ||||
date: Thu Jan 01 00:00:00 1970 +0000 | date: Thu Jan 01 00:00:00 1970 +0000 | ||||
instability: orphan, phase-divergent | instability: orphan, phase-divergent | ||||
summary: add babar | summary: add babar | ||||
$ hg log -T default -r 'obsolete()' | $ hg log -T default -r 'obsolete()' | ||||
changeset: 6:3de5eca88c00 | changeset: 6:3de5eca88c00 | ||||
parent: 3:6f9641995072 | parent: 3:6f9641995072 | ||||
user: test | user: test | ||||
date: Thu Jan 01 00:00:00 1970 +0000 | date: Thu Jan 01 00:00:00 1970 +0000 | ||||
summary: add obsolete_e | summary: add obsolete_e | ||||
test summary output | 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 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | ||||
$ hg summary | $ hg summary | ||||
parent: 7:50c51b361e60 (orphan, phase-divergent) | parent: 7:50c51b361e60 (orphan, phase-divergent) | ||||
add babar | add babar | ||||
branch: default | branch: default | ||||
commit: (clean) | commit: (clean) | ||||
update: 2 new changesets (update) | update: 2 new changesets (update) | ||||
phases: 4 draft | phases: 4 draft |
Maybe these revset functions should be marked as (EXPERIMENTAL)?