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.
( )
hg-reviewers |
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.
Lint Skipped |
Unit Tests Skipped |
Path | Packages | |||
---|---|---|---|---|
M | mercurial/commands.py (4 lines) | |||
M | mercurial/revset.py (12 lines) | |||
M | tests/test-commit-amend.t (2 lines) | |||
M | tests/test-histedit-obsolete.t (4 lines) | |||
M | tests/test-obsolete.t (8 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 ("unstable", "divergent", "bumped"): | for trouble in ("orphan", "divergent", "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 = { | ||||
"unstable": _("orphan: %d changesets"), | "orphan": _("orphan: %d changesets"), | ||||
"divergent": _("content-divergent: %d changesets"), | "divergent": _("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) | ||||
return subset & s | return subset & s | ||||
@predicate('tagged', safe=True) | @predicate('tagged', safe=True) | ||||
def tagged(repo, subset, x): | def tagged(repo, subset, x): | ||||
return tag(repo, subset, x) | return tag(repo, subset, x) | ||||
@predicate('unstable()', safe=True) | @predicate('unstable()', safe=True) | ||||
def unstable(repo, subset, x): | 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. | """Non-obsolete changesets with obsolete ancestors. | ||||
""" | """ | ||||
# i18n: "unstable" is a keyword | # i18n: "orphan" is a keyword | ||||
getargs(x, 0, 0, _("unstable takes no arguments")) | getargs(x, 0, 0, _("orphan takes no arguments")) | ||||
unstables = obsmod.getrevs(repo, 'unstable') | unstables = obsmod.getrevs(repo, 'unstable') | ||||
return subset & unstables | return subset & unstables | ||||
@predicate('user(string)', safe=True) | @predicate('user(string)', safe=True) | ||||
def user(repo, subset, x): | def user(repo, subset, x): | ||||
"""User name contains string. The match is case-insensitive. | """User name contains string. The match is case-insensitive. | ||||
$ hg up '.^' | $ hg up '.^' | ||||
0 files updated, 0 files merged, 1 files removed, 0 files unresolved | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | ||||
$ echo 'b' >> a | $ echo 'b' >> a | ||||
$ hg log --style compact -r 'children(.)' | $ hg log --style compact -r 'children(.)' | ||||
18[tip]:11 b99e5df575f7 1970-01-01 00:00 +0000 test | 18[tip]:11 b99e5df575f7 1970-01-01 00:00 +0000 test | ||||
babar | babar | ||||
$ hg commit --amend | $ hg commit --amend | ||||
$ hg log -r 'unstable()' | $ hg log -r 'orphan()' | ||||
changeset: 18:b99e5df575f7 | changeset: 18:b99e5df575f7 | ||||
branch: a | branch: a | ||||
parent: 11:3334b7925910 | parent: 11:3334b7925910 | ||||
user: test | user: test | ||||
date: Thu Jan 01 00:00:00 1970 +0000 | date: Thu Jan 01 00:00:00 1970 +0000 | ||||
instability: orphan | instability: orphan | ||||
summary: babar | summary: babar | ||||
0 files updated, 0 files merged, 1 files removed, 0 files unresolved | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | ||||
adding c | adding c | ||||
Editing (b346ab9a313d), you may commit or record as needed now. | Editing (b346ab9a313d), you may commit or record as needed now. | ||||
(hg histedit --continue to resume) | (hg histedit --continue to resume) | ||||
[1] | [1] | ||||
$ echo c >> c | $ echo c >> c | ||||
$ hg histedit --continue | $ hg histedit --continue | ||||
$ hg log -r 'unstable()' | $ hg log -r 'orphan()' | ||||
11:c13eb81022ca f (no-eol) | 11:c13eb81022ca f (no-eol) | ||||
stabilise | stabilise | ||||
$ hg rebase -r 'unstable()' -d . | $ hg rebase -r 'orphan()' -d . | ||||
rebasing 11:c13eb81022ca "f" | rebasing 11:c13eb81022ca "f" | ||||
$ hg up tip -q | $ hg up tip -q | ||||
Test dropping of changeset on the top of the stack | Test dropping of changeset on the top of the stack | ||||
------------------------------------------------------- | ------------------------------------------------------- | ||||
Nothing is rewritten below, the working directory parent must be change for the | Nothing is rewritten below, the working directory parent must be change for the | ||||
dropped changeset to be hidden. | dropped changeset to be hidden. |
$ hg summary | $ hg summary | ||||
parent: 5:cda648ca50f5 tip (orphan) | parent: 5:cda648ca50f5 tip (orphan) | ||||
add original_e | add original_e | ||||
branch: default | branch: default | ||||
commit: (clean) | commit: (clean) | ||||
update: 1 new changesets, 2 branch heads (merge) | update: 1 new changesets, 2 branch heads (merge) | ||||
phases: 3 draft | phases: 3 draft | ||||
orphan: 1 changesets | orphan: 1 changesets | ||||
$ hg log -G -r '::unstable()' | $ hg log -G -r '::orphan()' | ||||
@ 5:cda648ca50f5 (draft orphan) [tip ] add original_e | @ 5:cda648ca50f5 (draft orphan) [tip ] add original_e | ||||
| | | | ||||
x 4:94b33453f93b (draft *obsolete*) [ ] add original_d | x 4:94b33453f93b (draft *obsolete*) [ ] add original_d | ||||
| | | | ||||
o 3:6f9641995072 (draft) [ ] add n3w_3_c | o 3:6f9641995072 (draft) [ ] add n3w_3_c | ||||
| | | | ||||
o 1:7c3bad9141dc (public) [ ] add b | o 1:7c3bad9141dc (public) [ ] add b | ||||
| | | | ||||
$ 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 unstable()' | $ hg log --config ui.logtemplate= -r 'bumped() 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 unstable()' | $ hg log -r 'bumped() 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 'bumped()' | ||||
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 unstable()' | $ hg up -r 'bumped() 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 |