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 (30 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 log -G -r "stack()" | |||||
| @ 5 foo draft c_f | |||||
| | | |||||
| o 4 foo draft c_e | |||||
| | | |||||
| o 3 foo draft c_d | |||||
| | | |||||
| o 2 foo draft c_c | |||||
| | | |||||
| o 1 other draft c_b | |||||
| | | |||||
| o 0 other draft c_a | |||||
| But not if we restrict on the branch | |||||
| $ hg log -G -r "stack()" --config experimental.stack.same-branch=true | |||||
| @ 5 foo draft c_f | |||||
| | | |||||
| o 4 foo draft c_e | |||||
| | | |||||
| o 3 foo draft c_d | |||||
| | | |||||
| o 2 foo draft c_c | |||||
| | | |||||
| ~ | |||||
| 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 log -G -r "stack()" | $ hg log -G -r "stack()" | ||||
| @ 1 other draft c_b | @ 1 other draft c_b | ||||
| | | | | ||||