Details
Details
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
Path | Packages | |||
---|---|---|---|---|
M | mercurial/configitems.py (3 lines) | |||
M | mercurial/stack.py (4 lines) | |||
M | tests/test-stack.t (19 lines) |
Status | Author | Revision | |
---|---|---|---|
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Abandoned | lothiraldan | ||
Abandoned | lothiraldan | ||
Abandoned | lothiraldan | ||
Abandoned | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan |
default=True, | default=True, | ||||
) | ) | ||||
coreconfigitem('stack', 'not-merge', | coreconfigitem('stack', 'not-merge', | ||||
default=True, | default=True, | ||||
) | ) | ||||
coreconfigitem('stack', 'restrict-ancestors', | coreconfigitem('stack', 'restrict-ancestors', | ||||
default=True, | default=True, | ||||
) | ) | ||||
coreconfigitem('experimental', 'stack.same-branch', | |||||
default=False, | |||||
) | |||||
coreconfigitem('subrepos', 'allowed', | coreconfigitem('subrepos', 'allowed', | ||||
default=dynamicdefault, # to make backporting simpler | default=dynamicdefault, # to make backporting simpler | ||||
) | ) | ||||
coreconfigitem('subrepos', 'hg:allowed', | coreconfigitem('subrepos', 'hg:allowed', | ||||
default=dynamicdefault, | default=dynamicdefault, | ||||
) | ) | ||||
coreconfigitem('subrepos', 'git:allowed', | coreconfigitem('subrepos', 'git:allowed', | ||||
default=dynamicdefault, | default=dynamicdefault, |
if repo.ui.configbool("stack", "restrict-ancestors"): | if repo.ui.configbool("stack", "restrict-ancestors"): | ||||
revspecargs.append(revsetlang.formatspec("only(%s)", rev)) | revspecargs.append(revsetlang.formatspec("only(%s)", rev)) | ||||
revspec.append("%r") | revspec.append("%r") | ||||
if repo.ui.configbool("stack", "not-merge"): | if repo.ui.configbool("stack", "not-merge"): | ||||
revspecargs.append("not ::merge()") | revspecargs.append("not ::merge()") | ||||
revspec.append("%r") | revspec.append("%r") | ||||
if repo.ui.configbool("experimental", "stack.same-branch"): | |||||
revspecargs.append(revsetlang.formatspec("branch(%s)", rev)) | |||||
revspec.append("%r") | |||||
finalrevspec = " and ".join(revspec) | finalrevspec = " and ".join(revspec) | ||||
revset = revsetlang.formatspec(finalrevspec, *revspecargs) | revset = revsetlang.formatspec(finalrevspec, *revspecargs) | ||||
revisions = scmutil.revrange(repo, [revset]) | revisions = scmutil.revrange(repo, [revset]) | ||||
revisions.sort() | revisions.sort() | ||||
return revisions | return revisions |
| | | | ||||
o 2 foo draft c_c | o 2 foo draft c_c | ||||
| | | | ||||
o 1 other draft c_b | o 1 other draft c_b | ||||
| | | | ||||
o 0 other draft c_a | o 0 other draft c_a | ||||
Check that stack show draft changesets from all branches by default | |||||
------------------------------------------------------------------- | |||||
$ hg debugstack | |||||
0 | |||||
1 | |||||
2 | |||||
3 | |||||
4 | |||||
5 | |||||
But not if we restrict on the branch | |||||
$ hg debugstack --config experimental.stack.same-branch=true | |||||
2 | |||||
3 | |||||
4 | |||||
5 | |||||
Check that stack doesn't include public changesets | Check that stack doesn't include public changesets | ||||
-------------------------------------------------- | -------------------------------------------------- | ||||
$ hg up other | $ hg up other | ||||
0 files updated, 0 files merged, 4 files removed, 0 files unresolved | 0 files updated, 0 files merged, 4 files removed, 0 files unresolved | ||||
$ hg debugstack | $ hg debugstack | ||||
0 | 0 | ||||
1 | 1 |