annotate tests/test-branches.t @ 49618:3adca6eb6659 stable

commit: properly consider file include and exclude options when closing branch It looks like this is meant to prevent adding another commit that does nothing but close a branch on top of a commit that already closed the branch. The matcher building functions want `Dict[bytes, Any]`, not `Dict[str, Any]`, which was found by adding type hints to the matcher related methods in scmutil.
author Matt Harbison <matt_harbison@yahoo.com>
date Fri, 18 Nov 2022 13:43:03 -0500
parents 7ddbb3623a07
children 566f7dd563c1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11868
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
1 $ hg init a
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
2 $ cd a
31454
a5bad127128d branchmap: handle nullrev in setcachedata
Durham Goode <durham@fb.com>
parents: 31173
diff changeset
3
a5bad127128d branchmap: handle nullrev in setcachedata
Durham Goode <durham@fb.com>
parents: 31173
diff changeset
4 Verify checking branch of nullrev before the cache is created doesnt crash
a5bad127128d branchmap: handle nullrev in setcachedata
Durham Goode <durham@fb.com>
parents: 31173
diff changeset
5 $ hg log -r 'branch(.)' -T '{branch}\n'
a5bad127128d branchmap: handle nullrev in setcachedata
Durham Goode <durham@fb.com>
parents: 31173
diff changeset
6
a5bad127128d branchmap: handle nullrev in setcachedata
Durham Goode <durham@fb.com>
parents: 31173
diff changeset
7 Basic test
11868
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
8 $ echo 'root' >root
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
9 $ hg add root
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
10 $ hg commit -d '0 0' -m "Adding root node"
4675
6858a7477a5e Change branches to sort 'active' branches first, and add an option to show only active branches.
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
11
11868
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
12 $ echo 'a' >a
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
13 $ hg add a
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
14 $ hg branch a
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
15 marked working directory as branch a
15615
41885892796e branch: warn on branching
Matt Mackall <mpm@selenic.com>
parents: 14162
diff changeset
16 (branches are permanent and global, did you want a bookmark?)
11868
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
17 $ hg commit -d '1 0' -m "Adding a branch"
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
18
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
19 $ hg branch q
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
20 marked working directory as branch q
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
21 $ echo 'aa' >a
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
22 $ hg branch -C
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
23 reset working directory to branch a
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
24 $ hg commit -d '2 0' -m "Adding to a branch"
4675
6858a7477a5e Change branches to sort 'active' branches first, and add an option to show only active branches.
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
25
11868
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
26 $ hg update -C 0
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
27 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
28 $ echo 'b' >b
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
29 $ hg add b
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
30 $ hg branch b
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
31 marked working directory as branch b
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
32 $ hg commit -d '2 0' -m "Adding b branch"
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
33
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
34 $ echo 'bh1' >bh1
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
35 $ hg add bh1
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
36 $ hg commit -d '3 0' -m "Adding b branch head 1"
4675
6858a7477a5e Change branches to sort 'active' branches first, and add an option to show only active branches.
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
37
11868
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
38 $ hg update -C 2
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
39 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
40 $ echo 'bh2' >bh2
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
41 $ hg add bh2
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
42 $ hg commit -d '4 0' -m "Adding b branch head 2"
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
43
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
44 $ echo 'c' >c
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
45 $ hg add c
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
46 $ hg branch c
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
47 marked working directory as branch c
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
48 $ hg commit -d '5 0' -m "Adding c branch"
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
49
17821
361ab1e2086f scmutil: add bad character checking to checknewlabel
Kevin Bullock <kbullock@ringworld.org>
parents: 16913
diff changeset
50 reserved names
361ab1e2086f scmutil: add bad character checking to checknewlabel
Kevin Bullock <kbullock@ringworld.org>
parents: 16913
diff changeset
51
11868
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
52 $ hg branch tip
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
53 abort: the name 'tip' is reserved
45845
f96fa4de5055 errors: use InputError for errors about bad label names (tags etc)
Martin von Zweigbergk <martinvonz@google.com>
parents: 45827
diff changeset
54 [10]
11868
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
55 $ hg branch null
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
56 abort: the name 'null' is reserved
45845
f96fa4de5055 errors: use InputError for errors about bad label names (tags etc)
Martin von Zweigbergk <martinvonz@google.com>
parents: 45827
diff changeset
57 [10]
11868
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
58 $ hg branch .
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
59 abort: the name '.' is reserved
45845
f96fa4de5055 errors: use InputError for errors about bad label names (tags etc)
Martin von Zweigbergk <martinvonz@google.com>
parents: 45827
diff changeset
60 [10]
7006
92d44ec32430 branch: added more support for named branches
Sune Foldager <cryo@cyanite.org>
parents: 6815
diff changeset
61
17821
361ab1e2086f scmutil: add bad character checking to checknewlabel
Kevin Bullock <kbullock@ringworld.org>
parents: 16913
diff changeset
62 invalid characters
361ab1e2086f scmutil: add bad character checking to checknewlabel
Kevin Bullock <kbullock@ringworld.org>
parents: 16913
diff changeset
63
361ab1e2086f scmutil: add bad character checking to checknewlabel
Kevin Bullock <kbullock@ringworld.org>
parents: 16913
diff changeset
64 $ hg branch 'foo:bar'
17850
71c1513fd560 scmutil: generalize message to make it more i18n-friendly
Wagner Bruna <wbruna@yahoo.com>
parents: 17821
diff changeset
65 abort: ':' cannot be used in a name
45845
f96fa4de5055 errors: use InputError for errors about bad label names (tags etc)
Martin von Zweigbergk <martinvonz@google.com>
parents: 45827
diff changeset
66 [10]
17821
361ab1e2086f scmutil: add bad character checking to checknewlabel
Kevin Bullock <kbullock@ringworld.org>
parents: 16913
diff changeset
67
361ab1e2086f scmutil: add bad character checking to checknewlabel
Kevin Bullock <kbullock@ringworld.org>
parents: 16913
diff changeset
68 $ hg branch 'foo
361ab1e2086f scmutil: add bad character checking to checknewlabel
Kevin Bullock <kbullock@ringworld.org>
parents: 16913
diff changeset
69 > bar'
17850
71c1513fd560 scmutil: generalize message to make it more i18n-friendly
Wagner Bruna <wbruna@yahoo.com>
parents: 17821
diff changeset
70 abort: '\n' cannot be used in a name
45845
f96fa4de5055 errors: use InputError for errors about bad label names (tags etc)
Martin von Zweigbergk <martinvonz@google.com>
parents: 45827
diff changeset
71 [10]
17821
361ab1e2086f scmutil: add bad character checking to checknewlabel
Kevin Bullock <kbullock@ringworld.org>
parents: 16913
diff changeset
72
19180
12dbdd348bb0 branch: strip whitespace before testing known branch name
Yuya Nishihara <yuya@tcha.org>
parents: 18955
diff changeset
73 trailing or leading spaces should be stripped before testing duplicates
12dbdd348bb0 branch: strip whitespace before testing known branch name
Yuya Nishihara <yuya@tcha.org>
parents: 18955
diff changeset
74
12dbdd348bb0 branch: strip whitespace before testing known branch name
Yuya Nishihara <yuya@tcha.org>
parents: 18955
diff changeset
75 $ hg branch 'b '
12dbdd348bb0 branch: strip whitespace before testing known branch name
Yuya Nishihara <yuya@tcha.org>
parents: 18955
diff changeset
76 abort: a branch of the same name already exists
12dbdd348bb0 branch: strip whitespace before testing known branch name
Yuya Nishihara <yuya@tcha.org>
parents: 18955
diff changeset
77 (use 'hg update' to switch to it)
45827
8d72e29ad1e0 errors: introduce InputError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 42542
diff changeset
78 [10]
19180
12dbdd348bb0 branch: strip whitespace before testing known branch name
Yuya Nishihara <yuya@tcha.org>
parents: 18955
diff changeset
79
12dbdd348bb0 branch: strip whitespace before testing known branch name
Yuya Nishihara <yuya@tcha.org>
parents: 18955
diff changeset
80 $ hg branch ' b'
12dbdd348bb0 branch: strip whitespace before testing known branch name
Yuya Nishihara <yuya@tcha.org>
parents: 18955
diff changeset
81 abort: a branch of the same name already exists
12dbdd348bb0 branch: strip whitespace before testing known branch name
Yuya Nishihara <yuya@tcha.org>
parents: 18955
diff changeset
82 (use 'hg update' to switch to it)
45827
8d72e29ad1e0 errors: introduce InputError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 42542
diff changeset
83 [10]
19180
12dbdd348bb0 branch: strip whitespace before testing known branch name
Yuya Nishihara <yuya@tcha.org>
parents: 18955
diff changeset
84
17984
b74361cf7c0a update: allow update to existing branches with invalid names (issue3710)
Tim Henigan <tim.henigan@gmail.com>
parents: 17850
diff changeset
85 verify update will accept invalid legacy branch names
b74361cf7c0a update: allow update to existing branches with invalid names (issue3710)
Tim Henigan <tim.henigan@gmail.com>
parents: 17850
diff changeset
86
b74361cf7c0a update: allow update to existing branches with invalid names (issue3710)
Tim Henigan <tim.henigan@gmail.com>
parents: 17850
diff changeset
87 $ hg init test-invalid-branch-name
b74361cf7c0a update: allow update to existing branches with invalid names (issue3710)
Tim Henigan <tim.henigan@gmail.com>
parents: 17850
diff changeset
88 $ cd test-invalid-branch-name
37336
5d10f41ddcc4 tests: use `hg unbundle` instead of `hg pull` in some tests
Gregory Szorc <gregory.szorc@gmail.com>
parents: 34661
diff changeset
89 $ hg unbundle -u "$TESTDIR"/bundles/test-invalid-branch-name.hg
17984
b74361cf7c0a update: allow update to existing branches with invalid names (issue3710)
Tim Henigan <tim.henigan@gmail.com>
parents: 17850
diff changeset
90 adding changesets
b74361cf7c0a update: allow update to existing branches with invalid names (issue3710)
Tim Henigan <tim.henigan@gmail.com>
parents: 17850
diff changeset
91 adding manifests
b74361cf7c0a update: allow update to existing branches with invalid names (issue3710)
Tim Henigan <tim.henigan@gmail.com>
parents: 17850
diff changeset
92 adding file changes
b74361cf7c0a update: allow update to existing branches with invalid names (issue3710)
Tim Henigan <tim.henigan@gmail.com>
parents: 17850
diff changeset
93 added 3 changesets with 3 changes to 2 files
39480
89630d0b3e23 phase: report number of non-public changeset alongside the new range
Boris Feld <boris.feld@octobus.net>
parents: 37336
diff changeset
94 new changesets f0e4c7f04036:33c2ceb9310b (3 drafts)
17984
b74361cf7c0a update: allow update to existing branches with invalid names (issue3710)
Tim Henigan <tim.henigan@gmail.com>
parents: 17850
diff changeset
95 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
b74361cf7c0a update: allow update to existing branches with invalid names (issue3710)
Tim Henigan <tim.henigan@gmail.com>
parents: 17850
diff changeset
96
b74361cf7c0a update: allow update to existing branches with invalid names (issue3710)
Tim Henigan <tim.henigan@gmail.com>
parents: 17850
diff changeset
97 $ hg update '"colon:test"'
b74361cf7c0a update: allow update to existing branches with invalid names (issue3710)
Tim Henigan <tim.henigan@gmail.com>
parents: 17850
diff changeset
98 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
b74361cf7c0a update: allow update to existing branches with invalid names (issue3710)
Tim Henigan <tim.henigan@gmail.com>
parents: 17850
diff changeset
99 $ cd ..
b74361cf7c0a update: allow update to existing branches with invalid names (issue3710)
Tim Henigan <tim.henigan@gmail.com>
parents: 17850
diff changeset
100
11868
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
101 $ echo 'd' >d
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
102 $ hg add d
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
103 $ hg branch 'a branch name much longer than the default justification used by branches'
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
104 marked working directory as branch a branch name much longer than the default justification used by branches
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
105 $ hg commit -d '6 0' -m "Adding d branch"
4675
6858a7477a5e Change branches to sort 'active' branches first, and add an option to show only active branches.
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
106
11868
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
107 $ hg branches
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
108 a branch name much longer than the default justification used by branches 7:10ff5895aa57
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
109 b 4:aee39cd168d0
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
110 c 6:589736a22561 (inactive)
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
111 a 5:d8cbc61dbaa6 (inactive)
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
112 default 0:19709c5a4e75 (inactive)
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
113
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
114 -------
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
115
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
116 $ hg branches -a
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
117 a branch name much longer than the default justification used by branches 7:10ff5895aa57
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
118 b 4:aee39cd168d0
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
119
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
120 --- Branch a
4675
6858a7477a5e Change branches to sort 'active' branches first, and add an option to show only active branches.
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
121
11868
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
122 $ hg log -b a
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
123 changeset: 5:d8cbc61dbaa6
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
124 branch: a
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
125 parent: 2:881fe2b92ad0
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
126 user: test
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
127 date: Thu Jan 01 00:00:04 1970 +0000
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
128 summary: Adding b branch head 2
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
129
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
130 changeset: 2:881fe2b92ad0
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
131 branch: a
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
132 user: test
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
133 date: Thu Jan 01 00:00:02 1970 +0000
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
134 summary: Adding to a branch
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
135
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
136 changeset: 1:dd6b440dd85a
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
137 branch: a
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
138 user: test
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
139 date: Thu Jan 01 00:00:01 1970 +0000
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
140 summary: Adding a branch
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
141
4675
6858a7477a5e Change branches to sort 'active' branches first, and add an option to show only active branches.
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
142
11868
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
143 ---- Branch b
4675
6858a7477a5e Change branches to sort 'active' branches first, and add an option to show only active branches.
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
144
11868
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
145 $ hg log -b b
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
146 changeset: 4:aee39cd168d0
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
147 branch: b
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
148 user: test
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
149 date: Thu Jan 01 00:00:03 1970 +0000
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
150 summary: Adding b branch head 1
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
151
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
152 changeset: 3:ac22033332d1
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
153 branch: b
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
154 parent: 0:19709c5a4e75
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
155 user: test
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
156 date: Thu Jan 01 00:00:02 1970 +0000
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
157 summary: Adding b branch
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
158
10417
58e040c51231 branch: avoid using reserved tag names
Wagner Bruna <wbruna@softwareexpress.com.br>
parents: 8991
diff changeset
159
41064
4506f801e492 branches: add -r option to show branch name(s) of a given rev (issue5948)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 39480
diff changeset
160 ---- going to test branch listing by rev
4506f801e492 branches: add -r option to show branch name(s) of a given rev (issue5948)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 39480
diff changeset
161 $ hg branches -r0
4506f801e492 branches: add -r option to show branch name(s) of a given rev (issue5948)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 39480
diff changeset
162 default 0:19709c5a4e75 (inactive)
4506f801e492 branches: add -r option to show branch name(s) of a given rev (issue5948)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 39480
diff changeset
163 $ hg branches -qr0
4506f801e492 branches: add -r option to show branch name(s) of a given rev (issue5948)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 39480
diff changeset
164 default
4506f801e492 branches: add -r option to show branch name(s) of a given rev (issue5948)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 39480
diff changeset
165 --- now more than one rev
4506f801e492 branches: add -r option to show branch name(s) of a given rev (issue5948)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 39480
diff changeset
166 $ hg branches -r2:5
4506f801e492 branches: add -r option to show branch name(s) of a given rev (issue5948)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 39480
diff changeset
167 b 4:aee39cd168d0
4506f801e492 branches: add -r option to show branch name(s) of a given rev (issue5948)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 39480
diff changeset
168 a 5:d8cbc61dbaa6 (inactive)
4506f801e492 branches: add -r option to show branch name(s) of a given rev (issue5948)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 39480
diff changeset
169 $ hg branches -qr2:5
4506f801e492 branches: add -r option to show branch name(s) of a given rev (issue5948)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 39480
diff changeset
170 b
4506f801e492 branches: add -r option to show branch name(s) of a given rev (issue5948)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 39480
diff changeset
171 a
11868
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
172 ---- going to test branch closing
6631
a2b13cac0922 Active branches fix (issue1104)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 6067
diff changeset
173
11868
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
174 $ hg branches
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
175 a branch name much longer than the default justification used by branches 7:10ff5895aa57
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
176 b 4:aee39cd168d0
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
177 c 6:589736a22561 (inactive)
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
178 a 5:d8cbc61dbaa6 (inactive)
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
179 default 0:19709c5a4e75 (inactive)
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
180 $ hg up -C b
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
181 2 files updated, 0 files merged, 4 files removed, 0 files unresolved
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
182 $ echo 'xxx1' >> b
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
183 $ hg commit -d '7 0' -m 'adding cset to branch b'
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
184 $ hg up -C aee39cd168d0
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
185 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
186 $ echo 'xxx2' >> b
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
187 $ hg commit -d '8 0' -m 'adding head to branch b'
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
188 created new head
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
189 $ echo 'xxx3' >> b
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
190 $ hg commit -d '9 0' -m 'adding another cset to branch b'
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
191 $ hg branches
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
192 b 10:bfbe841b666e
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
193 a branch name much longer than the default justification used by branches 7:10ff5895aa57
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
194 c 6:589736a22561 (inactive)
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
195 a 5:d8cbc61dbaa6 (inactive)
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
196 default 0:19709c5a4e75 (inactive)
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
197 $ hg heads --closed
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
198 changeset: 10:bfbe841b666e
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
199 branch: b
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
200 tag: tip
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
201 user: test
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
202 date: Thu Jan 01 00:00:09 1970 +0000
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
203 summary: adding another cset to branch b
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
204
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
205 changeset: 8:eebb944467c9
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
206 branch: b
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
207 parent: 4:aee39cd168d0
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
208 user: test
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
209 date: Thu Jan 01 00:00:07 1970 +0000
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
210 summary: adding cset to branch b
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
211
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
212 changeset: 7:10ff5895aa57
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
213 branch: a branch name much longer than the default justification used by branches
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
214 user: test
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
215 date: Thu Jan 01 00:00:06 1970 +0000
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
216 summary: Adding d branch
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
217
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
218 changeset: 6:589736a22561
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
219 branch: c
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
220 user: test
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
221 date: Thu Jan 01 00:00:05 1970 +0000
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
222 summary: Adding c branch
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
223
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
224 changeset: 5:d8cbc61dbaa6
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
225 branch: a
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
226 parent: 2:881fe2b92ad0
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
227 user: test
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
228 date: Thu Jan 01 00:00:04 1970 +0000
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
229 summary: Adding b branch head 2
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
230
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
231 changeset: 0:19709c5a4e75
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
232 user: test
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
233 date: Thu Jan 01 00:00:00 1970 +0000
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
234 summary: Adding root node
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
235
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
236 $ hg heads
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
237 changeset: 10:bfbe841b666e
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
238 branch: b
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
239 tag: tip
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
240 user: test
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
241 date: Thu Jan 01 00:00:09 1970 +0000
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
242 summary: adding another cset to branch b
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
243
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
244 changeset: 8:eebb944467c9
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
245 branch: b
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
246 parent: 4:aee39cd168d0
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
247 user: test
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
248 date: Thu Jan 01 00:00:07 1970 +0000
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
249 summary: adding cset to branch b
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
250
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
251 changeset: 7:10ff5895aa57
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
252 branch: a branch name much longer than the default justification used by branches
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
253 user: test
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
254 date: Thu Jan 01 00:00:06 1970 +0000
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
255 summary: Adding d branch
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
256
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
257 changeset: 6:589736a22561
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
258 branch: c
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
259 user: test
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
260 date: Thu Jan 01 00:00:05 1970 +0000
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
261 summary: Adding c branch
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
262
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
263 changeset: 5:d8cbc61dbaa6
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
264 branch: a
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
265 parent: 2:881fe2b92ad0
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
266 user: test
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
267 date: Thu Jan 01 00:00:04 1970 +0000
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
268 summary: Adding b branch head 2
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
269
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
270 changeset: 0:19709c5a4e75
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
271 user: test
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
272 date: Thu Jan 01 00:00:00 1970 +0000
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
273 summary: Adding root node
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
274
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
275 $ hg commit -d '9 0' --close-branch -m 'prune bad branch'
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
276 $ hg branches -a
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
277 b 8:eebb944467c9
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
278 a branch name much longer than the default justification used by branches 7:10ff5895aa57
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
279 $ hg up -C b
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
280 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
281 $ hg commit -d '9 0' --close-branch -m 'close this part branch too'
19305
b500a663a2c7 commit: amending with --close-branch (issue3445)
Iulian Stana <julian.stana@gmail.com>
parents: 19180
diff changeset
282 $ hg commit -d '9 0' --close-branch -m 're-closing this branch'
42493
9f7cb777b654 commit: add a check if it is trying to close an already closed branch head
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 42202
diff changeset
283 abort: current revision is already a branch closing head
45827
8d72e29ad1e0 errors: introduce InputError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 42542
diff changeset
284 [10]
6067
57c1a7052982 Option to log to only show changesets within a specified branch.
Dustin Sallings <dustin@spy.net>
parents: 4675
diff changeset
285
49320
3d3d7fc6035a commit: allow to close branch when committing change over a closed head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48677
diff changeset
286 $ echo foo > b
3d3d7fc6035a commit: allow to close branch when committing change over a closed head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48677
diff changeset
287 $ hg commit -d '9 0' --close-branch -m 're-closing this branch'
3d3d7fc6035a commit: allow to close branch when committing change over a closed head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48677
diff changeset
288
3d3d7fc6035a commit: allow to close branch when committing change over a closed head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48677
diff changeset
289 $ echo bar > b
3d3d7fc6035a commit: allow to close branch when committing change over a closed head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48677
diff changeset
290 $ hg commit -d '9 0' --close-branch -m 're-closing this branch' bh1
3d3d7fc6035a commit: allow to close branch when committing change over a closed head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48677
diff changeset
291 abort: current revision is already a branch closing head
3d3d7fc6035a commit: allow to close branch when committing change over a closed head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48677
diff changeset
292 [10]
3d3d7fc6035a commit: allow to close branch when committing change over a closed head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48677
diff changeset
293 $ hg commit -d '9 0' --close-branch -m 're-closing this branch' b
3d3d7fc6035a commit: allow to close branch when committing change over a closed head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48677
diff changeset
294
49617
7ddbb3623a07 tests: demonstrate a bug blocking a redundant branch close
Matt Harbison <matt_harbison@yahoo.com>
parents: 49320
diff changeset
295 $ echo baz > b
7ddbb3623a07 tests: demonstrate a bug blocking a redundant branch close
Matt Harbison <matt_harbison@yahoo.com>
parents: 49320
diff changeset
296 $ hg commit -d '9 0' --close-branch -m 'empty re-closing this branch' -X b
49618
3adca6eb6659 commit: properly consider file include and exclude options when closing branch
Matt Harbison <matt_harbison@yahoo.com>
parents: 49617
diff changeset
297 abort: current revision is already a branch closing head
3adca6eb6659 commit: properly consider file include and exclude options when closing branch
Matt Harbison <matt_harbison@yahoo.com>
parents: 49617
diff changeset
298 [10]
49617
7ddbb3623a07 tests: demonstrate a bug blocking a redundant branch close
Matt Harbison <matt_harbison@yahoo.com>
parents: 49320
diff changeset
299 $ hg revert b
7ddbb3623a07 tests: demonstrate a bug blocking a redundant branch close
Matt Harbison <matt_harbison@yahoo.com>
parents: 49320
diff changeset
300
49320
3d3d7fc6035a commit: allow to close branch when committing change over a closed head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48677
diff changeset
301 $ hg debugstrip --rev 13: --no-backup
3d3d7fc6035a commit: allow to close branch when committing change over a closed head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48677
diff changeset
302 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
3d3d7fc6035a commit: allow to close branch when committing change over a closed head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48677
diff changeset
303 $ hg revert --all --no-backup
3d3d7fc6035a commit: allow to close branch when committing change over a closed head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48677
diff changeset
304
18955
f3245f22771c commit: allow closing "non-head" changesets
Mads Kiilerich <madski@unity3d.com>
parents: 17984
diff changeset
305 $ hg log -r tip --debug
19305
b500a663a2c7 commit: amending with --close-branch (issue3445)
Iulian Stana <julian.stana@gmail.com>
parents: 19180
diff changeset
306 changeset: 12:e3d49c0575d8fc2cb1cd6859c747c14f5f6d499f
18955
f3245f22771c commit: allow closing "non-head" changesets
Mads Kiilerich <madski@unity3d.com>
parents: 17984
diff changeset
307 branch: b
f3245f22771c commit: allow closing "non-head" changesets
Mads Kiilerich <madski@unity3d.com>
parents: 17984
diff changeset
308 tag: tip
f3245f22771c commit: allow closing "non-head" changesets
Mads Kiilerich <madski@unity3d.com>
parents: 17984
diff changeset
309 phase: draft
19305
b500a663a2c7 commit: amending with --close-branch (issue3445)
Iulian Stana <julian.stana@gmail.com>
parents: 19180
diff changeset
310 parent: 8:eebb944467c9fb9651ed232aeaf31b3c0a7fc6c1
18955
f3245f22771c commit: allow closing "non-head" changesets
Mads Kiilerich <madski@unity3d.com>
parents: 17984
diff changeset
311 parent: -1:0000000000000000000000000000000000000000
f3245f22771c commit: allow closing "non-head" changesets
Mads Kiilerich <madski@unity3d.com>
parents: 17984
diff changeset
312 manifest: 8:6f9ed32d2b310e391a4f107d5f0f071df785bfee
f3245f22771c commit: allow closing "non-head" changesets
Mads Kiilerich <madski@unity3d.com>
parents: 17984
diff changeset
313 user: test
f3245f22771c commit: allow closing "non-head" changesets
Mads Kiilerich <madski@unity3d.com>
parents: 17984
diff changeset
314 date: Thu Jan 01 00:00:09 1970 +0000
f3245f22771c commit: allow closing "non-head" changesets
Mads Kiilerich <madski@unity3d.com>
parents: 17984
diff changeset
315 extra: branch=b
f3245f22771c commit: allow closing "non-head" changesets
Mads Kiilerich <madski@unity3d.com>
parents: 17984
diff changeset
316 extra: close=1
f3245f22771c commit: allow closing "non-head" changesets
Mads Kiilerich <madski@unity3d.com>
parents: 17984
diff changeset
317 description:
19305
b500a663a2c7 commit: amending with --close-branch (issue3445)
Iulian Stana <julian.stana@gmail.com>
parents: 19180
diff changeset
318 close this part branch too
18955
f3245f22771c commit: allow closing "non-head" changesets
Mads Kiilerich <madski@unity3d.com>
parents: 17984
diff changeset
319
f3245f22771c commit: allow closing "non-head" changesets
Mads Kiilerich <madski@unity3d.com>
parents: 17984
diff changeset
320
11868
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
321 --- b branch should be inactive
7657
405cacb06745 branch closing: add test for branch closing (and reopening)
John Mulligan <phlogistonjohn@asynchrono.us>
parents: 7006
diff changeset
322
11868
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
323 $ hg branches
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
324 a branch name much longer than the default justification used by branches 7:10ff5895aa57
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
325 c 6:589736a22561 (inactive)
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
326 a 5:d8cbc61dbaa6 (inactive)
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
327 default 0:19709c5a4e75 (inactive)
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
328 $ hg branches -c
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
329 a branch name much longer than the default justification used by branches 7:10ff5895aa57
14162
301725c3df9a localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 13987
diff changeset
330 b 12:e3d49c0575d8 (closed)
11868
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
331 c 6:589736a22561 (inactive)
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
332 a 5:d8cbc61dbaa6 (inactive)
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
333 default 0:19709c5a4e75 (inactive)
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
334 $ hg branches -a
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
335 a branch name much longer than the default justification used by branches 7:10ff5895aa57
16612
726dd0fc7cfe branches: quiet option observes other parameters
Travis Herrick <tthetoad@gmail.com>
parents: 15615
diff changeset
336 $ hg branches -q
726dd0fc7cfe branches: quiet option observes other parameters
Travis Herrick <tthetoad@gmail.com>
parents: 15615
diff changeset
337 a branch name much longer than the default justification used by branches
726dd0fc7cfe branches: quiet option observes other parameters
Travis Herrick <tthetoad@gmail.com>
parents: 15615
diff changeset
338 c
726dd0fc7cfe branches: quiet option observes other parameters
Travis Herrick <tthetoad@gmail.com>
parents: 15615
diff changeset
339 a
726dd0fc7cfe branches: quiet option observes other parameters
Travis Herrick <tthetoad@gmail.com>
parents: 15615
diff changeset
340 default
11868
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
341 $ hg heads b
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
342 no open branch heads found on branches b
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 11969
diff changeset
343 [1]
11868
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
344 $ hg heads --closed b
14162
301725c3df9a localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 13987
diff changeset
345 changeset: 12:e3d49c0575d8
11868
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
346 branch: b
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
347 tag: tip
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
348 parent: 8:eebb944467c9
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
349 user: test
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
350 date: Thu Jan 01 00:00:09 1970 +0000
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
351 summary: close this part branch too
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
352
14162
301725c3df9a localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 13987
diff changeset
353 changeset: 11:d3f163457ebf
11868
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
354 branch: b
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
355 user: test
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
356 date: Thu Jan 01 00:00:09 1970 +0000
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
357 summary: prune bad branch
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
358
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
359 $ echo 'xxx4' >> b
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
360 $ hg commit -d '9 0' -m 'reopen branch with a change'
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
361 reopening closed branch head 12
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
362
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
363 --- branch b is back in action
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
364
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
365 $ hg branches -a
14162
301725c3df9a localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 13987
diff changeset
366 b 13:e23b5505d1ad
11868
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
367 a branch name much longer than the default justification used by branches 7:10ff5895aa57
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
368
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
369 ---- test heads listings
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
370
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
371 $ hg heads
14162
301725c3df9a localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 13987
diff changeset
372 changeset: 13:e23b5505d1ad
11868
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
373 branch: b
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
374 tag: tip
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
375 user: test
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
376 date: Thu Jan 01 00:00:09 1970 +0000
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
377 summary: reopen branch with a change
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
378
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
379 changeset: 7:10ff5895aa57
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
380 branch: a branch name much longer than the default justification used by branches
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
381 user: test
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
382 date: Thu Jan 01 00:00:06 1970 +0000
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
383 summary: Adding d branch
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
384
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
385 changeset: 6:589736a22561
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
386 branch: c
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
387 user: test
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
388 date: Thu Jan 01 00:00:05 1970 +0000
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
389 summary: Adding c branch
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
390
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
391 changeset: 5:d8cbc61dbaa6
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
392 branch: a
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
393 parent: 2:881fe2b92ad0
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
394 user: test
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
395 date: Thu Jan 01 00:00:04 1970 +0000
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
396 summary: Adding b branch head 2
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
397
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
398 changeset: 0:19709c5a4e75
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
399 user: test
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
400 date: Thu Jan 01 00:00:00 1970 +0000
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
401 summary: Adding root node
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
402
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
403
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
404 branch default
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
405
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
406 $ hg heads default
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
407 changeset: 0:19709c5a4e75
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
408 user: test
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
409 date: Thu Jan 01 00:00:00 1970 +0000
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
410 summary: Adding root node
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
411
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
412
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
413 branch a
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
414
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
415 $ hg heads a
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
416 changeset: 5:d8cbc61dbaa6
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
417 branch: a
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
418 parent: 2:881fe2b92ad0
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
419 user: test
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
420 date: Thu Jan 01 00:00:04 1970 +0000
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
421 summary: Adding b branch head 2
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
422
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
423 $ hg heads --active a
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
424 no open branch heads found on branches a
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 11969
diff changeset
425 [1]
11868
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
426
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
427 branch b
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
428
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
429 $ hg heads b
14162
301725c3df9a localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 13987
diff changeset
430 changeset: 13:e23b5505d1ad
11868
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
431 branch: b
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
432 tag: tip
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
433 user: test
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
434 date: Thu Jan 01 00:00:09 1970 +0000
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
435 summary: reopen branch with a change
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
436
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
437 $ hg heads --closed b
14162
301725c3df9a localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 13987
diff changeset
438 changeset: 13:e23b5505d1ad
11868
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
439 branch: b
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
440 tag: tip
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
441 user: test
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
442 date: Thu Jan 01 00:00:09 1970 +0000
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
443 summary: reopen branch with a change
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
444
14162
301725c3df9a localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 13987
diff changeset
445 changeset: 11:d3f163457ebf
11868
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
446 branch: b
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
447 user: test
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
448 date: Thu Jan 01 00:00:09 1970 +0000
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
449 summary: prune bad branch
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
450
34074
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
451
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
452 reclose branch
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
453
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
454 $ hg up -C c
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
455 3 files updated, 0 files merged, 2 files removed, 0 files unresolved
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
456 $ hg commit -d '9 0' --close-branch -m 'reclosing this branch'
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
457 $ hg branches
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
458 b 13:e23b5505d1ad
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
459 a branch name much longer than the default justification used by branches 7:10ff5895aa57
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
460 a 5:d8cbc61dbaa6 (inactive)
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
461 default 0:19709c5a4e75 (inactive)
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
462 $ hg branches --closed
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
463 b 13:e23b5505d1ad
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
464 a branch name much longer than the default justification used by branches 7:10ff5895aa57
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
465 c 14:f894c25619d3 (closed)
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
466 a 5:d8cbc61dbaa6 (inactive)
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
467 default 0:19709c5a4e75 (inactive)
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
468
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
469 multihead branch
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
470
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
471 $ hg up -C default
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
472 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
473 $ hg branch m
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
474 marked working directory as branch m
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
475 $ touch m
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
476 $ hg add m
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
477 $ hg commit -d '10 0' -m 'multihead base'
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
478 $ echo "m1" >m
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
479 $ hg commit -d '10 0' -m 'head 1'
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
480 $ hg up -C '.^'
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
481 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
482 $ echo "m2" >m
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
483 $ hg commit -d '10 0' -m 'head 2'
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
484 created new head
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
485 $ hg log -b m
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
486 changeset: 17:df343b0df04f
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
487 branch: m
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
488 tag: tip
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
489 parent: 15:f3447637f53e
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
490 user: test
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
491 date: Thu Jan 01 00:00:10 1970 +0000
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
492 summary: head 2
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
493
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
494 changeset: 16:a58ca5d3bdf3
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
495 branch: m
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
496 user: test
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
497 date: Thu Jan 01 00:00:10 1970 +0000
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
498 summary: head 1
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
499
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
500 changeset: 15:f3447637f53e
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
501 branch: m
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
502 parent: 0:19709c5a4e75
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
503 user: test
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
504 date: Thu Jan 01 00:00:10 1970 +0000
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
505 summary: multihead base
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
506
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
507 $ hg heads --topo m
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
508 changeset: 17:df343b0df04f
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
509 branch: m
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
510 tag: tip
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
511 parent: 15:f3447637f53e
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
512 user: test
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
513 date: Thu Jan 01 00:00:10 1970 +0000
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
514 summary: head 2
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
515
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
516 changeset: 16:a58ca5d3bdf3
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
517 branch: m
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
518 user: test
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
519 date: Thu Jan 01 00:00:10 1970 +0000
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
520 summary: head 1
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
521
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
522 $ hg branches
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
523 m 17:df343b0df04f
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
524 b 13:e23b5505d1ad
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
525 a branch name much longer than the default justification used by branches 7:10ff5895aa57
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
526 a 5:d8cbc61dbaa6 (inactive)
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
527 default 0:19709c5a4e75 (inactive)
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
528
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
529 partially merge multihead branch
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
530
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
531 $ hg up -C default
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
532 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
533 $ hg branch md
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
534 marked working directory as branch md
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
535 $ hg merge m
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
536 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
537 (branch merge, don't forget to commit)
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
538 $ hg commit -d '11 0' -m 'merge head 2'
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
539 $ hg heads --topo m
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
540 changeset: 16:a58ca5d3bdf3
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
541 branch: m
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
542 user: test
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
543 date: Thu Jan 01 00:00:10 1970 +0000
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
544 summary: head 1
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
545
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
546 $ hg branches
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
547 md 18:c914c99f1fbb
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
548 m 17:df343b0df04f
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
549 b 13:e23b5505d1ad
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
550 a branch name much longer than the default justification used by branches 7:10ff5895aa57
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
551 a 5:d8cbc61dbaa6 (inactive)
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
552 default 0:19709c5a4e75 (inactive)
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
553
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
554 partially close multihead branch
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
555
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
556 $ hg up -C a58ca5d3bdf3
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
557 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
558 $ hg commit -d '12 0' -m 'close head 1' --close-branch
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
559 $ hg heads --topo m
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
560 changeset: 19:cd21a80baa3d
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
561 branch: m
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
562 tag: tip
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
563 parent: 16:a58ca5d3bdf3
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
564 user: test
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
565 date: Thu Jan 01 00:00:12 1970 +0000
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
566 summary: close head 1
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
567
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
568 $ hg branches
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
569 md 18:c914c99f1fbb
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
570 b 13:e23b5505d1ad
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
571 a branch name much longer than the default justification used by branches 7:10ff5895aa57
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
572 m 17:df343b0df04f (inactive)
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
573 a 5:d8cbc61dbaa6 (inactive)
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
574 default 0:19709c5a4e75 (inactive)
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
575
11969
52ec5c813723 color: enable branches support
Jeremy Whitlock <jcscoobyrs@gmail.com>
parents: 11868
diff changeset
576 default branch colors:
52ec5c813723 color: enable branches support
Jeremy Whitlock <jcscoobyrs@gmail.com>
parents: 11868
diff changeset
577
23172
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 22705
diff changeset
578 $ cat <<EOF >> $HGRCPATH
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 22705
diff changeset
579 > [extensions]
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 22705
diff changeset
580 > color =
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 22705
diff changeset
581 > [color]
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 22705
diff changeset
582 > mode = ansi
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 22705
diff changeset
583 > EOF
11969
52ec5c813723 color: enable branches support
Jeremy Whitlock <jcscoobyrs@gmail.com>
parents: 11868
diff changeset
584
52ec5c813723 color: enable branches support
Jeremy Whitlock <jcscoobyrs@gmail.com>
parents: 11868
diff changeset
585 $ hg up -C b
34074
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
586 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
11969
52ec5c813723 color: enable branches support
Jeremy Whitlock <jcscoobyrs@gmail.com>
parents: 11868
diff changeset
587 $ hg branches --color=always
34074
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
588 \x1b[0;0mmd\x1b[0m\x1b[0;33m 18:c914c99f1fbb\x1b[0m (esc)
22704
386339ffe421 branches: merge white space to format string
Yuya Nishihara <yuya@tcha.org>
parents: 22703
diff changeset
589 \x1b[0;32mb\x1b[0m\x1b[0;33m 13:e23b5505d1ad\x1b[0m (esc)
386339ffe421 branches: merge white space to format string
Yuya Nishihara <yuya@tcha.org>
parents: 22703
diff changeset
590 \x1b[0;0ma branch name much longer than the default justification used by branches\x1b[0m\x1b[0;33m 7:10ff5895aa57\x1b[0m (esc)
34074
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
591 \x1b[0;0mm\x1b[0m\x1b[0;33m 17:df343b0df04f\x1b[0m (inactive) (esc)
22704
386339ffe421 branches: merge white space to format string
Yuya Nishihara <yuya@tcha.org>
parents: 22703
diff changeset
592 \x1b[0;0ma\x1b[0m\x1b[0;33m 5:d8cbc61dbaa6\x1b[0m (inactive) (esc)
386339ffe421 branches: merge white space to format string
Yuya Nishihara <yuya@tcha.org>
parents: 22703
diff changeset
593 \x1b[0;0mdefault\x1b[0m\x1b[0;33m 0:19709c5a4e75\x1b[0m (inactive) (esc)
11969
52ec5c813723 color: enable branches support
Jeremy Whitlock <jcscoobyrs@gmail.com>
parents: 11868
diff changeset
594
52ec5c813723 color: enable branches support
Jeremy Whitlock <jcscoobyrs@gmail.com>
parents: 11868
diff changeset
595 default closed branch color:
52ec5c813723 color: enable branches support
Jeremy Whitlock <jcscoobyrs@gmail.com>
parents: 11868
diff changeset
596
52ec5c813723 color: enable branches support
Jeremy Whitlock <jcscoobyrs@gmail.com>
parents: 11868
diff changeset
597 $ hg branches --color=always --closed
34074
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
598 \x1b[0;0mmd\x1b[0m\x1b[0;33m 18:c914c99f1fbb\x1b[0m (esc)
22704
386339ffe421 branches: merge white space to format string
Yuya Nishihara <yuya@tcha.org>
parents: 22703
diff changeset
599 \x1b[0;32mb\x1b[0m\x1b[0;33m 13:e23b5505d1ad\x1b[0m (esc)
386339ffe421 branches: merge white space to format string
Yuya Nishihara <yuya@tcha.org>
parents: 22703
diff changeset
600 \x1b[0;0ma branch name much longer than the default justification used by branches\x1b[0m\x1b[0;33m 7:10ff5895aa57\x1b[0m (esc)
34074
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
601 \x1b[0;0mm\x1b[0m\x1b[0;33m 17:df343b0df04f\x1b[0m (inactive) (esc)
22704
386339ffe421 branches: merge white space to format string
Yuya Nishihara <yuya@tcha.org>
parents: 22703
diff changeset
602 \x1b[0;30;1mc\x1b[0m\x1b[0;33m 14:f894c25619d3\x1b[0m (closed) (esc)
386339ffe421 branches: merge white space to format string
Yuya Nishihara <yuya@tcha.org>
parents: 22703
diff changeset
603 \x1b[0;0ma\x1b[0m\x1b[0;33m 5:d8cbc61dbaa6\x1b[0m (inactive) (esc)
386339ffe421 branches: merge white space to format string
Yuya Nishihara <yuya@tcha.org>
parents: 22703
diff changeset
604 \x1b[0;0mdefault\x1b[0m\x1b[0;33m 0:19709c5a4e75\x1b[0m (inactive) (esc)
11969
52ec5c813723 color: enable branches support
Jeremy Whitlock <jcscoobyrs@gmail.com>
parents: 11868
diff changeset
605
23172
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 22705
diff changeset
606 $ cat <<EOF >> $HGRCPATH
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 22705
diff changeset
607 > [extensions]
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 22705
diff changeset
608 > color =
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 22705
diff changeset
609 > [color]
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 22705
diff changeset
610 > branches.active = green
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 22705
diff changeset
611 > branches.closed = blue
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 22705
diff changeset
612 > branches.current = red
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 22705
diff changeset
613 > branches.inactive = magenta
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 22705
diff changeset
614 > log.changeset = cyan
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 22705
diff changeset
615 > EOF
11969
52ec5c813723 color: enable branches support
Jeremy Whitlock <jcscoobyrs@gmail.com>
parents: 11868
diff changeset
616
52ec5c813723 color: enable branches support
Jeremy Whitlock <jcscoobyrs@gmail.com>
parents: 11868
diff changeset
617 custom branch colors:
52ec5c813723 color: enable branches support
Jeremy Whitlock <jcscoobyrs@gmail.com>
parents: 11868
diff changeset
618
52ec5c813723 color: enable branches support
Jeremy Whitlock <jcscoobyrs@gmail.com>
parents: 11868
diff changeset
619 $ hg branches --color=always
34074
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
620 \x1b[0;32mmd\x1b[0m\x1b[0;36m 18:c914c99f1fbb\x1b[0m (esc)
22704
386339ffe421 branches: merge white space to format string
Yuya Nishihara <yuya@tcha.org>
parents: 22703
diff changeset
621 \x1b[0;31mb\x1b[0m\x1b[0;36m 13:e23b5505d1ad\x1b[0m (esc)
386339ffe421 branches: merge white space to format string
Yuya Nishihara <yuya@tcha.org>
parents: 22703
diff changeset
622 \x1b[0;32ma branch name much longer than the default justification used by branches\x1b[0m\x1b[0;36m 7:10ff5895aa57\x1b[0m (esc)
34074
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
623 \x1b[0;35mm\x1b[0m\x1b[0;36m 17:df343b0df04f\x1b[0m (inactive) (esc)
22704
386339ffe421 branches: merge white space to format string
Yuya Nishihara <yuya@tcha.org>
parents: 22703
diff changeset
624 \x1b[0;35ma\x1b[0m\x1b[0;36m 5:d8cbc61dbaa6\x1b[0m (inactive) (esc)
386339ffe421 branches: merge white space to format string
Yuya Nishihara <yuya@tcha.org>
parents: 22703
diff changeset
625 \x1b[0;35mdefault\x1b[0m\x1b[0;36m 0:19709c5a4e75\x1b[0m (inactive) (esc)
11969
52ec5c813723 color: enable branches support
Jeremy Whitlock <jcscoobyrs@gmail.com>
parents: 11868
diff changeset
626
52ec5c813723 color: enable branches support
Jeremy Whitlock <jcscoobyrs@gmail.com>
parents: 11868
diff changeset
627 custom closed branch color:
52ec5c813723 color: enable branches support
Jeremy Whitlock <jcscoobyrs@gmail.com>
parents: 11868
diff changeset
628
52ec5c813723 color: enable branches support
Jeremy Whitlock <jcscoobyrs@gmail.com>
parents: 11868
diff changeset
629 $ hg branches --color=always --closed
34074
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
630 \x1b[0;32mmd\x1b[0m\x1b[0;36m 18:c914c99f1fbb\x1b[0m (esc)
22704
386339ffe421 branches: merge white space to format string
Yuya Nishihara <yuya@tcha.org>
parents: 22703
diff changeset
631 \x1b[0;31mb\x1b[0m\x1b[0;36m 13:e23b5505d1ad\x1b[0m (esc)
386339ffe421 branches: merge white space to format string
Yuya Nishihara <yuya@tcha.org>
parents: 22703
diff changeset
632 \x1b[0;32ma branch name much longer than the default justification used by branches\x1b[0m\x1b[0;36m 7:10ff5895aa57\x1b[0m (esc)
34074
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
633 \x1b[0;35mm\x1b[0m\x1b[0;36m 17:df343b0df04f\x1b[0m (inactive) (esc)
22704
386339ffe421 branches: merge white space to format string
Yuya Nishihara <yuya@tcha.org>
parents: 22703
diff changeset
634 \x1b[0;34mc\x1b[0m\x1b[0;36m 14:f894c25619d3\x1b[0m (closed) (esc)
386339ffe421 branches: merge white space to format string
Yuya Nishihara <yuya@tcha.org>
parents: 22703
diff changeset
635 \x1b[0;35ma\x1b[0m\x1b[0;36m 5:d8cbc61dbaa6\x1b[0m (inactive) (esc)
386339ffe421 branches: merge white space to format string
Yuya Nishihara <yuya@tcha.org>
parents: 22703
diff changeset
636 \x1b[0;35mdefault\x1b[0m\x1b[0;36m 0:19709c5a4e75\x1b[0m (inactive) (esc)
16913
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 16612
diff changeset
637
22703
bd6e95cb82b4 branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents: 19305
diff changeset
638 template output:
bd6e95cb82b4 branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents: 19305
diff changeset
639
bd6e95cb82b4 branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents: 19305
diff changeset
640 $ hg branches -Tjson --closed
bd6e95cb82b4 branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents: 19305
diff changeset
641 [
bd6e95cb82b4 branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents: 19305
diff changeset
642 {
22705
d4869b280cd6 branches: include active, closed and current flags in template output
Yuya Nishihara <yuya@tcha.org>
parents: 22704
diff changeset
643 "active": true,
34074
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
644 "branch": "md",
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
645 "closed": false,
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
646 "current": false,
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
647 "node": "c914c99f1fbb2b1d785a0a939ed3f67275df18e9",
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
648 "rev": 18
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
649 },
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
650 {
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
651 "active": true,
22703
bd6e95cb82b4 branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents: 19305
diff changeset
652 "branch": "b",
22705
d4869b280cd6 branches: include active, closed and current flags in template output
Yuya Nishihara <yuya@tcha.org>
parents: 22704
diff changeset
653 "closed": false,
d4869b280cd6 branches: include active, closed and current flags in template output
Yuya Nishihara <yuya@tcha.org>
parents: 22704
diff changeset
654 "current": true,
22703
bd6e95cb82b4 branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents: 19305
diff changeset
655 "node": "e23b5505d1ad24aab6f84fd8c7cb8cd8e5e93be0",
bd6e95cb82b4 branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents: 19305
diff changeset
656 "rev": 13
bd6e95cb82b4 branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents: 19305
diff changeset
657 },
bd6e95cb82b4 branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents: 19305
diff changeset
658 {
22705
d4869b280cd6 branches: include active, closed and current flags in template output
Yuya Nishihara <yuya@tcha.org>
parents: 22704
diff changeset
659 "active": true,
22703
bd6e95cb82b4 branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents: 19305
diff changeset
660 "branch": "a branch name much longer than the default justification used by branches",
22705
d4869b280cd6 branches: include active, closed and current flags in template output
Yuya Nishihara <yuya@tcha.org>
parents: 22704
diff changeset
661 "closed": false,
d4869b280cd6 branches: include active, closed and current flags in template output
Yuya Nishihara <yuya@tcha.org>
parents: 22704
diff changeset
662 "current": false,
22703
bd6e95cb82b4 branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents: 19305
diff changeset
663 "node": "10ff5895aa5793bd378da574af8cec8ea408d831",
bd6e95cb82b4 branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents: 19305
diff changeset
664 "rev": 7
bd6e95cb82b4 branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents: 19305
diff changeset
665 },
bd6e95cb82b4 branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents: 19305
diff changeset
666 {
22705
d4869b280cd6 branches: include active, closed and current flags in template output
Yuya Nishihara <yuya@tcha.org>
parents: 22704
diff changeset
667 "active": false,
34074
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
668 "branch": "m",
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
669 "closed": false,
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
670 "current": false,
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
671 "node": "df343b0df04feb2a946cd4b6e9520e552fef14ee",
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
672 "rev": 17
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
673 },
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
674 {
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
675 "active": false,
22703
bd6e95cb82b4 branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents: 19305
diff changeset
676 "branch": "c",
22705
d4869b280cd6 branches: include active, closed and current flags in template output
Yuya Nishihara <yuya@tcha.org>
parents: 22704
diff changeset
677 "closed": true,
d4869b280cd6 branches: include active, closed and current flags in template output
Yuya Nishihara <yuya@tcha.org>
parents: 22704
diff changeset
678 "current": false,
22703
bd6e95cb82b4 branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents: 19305
diff changeset
679 "node": "f894c25619d3f1484639d81be950e0a07bc6f1f6",
bd6e95cb82b4 branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents: 19305
diff changeset
680 "rev": 14
bd6e95cb82b4 branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents: 19305
diff changeset
681 },
bd6e95cb82b4 branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents: 19305
diff changeset
682 {
22705
d4869b280cd6 branches: include active, closed and current flags in template output
Yuya Nishihara <yuya@tcha.org>
parents: 22704
diff changeset
683 "active": false,
22703
bd6e95cb82b4 branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents: 19305
diff changeset
684 "branch": "a",
22705
d4869b280cd6 branches: include active, closed and current flags in template output
Yuya Nishihara <yuya@tcha.org>
parents: 22704
diff changeset
685 "closed": false,
d4869b280cd6 branches: include active, closed and current flags in template output
Yuya Nishihara <yuya@tcha.org>
parents: 22704
diff changeset
686 "current": false,
22703
bd6e95cb82b4 branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents: 19305
diff changeset
687 "node": "d8cbc61dbaa6dc817175d1e301eecb863f280832",
bd6e95cb82b4 branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents: 19305
diff changeset
688 "rev": 5
bd6e95cb82b4 branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents: 19305
diff changeset
689 },
bd6e95cb82b4 branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents: 19305
diff changeset
690 {
22705
d4869b280cd6 branches: include active, closed and current flags in template output
Yuya Nishihara <yuya@tcha.org>
parents: 22704
diff changeset
691 "active": false,
22703
bd6e95cb82b4 branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents: 19305
diff changeset
692 "branch": "default",
22705
d4869b280cd6 branches: include active, closed and current flags in template output
Yuya Nishihara <yuya@tcha.org>
parents: 22704
diff changeset
693 "closed": false,
d4869b280cd6 branches: include active, closed and current flags in template output
Yuya Nishihara <yuya@tcha.org>
parents: 22704
diff changeset
694 "current": false,
22703
bd6e95cb82b4 branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents: 19305
diff changeset
695 "node": "19709c5a4e75bf938f8e349aff97438539bb729e",
bd6e95cb82b4 branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents: 19305
diff changeset
696 "rev": 0
bd6e95cb82b4 branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents: 19305
diff changeset
697 }
bd6e95cb82b4 branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents: 19305
diff changeset
698 ]
bd6e95cb82b4 branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents: 19305
diff changeset
699
29816
034412ca28c3 templater: fix if() to not evaluate False as bool('False')
Yuya Nishihara <yuya@tcha.org>
parents: 29744
diff changeset
700 $ hg branches --closed -T '{if(closed, "{branch}\n")}'
034412ca28c3 templater: fix if() to not evaluate False as bool('False')
Yuya Nishihara <yuya@tcha.org>
parents: 29744
diff changeset
701 c
23861
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
702
31173
052e4f1ffce9 branches: populate all template keywords in formatter
Yuya Nishihara <yuya@tcha.org>
parents: 29816
diff changeset
703 $ hg branches -T '{word(0, branch)}: {desc|firstline}\n'
34074
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
704 md: merge head 2
31173
052e4f1ffce9 branches: populate all template keywords in formatter
Yuya Nishihara <yuya@tcha.org>
parents: 29816
diff changeset
705 b: reopen branch with a change
052e4f1ffce9 branches: populate all template keywords in formatter
Yuya Nishihara <yuya@tcha.org>
parents: 29816
diff changeset
706 a: Adding d branch
34074
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
707 m: head 2
31173
052e4f1ffce9 branches: populate all template keywords in formatter
Yuya Nishihara <yuya@tcha.org>
parents: 29816
diff changeset
708 a: Adding b branch head 2
052e4f1ffce9 branches: populate all template keywords in formatter
Yuya Nishihara <yuya@tcha.org>
parents: 29816
diff changeset
709 default: Adding root node
052e4f1ffce9 branches: populate all template keywords in formatter
Yuya Nishihara <yuya@tcha.org>
parents: 29816
diff changeset
710
32949
13eebc189ff3 formatter: add support for docheader and docfooter templates
Yuya Nishihara <yuya@tcha.org>
parents: 31454
diff changeset
711 $ cat <<'EOF' > "$TESTTMP/map-myjson"
13eebc189ff3 formatter: add support for docheader and docfooter templates
Yuya Nishihara <yuya@tcha.org>
parents: 31454
diff changeset
712 > docheader = '\{\n'
13eebc189ff3 formatter: add support for docheader and docfooter templates
Yuya Nishihara <yuya@tcha.org>
parents: 31454
diff changeset
713 > docfooter = '\n}\n'
32950
5100ce217dfa formatter: add support for separator template
Yuya Nishihara <yuya@tcha.org>
parents: 32949
diff changeset
714 > separator = ',\n'
5100ce217dfa formatter: add support for separator template
Yuya Nishihara <yuya@tcha.org>
parents: 32949
diff changeset
715 > branches = ' {dict(branch, node|short)|json}'
32949
13eebc189ff3 formatter: add support for docheader and docfooter templates
Yuya Nishihara <yuya@tcha.org>
parents: 31454
diff changeset
716 > EOF
13eebc189ff3 formatter: add support for docheader and docfooter templates
Yuya Nishihara <yuya@tcha.org>
parents: 31454
diff changeset
717 $ hg branches -T "$TESTTMP/map-myjson"
13eebc189ff3 formatter: add support for docheader and docfooter templates
Yuya Nishihara <yuya@tcha.org>
parents: 31454
diff changeset
718 {
34074
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
719 {"branch": "md", "node": "c914c99f1fbb"},
32949
13eebc189ff3 formatter: add support for docheader and docfooter templates
Yuya Nishihara <yuya@tcha.org>
parents: 31454
diff changeset
720 {"branch": "b", "node": "e23b5505d1ad"},
13eebc189ff3 formatter: add support for docheader and docfooter templates
Yuya Nishihara <yuya@tcha.org>
parents: 31454
diff changeset
721 {"branch": "a branch *", "node": "10ff5895aa57"}, (glob)
34074
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
722 {"branch": "m", "node": "df343b0df04f"},
32949
13eebc189ff3 formatter: add support for docheader and docfooter templates
Yuya Nishihara <yuya@tcha.org>
parents: 31454
diff changeset
723 {"branch": "a", "node": "d8cbc61dbaa6"},
13eebc189ff3 formatter: add support for docheader and docfooter templates
Yuya Nishihara <yuya@tcha.org>
parents: 31454
diff changeset
724 {"branch": "default", "node": "19709c5a4e75"}
13eebc189ff3 formatter: add support for docheader and docfooter templates
Yuya Nishihara <yuya@tcha.org>
parents: 31454
diff changeset
725 }
13eebc189ff3 formatter: add support for docheader and docfooter templates
Yuya Nishihara <yuya@tcha.org>
parents: 31454
diff changeset
726
32952
61b60b28c381 formatter: add support for parts map of [templates] section
Yuya Nishihara <yuya@tcha.org>
parents: 32950
diff changeset
727 $ cat <<'EOF' >> .hg/hgrc
61b60b28c381 formatter: add support for parts map of [templates] section
Yuya Nishihara <yuya@tcha.org>
parents: 32950
diff changeset
728 > [templates]
61b60b28c381 formatter: add support for parts map of [templates] section
Yuya Nishihara <yuya@tcha.org>
parents: 32950
diff changeset
729 > myjson = ' {dict(branch, node|short)|json}'
61b60b28c381 formatter: add support for parts map of [templates] section
Yuya Nishihara <yuya@tcha.org>
parents: 32950
diff changeset
730 > myjson:docheader = '\{\n'
61b60b28c381 formatter: add support for parts map of [templates] section
Yuya Nishihara <yuya@tcha.org>
parents: 32950
diff changeset
731 > myjson:docfooter = '\n}\n'
61b60b28c381 formatter: add support for parts map of [templates] section
Yuya Nishihara <yuya@tcha.org>
parents: 32950
diff changeset
732 > myjson:separator = ',\n'
61b60b28c381 formatter: add support for parts map of [templates] section
Yuya Nishihara <yuya@tcha.org>
parents: 32950
diff changeset
733 > EOF
61b60b28c381 formatter: add support for parts map of [templates] section
Yuya Nishihara <yuya@tcha.org>
parents: 32950
diff changeset
734 $ hg branches -T myjson
61b60b28c381 formatter: add support for parts map of [templates] section
Yuya Nishihara <yuya@tcha.org>
parents: 32950
diff changeset
735 {
34074
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
736 {"branch": "md", "node": "c914c99f1fbb"},
32952
61b60b28c381 formatter: add support for parts map of [templates] section
Yuya Nishihara <yuya@tcha.org>
parents: 32950
diff changeset
737 {"branch": "b", "node": "e23b5505d1ad"},
61b60b28c381 formatter: add support for parts map of [templates] section
Yuya Nishihara <yuya@tcha.org>
parents: 32950
diff changeset
738 {"branch": "a branch *", "node": "10ff5895aa57"}, (glob)
34074
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
739 {"branch": "m", "node": "df343b0df04f"},
32952
61b60b28c381 formatter: add support for parts map of [templates] section
Yuya Nishihara <yuya@tcha.org>
parents: 32950
diff changeset
740 {"branch": "a", "node": "d8cbc61dbaa6"},
61b60b28c381 formatter: add support for parts map of [templates] section
Yuya Nishihara <yuya@tcha.org>
parents: 32950
diff changeset
741 {"branch": "default", "node": "19709c5a4e75"}
61b60b28c381 formatter: add support for parts map of [templates] section
Yuya Nishihara <yuya@tcha.org>
parents: 32950
diff changeset
742 }
61b60b28c381 formatter: add support for parts map of [templates] section
Yuya Nishihara <yuya@tcha.org>
parents: 32950
diff changeset
743
61b60b28c381 formatter: add support for parts map of [templates] section
Yuya Nishihara <yuya@tcha.org>
parents: 32950
diff changeset
744 $ cat <<'EOF' >> .hg/hgrc
61b60b28c381 formatter: add support for parts map of [templates] section
Yuya Nishihara <yuya@tcha.org>
parents: 32950
diff changeset
745 > [templates]
61b60b28c381 formatter: add support for parts map of [templates] section
Yuya Nishihara <yuya@tcha.org>
parents: 32950
diff changeset
746 > :docheader = 'should not be selected as a docheader for literal templates\n'
61b60b28c381 formatter: add support for parts map of [templates] section
Yuya Nishihara <yuya@tcha.org>
parents: 32950
diff changeset
747 > EOF
61b60b28c381 formatter: add support for parts map of [templates] section
Yuya Nishihara <yuya@tcha.org>
parents: 32950
diff changeset
748 $ hg branches -T '{branch}\n'
34074
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
749 md
32952
61b60b28c381 formatter: add support for parts map of [templates] section
Yuya Nishihara <yuya@tcha.org>
parents: 32950
diff changeset
750 b
61b60b28c381 formatter: add support for parts map of [templates] section
Yuya Nishihara <yuya@tcha.org>
parents: 32950
diff changeset
751 a branch name much longer than the default justification used by branches
34074
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
752 m
32952
61b60b28c381 formatter: add support for parts map of [templates] section
Yuya Nishihara <yuya@tcha.org>
parents: 32950
diff changeset
753 a
61b60b28c381 formatter: add support for parts map of [templates] section
Yuya Nishihara <yuya@tcha.org>
parents: 32950
diff changeset
754 default
61b60b28c381 formatter: add support for parts map of [templates] section
Yuya Nishihara <yuya@tcha.org>
parents: 32950
diff changeset
755
23861
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
756 Tests of revision branch name caching
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
757
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
758 We rev branch cache is updated automatically. In these tests we use a trick to
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
759 trigger rebuilds. We remove the branch head cache and run 'hg head' to cause a
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
760 rebuild that also will populate the rev branch cache.
23787
678f53865c68 revset: use localrepo revbranchcache for branch name filtering
Mads Kiilerich <madski@unity3d.com>
parents: 23172
diff changeset
761
23861
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
762 revision branch cache is created when building the branch head cache
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
763 $ rm -rf .hg/cache; hg head a -T '{rev}\n'
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
764 5
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
765 $ f --hexdump --size .hg/cache/rbc-*
34074
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
766 .hg/cache/rbc-names-v1: size=92
23861
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
767 0000: 64 65 66 61 75 6c 74 00 61 00 62 00 63 00 61 20 |default.a.b.c.a |
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
768 0010: 62 72 61 6e 63 68 20 6e 61 6d 65 20 6d 75 63 68 |branch name much|
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
769 0020: 20 6c 6f 6e 67 65 72 20 74 68 61 6e 20 74 68 65 | longer than the|
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
770 0030: 20 64 65 66 61 75 6c 74 20 6a 75 73 74 69 66 69 | default justifi|
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
771 0040: 63 61 74 69 6f 6e 20 75 73 65 64 20 62 79 20 62 |cation used by b|
34074
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
772 0050: 72 61 6e 63 68 65 73 00 6d 00 6d 64 |ranches.m.md|
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
773 .hg/cache/rbc-revs-v1: size=160
23861
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
774 0000: 19 70 9c 5a 00 00 00 00 dd 6b 44 0d 00 00 00 01 |.p.Z.....kD.....|
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
775 0010: 88 1f e2 b9 00 00 00 01 ac 22 03 33 00 00 00 02 |.........".3....|
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
776 0020: ae e3 9c d1 00 00 00 02 d8 cb c6 1d 00 00 00 01 |................|
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
777 0030: 58 97 36 a2 00 00 00 03 10 ff 58 95 00 00 00 04 |X.6.......X.....|
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
778 0040: ee bb 94 44 00 00 00 02 5f 40 61 bb 00 00 00 02 |...D...._@a.....|
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
779 0050: bf be 84 1b 00 00 00 02 d3 f1 63 45 80 00 00 02 |..........cE....|
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
780 0060: e3 d4 9c 05 80 00 00 02 e2 3b 55 05 00 00 00 02 |.........;U.....|
34074
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
781 0070: f8 94 c2 56 80 00 00 03 f3 44 76 37 00 00 00 05 |...V.....Dv7....|
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
782 0080: a5 8c a5 d3 00 00 00 05 df 34 3b 0d 00 00 00 05 |.........4;.....|
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
783 0090: c9 14 c9 9f 00 00 00 06 cd 21 a8 0b 80 00 00 05 |.........!......|
24372
577f65cf1a57 revbranchcache: add test for when the cache is not writable
Durham Goode <durham@fb.com>
parents: 23862
diff changeset
784
577f65cf1a57 revbranchcache: add test for when the cache is not writable
Durham Goode <durham@fb.com>
parents: 23862
diff changeset
785 no errors when revbranchcache is not writable
577f65cf1a57 revbranchcache: add test for when the cache is not writable
Durham Goode <durham@fb.com>
parents: 23862
diff changeset
786
577f65cf1a57 revbranchcache: add test for when the cache is not writable
Durham Goode <durham@fb.com>
parents: 23862
diff changeset
787 $ echo >> .hg/cache/rbc-revs-v1
28145
cfa0037448f4 tests: change branches test to work cross platform
timeless <timeless@mozdev.org>
parents: 25295
diff changeset
788 $ mv .hg/cache/rbc-revs-v1 .hg/cache/rbc-revs-v1_
cfa0037448f4 tests: change branches test to work cross platform
timeless <timeless@mozdev.org>
parents: 25295
diff changeset
789 $ mkdir .hg/cache/rbc-revs-v1
24372
577f65cf1a57 revbranchcache: add test for when the cache is not writable
Durham Goode <durham@fb.com>
parents: 23862
diff changeset
790 $ rm -f .hg/cache/branch* && hg head a -T '{rev}\n'
577f65cf1a57 revbranchcache: add test for when the cache is not writable
Durham Goode <durham@fb.com>
parents: 23862
diff changeset
791 5
28145
cfa0037448f4 tests: change branches test to work cross platform
timeless <timeless@mozdev.org>
parents: 25295
diff changeset
792 $ rmdir .hg/cache/rbc-revs-v1
cfa0037448f4 tests: change branches test to work cross platform
timeless <timeless@mozdev.org>
parents: 25295
diff changeset
793 $ mv .hg/cache/rbc-revs-v1_ .hg/cache/rbc-revs-v1
24372
577f65cf1a57 revbranchcache: add test for when the cache is not writable
Durham Goode <durham@fb.com>
parents: 23862
diff changeset
794
29744
0d588332ad2c branchmap: acquires lock before writting the rev branch cache
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 29615
diff changeset
795 no errors when wlock cannot be acquired
0d588332ad2c branchmap: acquires lock before writting the rev branch cache
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 29615
diff changeset
796
0d588332ad2c branchmap: acquires lock before writting the rev branch cache
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 29615
diff changeset
797 #if unix-permissions
0d588332ad2c branchmap: acquires lock before writting the rev branch cache
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 29615
diff changeset
798 $ mv .hg/cache/rbc-revs-v1 .hg/cache/rbc-revs-v1_
0d588332ad2c branchmap: acquires lock before writting the rev branch cache
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 29615
diff changeset
799 $ rm -f .hg/cache/branch*
0d588332ad2c branchmap: acquires lock before writting the rev branch cache
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 29615
diff changeset
800 $ chmod 555 .hg
0d588332ad2c branchmap: acquires lock before writting the rev branch cache
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 29615
diff changeset
801 $ hg head a -T '{rev}\n'
0d588332ad2c branchmap: acquires lock before writting the rev branch cache
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 29615
diff changeset
802 5
0d588332ad2c branchmap: acquires lock before writting the rev branch cache
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 29615
diff changeset
803 $ chmod 755 .hg
0d588332ad2c branchmap: acquires lock before writting the rev branch cache
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 29615
diff changeset
804 $ mv .hg/cache/rbc-revs-v1_ .hg/cache/rbc-revs-v1
0d588332ad2c branchmap: acquires lock before writting the rev branch cache
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 29615
diff changeset
805 #endif
0d588332ad2c branchmap: acquires lock before writting the rev branch cache
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 29615
diff changeset
806
23861
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
807 recovery from invalid cache revs file with trailing data
23787
678f53865c68 revset: use localrepo revbranchcache for branch name filtering
Mads Kiilerich <madski@unity3d.com>
parents: 23172
diff changeset
808 $ echo >> .hg/cache/rbc-revs-v1
23861
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
809 $ rm -f .hg/cache/branch* && hg head a -T '{rev}\n' --debug
24378
9347c15d8136 revbranchcache: write cache even during read operations
Durham Goode <durham@fb.com>
parents: 24372
diff changeset
810 5
34074
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
811 truncating cache/rbc-revs-v1 to 160
23861
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
812 $ f --size .hg/cache/rbc-revs*
34074
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
813 .hg/cache/rbc-revs-v1: size=160
23861
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
814 recovery from invalid cache file with partial last record
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
815 $ mv .hg/cache/rbc-revs-v1 .
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
816 $ f -qDB 119 rbc-revs-v1 > .hg/cache/rbc-revs-v1
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
817 $ f --size .hg/cache/rbc-revs*
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
818 .hg/cache/rbc-revs-v1: size=119
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
819 $ rm -f .hg/cache/branch* && hg head a -T '{rev}\n' --debug
24378
9347c15d8136 revbranchcache: write cache even during read operations
Durham Goode <durham@fb.com>
parents: 24372
diff changeset
820 5
23862
7aa1405528a3 branchcache: add debug output whenever cache files use truncate
Mads Kiilerich <madski@unity3d.com>
parents: 23861
diff changeset
821 truncating cache/rbc-revs-v1 to 112
23861
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
822 $ f --size .hg/cache/rbc-revs*
34074
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
823 .hg/cache/rbc-revs-v1: size=160
23861
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
824 recovery from invalid cache file with missing record - no truncation
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
825 $ mv .hg/cache/rbc-revs-v1 .
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
826 $ f -qDB 112 rbc-revs-v1 > .hg/cache/rbc-revs-v1
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
827 $ rm -f .hg/cache/branch* && hg head a -T '{rev}\n' --debug
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
828 5
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
829 $ f --size .hg/cache/rbc-revs*
34074
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
830 .hg/cache/rbc-revs-v1: size=160
23861
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
831 recovery from invalid cache file with some bad records
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
832 $ mv .hg/cache/rbc-revs-v1 .
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
833 $ f -qDB 8 rbc-revs-v1 > .hg/cache/rbc-revs-v1
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
834 $ f --size .hg/cache/rbc-revs*
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
835 .hg/cache/rbc-revs-v1: size=8
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
836 $ f -qDB 112 rbc-revs-v1 >> .hg/cache/rbc-revs-v1
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
837 $ f --size .hg/cache/rbc-revs*
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
838 .hg/cache/rbc-revs-v1: size=120
24378
9347c15d8136 revbranchcache: write cache even during read operations
Durham Goode <durham@fb.com>
parents: 24372
diff changeset
839 $ hg log -r 'branch(.)' -T '{rev} ' --debug
29615
a2a380e2750f rbc: fix superfluous rebuilding from scratch - don't abuse self._rbcnamescount
Mads Kiilerich <madski@unity3d.com>
parents: 29614
diff changeset
840 history modification detected - truncating revision branch cache to revision 13
a2a380e2750f rbc: fix superfluous rebuilding from scratch - don't abuse self._rbcnamescount
Mads Kiilerich <madski@unity3d.com>
parents: 29614
diff changeset
841 history modification detected - truncating revision branch cache to revision 1
24378
9347c15d8136 revbranchcache: write cache even during read operations
Durham Goode <durham@fb.com>
parents: 24372
diff changeset
842 3 4 8 9 10 11 12 13 truncating cache/rbc-revs-v1 to 8
23861
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
843 $ rm -f .hg/cache/branch* && hg head a -T '{rev}\n' --debug
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
844 5
24378
9347c15d8136 revbranchcache: write cache even during read operations
Durham Goode <durham@fb.com>
parents: 24372
diff changeset
845 truncating cache/rbc-revs-v1 to 104
23861
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
846 $ f --size --hexdump --bytes=16 .hg/cache/rbc-revs*
34074
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
847 .hg/cache/rbc-revs-v1: size=160
23861
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
848 0000: 19 70 9c 5a 00 00 00 00 dd 6b 44 0d 00 00 00 01 |.p.Z.....kD.....|
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
849 cache is updated when committing
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
850 $ hg branch i-will-regret-this
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
851 marked working directory as branch i-will-regret-this
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
852 $ hg ci -m regrets
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
853 $ f --size .hg/cache/rbc-*
34074
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
854 .hg/cache/rbc-names-v1: size=111
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
855 .hg/cache/rbc-revs-v1: size=168
23861
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
856 update after rollback - the cache will be correct but rbc-names will will still
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
857 contain the branch name even though it no longer is used
23787
678f53865c68 revset: use localrepo revbranchcache for branch name filtering
Mads Kiilerich <madski@unity3d.com>
parents: 23172
diff changeset
858 $ hg up -qr '.^'
678f53865c68 revset: use localrepo revbranchcache for branch name filtering
Mads Kiilerich <madski@unity3d.com>
parents: 23172
diff changeset
859 $ hg rollback -qf
23861
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
860 $ f --size --hexdump .hg/cache/rbc-*
34074
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
861 .hg/cache/rbc-names-v1: size=111
23861
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
862 0000: 64 65 66 61 75 6c 74 00 61 00 62 00 63 00 61 20 |default.a.b.c.a |
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
863 0010: 62 72 61 6e 63 68 20 6e 61 6d 65 20 6d 75 63 68 |branch name much|
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
864 0020: 20 6c 6f 6e 67 65 72 20 74 68 61 6e 20 74 68 65 | longer than the|
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
865 0030: 20 64 65 66 61 75 6c 74 20 6a 75 73 74 69 66 69 | default justifi|
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
866 0040: 63 61 74 69 6f 6e 20 75 73 65 64 20 62 79 20 62 |cation used by b|
34074
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
867 0050: 72 61 6e 63 68 65 73 00 6d 00 6d 64 00 69 2d 77 |ranches.m.md.i-w|
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
868 0060: 69 6c 6c 2d 72 65 67 72 65 74 2d 74 68 69 73 |ill-regret-this|
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
869 .hg/cache/rbc-revs-v1: size=160
23861
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
870 0000: 19 70 9c 5a 00 00 00 00 dd 6b 44 0d 00 00 00 01 |.p.Z.....kD.....|
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
871 0010: 88 1f e2 b9 00 00 00 01 ac 22 03 33 00 00 00 02 |.........".3....|
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
872 0020: ae e3 9c d1 00 00 00 02 d8 cb c6 1d 00 00 00 01 |................|
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
873 0030: 58 97 36 a2 00 00 00 03 10 ff 58 95 00 00 00 04 |X.6.......X.....|
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
874 0040: ee bb 94 44 00 00 00 02 5f 40 61 bb 00 00 00 02 |...D...._@a.....|
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
875 0050: bf be 84 1b 00 00 00 02 d3 f1 63 45 80 00 00 02 |..........cE....|
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
876 0060: e3 d4 9c 05 80 00 00 02 e2 3b 55 05 00 00 00 02 |.........;U.....|
34074
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
877 0070: f8 94 c2 56 80 00 00 03 f3 44 76 37 00 00 00 05 |...V.....Dv7....|
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
878 0080: a5 8c a5 d3 00 00 00 05 df 34 3b 0d 00 00 00 05 |.........4;.....|
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
879 0090: c9 14 c9 9f 00 00 00 06 cd 21 a8 0b 80 00 00 05 |.........!......|
23861
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
880 cache is updated/truncated when stripping - it is thus very hard to get in a
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
881 situation where the cache is out of sync and the hash check detects it
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
882 $ hg --config extensions.strip= strip -r tip --nob
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
883 $ f --size .hg/cache/rbc-revs*
34074
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
884 .hg/cache/rbc-revs-v1: size=152
23787
678f53865c68 revset: use localrepo revbranchcache for branch name filtering
Mads Kiilerich <madski@unity3d.com>
parents: 23172
diff changeset
885
28558
bcd106d456c4 cache: rebuild branch cache from scratch when inconsistencies are detected
Mads Kiilerich <madski@unity3d.com>
parents: 28145
diff changeset
886 cache is rebuilt when corruption is detected
bcd106d456c4 cache: rebuild branch cache from scratch when inconsistencies are detected
Mads Kiilerich <madski@unity3d.com>
parents: 28145
diff changeset
887 $ echo > .hg/cache/rbc-names-v1
bcd106d456c4 cache: rebuild branch cache from scratch when inconsistencies are detected
Mads Kiilerich <madski@unity3d.com>
parents: 28145
diff changeset
888 $ hg log -r '5:&branch(.)' -T '{rev} ' --debug
29615
a2a380e2750f rbc: fix superfluous rebuilding from scratch - don't abuse self._rbcnamescount
Mads Kiilerich <madski@unity3d.com>
parents: 29614
diff changeset
889 referenced branch names not found - rebuilding revision branch cache from scratch
28558
bcd106d456c4 cache: rebuild branch cache from scratch when inconsistencies are detected
Mads Kiilerich <madski@unity3d.com>
parents: 28145
diff changeset
890 8 9 10 11 12 13 truncating cache/rbc-revs-v1 to 40
bcd106d456c4 cache: rebuild branch cache from scratch when inconsistencies are detected
Mads Kiilerich <madski@unity3d.com>
parents: 28145
diff changeset
891 $ f --size --hexdump .hg/cache/rbc-*
34074
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
892 .hg/cache/rbc-names-v1: size=84
28558
bcd106d456c4 cache: rebuild branch cache from scratch when inconsistencies are detected
Mads Kiilerich <madski@unity3d.com>
parents: 28145
diff changeset
893 0000: 62 00 61 00 63 00 61 20 62 72 61 6e 63 68 20 6e |b.a.c.a branch n|
bcd106d456c4 cache: rebuild branch cache from scratch when inconsistencies are detected
Mads Kiilerich <madski@unity3d.com>
parents: 28145
diff changeset
894 0010: 61 6d 65 20 6d 75 63 68 20 6c 6f 6e 67 65 72 20 |ame much longer |
bcd106d456c4 cache: rebuild branch cache from scratch when inconsistencies are detected
Mads Kiilerich <madski@unity3d.com>
parents: 28145
diff changeset
895 0020: 74 68 61 6e 20 74 68 65 20 64 65 66 61 75 6c 74 |than the default|
bcd106d456c4 cache: rebuild branch cache from scratch when inconsistencies are detected
Mads Kiilerich <madski@unity3d.com>
parents: 28145
diff changeset
896 0030: 20 6a 75 73 74 69 66 69 63 61 74 69 6f 6e 20 75 | justification u|
34074
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
897 0040: 73 65 64 20 62 79 20 62 72 61 6e 63 68 65 73 00 |sed by branches.|
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
898 0050: 6d 00 6d 64 |m.md|
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
899 .hg/cache/rbc-revs-v1: size=152
28558
bcd106d456c4 cache: rebuild branch cache from scratch when inconsistencies are detected
Mads Kiilerich <madski@unity3d.com>
parents: 28145
diff changeset
900 0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
bcd106d456c4 cache: rebuild branch cache from scratch when inconsistencies are detected
Mads Kiilerich <madski@unity3d.com>
parents: 28145
diff changeset
901 0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
bcd106d456c4 cache: rebuild branch cache from scratch when inconsistencies are detected
Mads Kiilerich <madski@unity3d.com>
parents: 28145
diff changeset
902 0020: 00 00 00 00 00 00 00 00 d8 cb c6 1d 00 00 00 01 |................|
bcd106d456c4 cache: rebuild branch cache from scratch when inconsistencies are detected
Mads Kiilerich <madski@unity3d.com>
parents: 28145
diff changeset
903 0030: 58 97 36 a2 00 00 00 02 10 ff 58 95 00 00 00 03 |X.6.......X.....|
bcd106d456c4 cache: rebuild branch cache from scratch when inconsistencies are detected
Mads Kiilerich <madski@unity3d.com>
parents: 28145
diff changeset
904 0040: ee bb 94 44 00 00 00 00 5f 40 61 bb 00 00 00 00 |...D...._@a.....|
bcd106d456c4 cache: rebuild branch cache from scratch when inconsistencies are detected
Mads Kiilerich <madski@unity3d.com>
parents: 28145
diff changeset
905 0050: bf be 84 1b 00 00 00 00 d3 f1 63 45 80 00 00 00 |..........cE....|
bcd106d456c4 cache: rebuild branch cache from scratch when inconsistencies are detected
Mads Kiilerich <madski@unity3d.com>
parents: 28145
diff changeset
906 0060: e3 d4 9c 05 80 00 00 00 e2 3b 55 05 00 00 00 00 |.........;U.....|
34074
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
907 0070: f8 94 c2 56 80 00 00 02 f3 44 76 37 00 00 00 04 |...V.....Dv7....|
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
908 0080: a5 8c a5 d3 00 00 00 04 df 34 3b 0d 00 00 00 04 |.........4;.....|
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
909 0090: c9 14 c9 9f 00 00 00 05 |........|
28558
bcd106d456c4 cache: rebuild branch cache from scratch when inconsistencies are detected
Mads Kiilerich <madski@unity3d.com>
parents: 28145
diff changeset
910
29603
b181a650a886 rbc: test case for cache file not growing correctly, causing bad new entries
Mads Kiilerich <madski@unity3d.com>
parents: 28558
diff changeset
911 Test that cache files are created and grows correctly:
b181a650a886 rbc: test case for cache file not growing correctly, causing bad new entries
Mads Kiilerich <madski@unity3d.com>
parents: 28558
diff changeset
912
b181a650a886 rbc: test case for cache file not growing correctly, causing bad new entries
Mads Kiilerich <madski@unity3d.com>
parents: 28558
diff changeset
913 $ rm .hg/cache/rbc*
b181a650a886 rbc: test case for cache file not growing correctly, causing bad new entries
Mads Kiilerich <madski@unity3d.com>
parents: 28558
diff changeset
914 $ hg log -r "5 & branch(5)" -T "{rev}\n"
b181a650a886 rbc: test case for cache file not growing correctly, causing bad new entries
Mads Kiilerich <madski@unity3d.com>
parents: 28558
diff changeset
915 5
b181a650a886 rbc: test case for cache file not growing correctly, causing bad new entries
Mads Kiilerich <madski@unity3d.com>
parents: 28558
diff changeset
916 $ f --size --hexdump .hg/cache/rbc-*
b181a650a886 rbc: test case for cache file not growing correctly, causing bad new entries
Mads Kiilerich <madski@unity3d.com>
parents: 28558
diff changeset
917 .hg/cache/rbc-names-v1: size=1
b181a650a886 rbc: test case for cache file not growing correctly, causing bad new entries
Mads Kiilerich <madski@unity3d.com>
parents: 28558
diff changeset
918 0000: 61 |a|
34074
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
919 .hg/cache/rbc-revs-v1: size=152
29604
db0095c83344 rbc: fix invalid rbc-revs entries caused by missing cache growth
Mads Kiilerich <madski@unity3d.com>
parents: 29603
diff changeset
920 0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
db0095c83344 rbc: fix invalid rbc-revs entries caused by missing cache growth
Mads Kiilerich <madski@unity3d.com>
parents: 29603
diff changeset
921 0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
db0095c83344 rbc: fix invalid rbc-revs entries caused by missing cache growth
Mads Kiilerich <madski@unity3d.com>
parents: 29603
diff changeset
922 0020: 00 00 00 00 00 00 00 00 d8 cb c6 1d 00 00 00 00 |................|
db0095c83344 rbc: fix invalid rbc-revs entries caused by missing cache growth
Mads Kiilerich <madski@unity3d.com>
parents: 29603
diff changeset
923 0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
db0095c83344 rbc: fix invalid rbc-revs entries caused by missing cache growth
Mads Kiilerich <madski@unity3d.com>
parents: 29603
diff changeset
924 0040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
db0095c83344 rbc: fix invalid rbc-revs entries caused by missing cache growth
Mads Kiilerich <madski@unity3d.com>
parents: 29603
diff changeset
925 0050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
db0095c83344 rbc: fix invalid rbc-revs entries caused by missing cache growth
Mads Kiilerich <madski@unity3d.com>
parents: 29603
diff changeset
926 0060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
34074
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
927 0070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
928 0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
abf91c4f9608 branches: correctly show inactive multiheaded branches
the31k <the31k@thethirty.one>
parents: 32952
diff changeset
929 0090: 00 00 00 00 00 00 00 00 |........|
29603
b181a650a886 rbc: test case for cache file not growing correctly, causing bad new entries
Mads Kiilerich <madski@unity3d.com>
parents: 28558
diff changeset
930
16913
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 16612
diff changeset
931 $ cd ..
29614
5c79bae8166f rbc: test case for incorrect and too aggressive invalidation of invalid caches
Mads Kiilerich <madski@unity3d.com>
parents: 29604
diff changeset
932
5c79bae8166f rbc: test case for incorrect and too aggressive invalidation of invalid caches
Mads Kiilerich <madski@unity3d.com>
parents: 29604
diff changeset
933 Test for multiple incorrect branch cache entries:
5c79bae8166f rbc: test case for incorrect and too aggressive invalidation of invalid caches
Mads Kiilerich <madski@unity3d.com>
parents: 29604
diff changeset
934
5c79bae8166f rbc: test case for incorrect and too aggressive invalidation of invalid caches
Mads Kiilerich <madski@unity3d.com>
parents: 29604
diff changeset
935 $ hg init b
5c79bae8166f rbc: test case for incorrect and too aggressive invalidation of invalid caches
Mads Kiilerich <madski@unity3d.com>
parents: 29604
diff changeset
936 $ cd b
5c79bae8166f rbc: test case for incorrect and too aggressive invalidation of invalid caches
Mads Kiilerich <madski@unity3d.com>
parents: 29604
diff changeset
937 $ touch f
5c79bae8166f rbc: test case for incorrect and too aggressive invalidation of invalid caches
Mads Kiilerich <madski@unity3d.com>
parents: 29604
diff changeset
938 $ hg ci -Aqmf
5c79bae8166f rbc: test case for incorrect and too aggressive invalidation of invalid caches
Mads Kiilerich <madski@unity3d.com>
parents: 29604
diff changeset
939 $ echo >> f
5c79bae8166f rbc: test case for incorrect and too aggressive invalidation of invalid caches
Mads Kiilerich <madski@unity3d.com>
parents: 29604
diff changeset
940 $ hg ci -Amf
5c79bae8166f rbc: test case for incorrect and too aggressive invalidation of invalid caches
Mads Kiilerich <madski@unity3d.com>
parents: 29604
diff changeset
941 $ hg branch -q branch
5c79bae8166f rbc: test case for incorrect and too aggressive invalidation of invalid caches
Mads Kiilerich <madski@unity3d.com>
parents: 29604
diff changeset
942 $ hg ci -Amf
5c79bae8166f rbc: test case for incorrect and too aggressive invalidation of invalid caches
Mads Kiilerich <madski@unity3d.com>
parents: 29604
diff changeset
943
5c79bae8166f rbc: test case for incorrect and too aggressive invalidation of invalid caches
Mads Kiilerich <madski@unity3d.com>
parents: 29604
diff changeset
944 $ f --size --hexdump .hg/cache/rbc-*
5c79bae8166f rbc: test case for incorrect and too aggressive invalidation of invalid caches
Mads Kiilerich <madski@unity3d.com>
parents: 29604
diff changeset
945 .hg/cache/rbc-names-v1: size=14
5c79bae8166f rbc: test case for incorrect and too aggressive invalidation of invalid caches
Mads Kiilerich <madski@unity3d.com>
parents: 29604
diff changeset
946 0000: 64 65 66 61 75 6c 74 00 62 72 61 6e 63 68 |default.branch|
5c79bae8166f rbc: test case for incorrect and too aggressive invalidation of invalid caches
Mads Kiilerich <madski@unity3d.com>
parents: 29604
diff changeset
947 .hg/cache/rbc-revs-v1: size=24
5c79bae8166f rbc: test case for incorrect and too aggressive invalidation of invalid caches
Mads Kiilerich <madski@unity3d.com>
parents: 29604
diff changeset
948 0000: 66 e5 f5 aa 00 00 00 00 fa 4c 04 e5 00 00 00 00 |f........L......|
5c79bae8166f rbc: test case for incorrect and too aggressive invalidation of invalid caches
Mads Kiilerich <madski@unity3d.com>
parents: 29604
diff changeset
949 0010: 56 46 78 69 00 00 00 01 |VFxi....|
5c79bae8166f rbc: test case for incorrect and too aggressive invalidation of invalid caches
Mads Kiilerich <madski@unity3d.com>
parents: 29604
diff changeset
950 $ : > .hg/cache/rbc-revs-v1
5c79bae8166f rbc: test case for incorrect and too aggressive invalidation of invalid caches
Mads Kiilerich <madski@unity3d.com>
parents: 29604
diff changeset
951
29615
a2a380e2750f rbc: fix superfluous rebuilding from scratch - don't abuse self._rbcnamescount
Mads Kiilerich <madski@unity3d.com>
parents: 29614
diff changeset
952 No superfluous rebuilding of cache:
29614
5c79bae8166f rbc: test case for incorrect and too aggressive invalidation of invalid caches
Mads Kiilerich <madski@unity3d.com>
parents: 29604
diff changeset
953 $ hg log -r "branch(null)&branch(branch)" --debug
5c79bae8166f rbc: test case for incorrect and too aggressive invalidation of invalid caches
Mads Kiilerich <madski@unity3d.com>
parents: 29604
diff changeset
954 $ f --size --hexdump .hg/cache/rbc-*
5c79bae8166f rbc: test case for incorrect and too aggressive invalidation of invalid caches
Mads Kiilerich <madski@unity3d.com>
parents: 29604
diff changeset
955 .hg/cache/rbc-names-v1: size=14
5c79bae8166f rbc: test case for incorrect and too aggressive invalidation of invalid caches
Mads Kiilerich <madski@unity3d.com>
parents: 29604
diff changeset
956 0000: 64 65 66 61 75 6c 74 00 62 72 61 6e 63 68 |default.branch|
5c79bae8166f rbc: test case for incorrect and too aggressive invalidation of invalid caches
Mads Kiilerich <madski@unity3d.com>
parents: 29604
diff changeset
957 .hg/cache/rbc-revs-v1: size=24
29615
a2a380e2750f rbc: fix superfluous rebuilding from scratch - don't abuse self._rbcnamescount
Mads Kiilerich <madski@unity3d.com>
parents: 29614
diff changeset
958 0000: 66 e5 f5 aa 00 00 00 00 fa 4c 04 e5 00 00 00 00 |f........L......|
29614
5c79bae8166f rbc: test case for incorrect and too aggressive invalidation of invalid caches
Mads Kiilerich <madski@unity3d.com>
parents: 29604
diff changeset
959 0010: 56 46 78 69 00 00 00 01 |VFxi....|
5c79bae8166f rbc: test case for incorrect and too aggressive invalidation of invalid caches
Mads Kiilerich <madski@unity3d.com>
parents: 29604
diff changeset
960
5c79bae8166f rbc: test case for incorrect and too aggressive invalidation of invalid caches
Mads Kiilerich <madski@unity3d.com>
parents: 29604
diff changeset
961 $ cd ..
42201
258821f2d465 branch: add tests which shows branch can be closed from a non-branchhead cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41064
diff changeset
962
258821f2d465 branch: add tests which shows branch can be closed from a non-branchhead cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41064
diff changeset
963 Test to make sure that `--close-branch` only works on a branch head:
258821f2d465 branch: add tests which shows branch can be closed from a non-branchhead cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41064
diff changeset
964 --------------------------------------------------------------------
258821f2d465 branch: add tests which shows branch can be closed from a non-branchhead cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41064
diff changeset
965 $ hg init closebranch
258821f2d465 branch: add tests which shows branch can be closed from a non-branchhead cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41064
diff changeset
966 $ cd closebranch
258821f2d465 branch: add tests which shows branch can be closed from a non-branchhead cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41064
diff changeset
967 $ for ch in a b c; do
258821f2d465 branch: add tests which shows branch can be closed from a non-branchhead cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41064
diff changeset
968 > echo $ch > $ch
258821f2d465 branch: add tests which shows branch can be closed from a non-branchhead cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41064
diff changeset
969 > hg add $ch
258821f2d465 branch: add tests which shows branch can be closed from a non-branchhead cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41064
diff changeset
970 > hg ci -m "added "$ch
258821f2d465 branch: add tests which shows branch can be closed from a non-branchhead cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41064
diff changeset
971 > done;
258821f2d465 branch: add tests which shows branch can be closed from a non-branchhead cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41064
diff changeset
972
258821f2d465 branch: add tests which shows branch can be closed from a non-branchhead cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41064
diff changeset
973 $ hg up -r "desc('added b')"
258821f2d465 branch: add tests which shows branch can be closed from a non-branchhead cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41064
diff changeset
974 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
258821f2d465 branch: add tests which shows branch can be closed from a non-branchhead cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41064
diff changeset
975
258821f2d465 branch: add tests which shows branch can be closed from a non-branchhead cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41064
diff changeset
976 trying to close branch from a cset which is not a branch head
258821f2d465 branch: add tests which shows branch can be closed from a non-branchhead cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41064
diff changeset
977 it should abort:
258821f2d465 branch: add tests which shows branch can be closed from a non-branchhead cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41064
diff changeset
978 $ hg ci -m "closing branch" --close-branch
42202
8d14d91584f1 branch: abort if closing branch from a non-branchhead cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 42201
diff changeset
979 abort: can only close branch heads
42542
2e1d9414ff71 commit: add --force-close-branch flag to close a non-head changeset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 42493
diff changeset
980 (use --force-close-branch to close branch from a non-head changeset)
45827
8d72e29ad1e0 errors: introduce InputError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 42542
diff changeset
981 [10]
42201
258821f2d465 branch: add tests which shows branch can be closed from a non-branchhead cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41064
diff changeset
982
258821f2d465 branch: add tests which shows branch can be closed from a non-branchhead cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41064
diff changeset
983 $ hg up 0
258821f2d465 branch: add tests which shows branch can be closed from a non-branchhead cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41064
diff changeset
984 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
258821f2d465 branch: add tests which shows branch can be closed from a non-branchhead cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41064
diff changeset
985 $ hg log -GT "{rev}: {node|short} {desc|firstline}\n\t{branch}\n\n"
42202
8d14d91584f1 branch: abort if closing branch from a non-branchhead cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 42201
diff changeset
986 o 2: 155349b645be added c
42201
258821f2d465 branch: add tests which shows branch can be closed from a non-branchhead cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41064
diff changeset
987 | default
258821f2d465 branch: add tests which shows branch can be closed from a non-branchhead cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41064
diff changeset
988 |
258821f2d465 branch: add tests which shows branch can be closed from a non-branchhead cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41064
diff changeset
989 o 1: 5f6d8a4bf34a added b
258821f2d465 branch: add tests which shows branch can be closed from a non-branchhead cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41064
diff changeset
990 | default
258821f2d465 branch: add tests which shows branch can be closed from a non-branchhead cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41064
diff changeset
991 |
258821f2d465 branch: add tests which shows branch can be closed from a non-branchhead cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41064
diff changeset
992 @ 0: 9092f1db7931 added a
258821f2d465 branch: add tests which shows branch can be closed from a non-branchhead cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41064
diff changeset
993 default
258821f2d465 branch: add tests which shows branch can be closed from a non-branchhead cset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41064
diff changeset
994
42542
2e1d9414ff71 commit: add --force-close-branch flag to close a non-head changeset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 42493
diff changeset
995 Test --force-close-branch to close a branch from a non-head changeset:
2e1d9414ff71 commit: add --force-close-branch flag to close a non-head changeset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 42493
diff changeset
996 ---------------------------------------------------------------------
2e1d9414ff71 commit: add --force-close-branch flag to close a non-head changeset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 42493
diff changeset
997
2e1d9414ff71 commit: add --force-close-branch flag to close a non-head changeset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 42493
diff changeset
998 $ hg show stack --config extensions.show=
2e1d9414ff71 commit: add --force-close-branch flag to close a non-head changeset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 42493
diff changeset
999 o 1553 added c
2e1d9414ff71 commit: add --force-close-branch flag to close a non-head changeset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 42493
diff changeset
1000 o 5f6d added b
2e1d9414ff71 commit: add --force-close-branch flag to close a non-head changeset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 42493
diff changeset
1001 @ 9092 added a
2e1d9414ff71 commit: add --force-close-branch flag to close a non-head changeset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 42493
diff changeset
1002
2e1d9414ff71 commit: add --force-close-branch flag to close a non-head changeset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 42493
diff changeset
1003 $ hg ci -m "branch closed" --close-branch
2e1d9414ff71 commit: add --force-close-branch flag to close a non-head changeset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 42493
diff changeset
1004 abort: can only close branch heads
2e1d9414ff71 commit: add --force-close-branch flag to close a non-head changeset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 42493
diff changeset
1005 (use --force-close-branch to close branch from a non-head changeset)
45827
8d72e29ad1e0 errors: introduce InputError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 42542
diff changeset
1006 [10]
42542
2e1d9414ff71 commit: add --force-close-branch flag to close a non-head changeset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 42493
diff changeset
1007
2e1d9414ff71 commit: add --force-close-branch flag to close a non-head changeset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 42493
diff changeset
1008 $ hg ci -m "branch closed" --force-close-branch
2e1d9414ff71 commit: add --force-close-branch flag to close a non-head changeset
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 42493
diff changeset
1009 created new head
46254
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1010 $ cd ..
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1011
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1012 Test various special cases for the branchmap
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1013 --------------------------------------------
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1014
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1015 Basic fork of the same branch
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1016
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1017 $ hg init branchmap-testing1
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1018 $ cd branchmap-testing1
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1019 $ hg debugbuild '@A . :base . :p1 *base /p1'
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1020 $ hg log -G
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1021 o changeset: 3:71ca9a6d524e
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1022 |\ branch: A
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1023 | | tag: tip
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1024 | | parent: 2:a3b807b3ff0b
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1025 | | parent: 1:99ba08759bc7
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1026 | | user: debugbuilddag
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1027 | | date: Thu Jan 01 00:00:03 1970 +0000
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1028 | | summary: r3
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1029 | |
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1030 | o changeset: 2:a3b807b3ff0b
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1031 | | branch: A
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1032 | | parent: 0:2ab8003a1750
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1033 | | user: debugbuilddag
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1034 | | date: Thu Jan 01 00:00:02 1970 +0000
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1035 | | summary: r2
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1036 | |
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1037 o | changeset: 1:99ba08759bc7
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1038 |/ branch: A
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1039 | tag: p1
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1040 | user: debugbuilddag
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1041 | date: Thu Jan 01 00:00:01 1970 +0000
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1042 | summary: r1
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1043 |
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1044 o changeset: 0:2ab8003a1750
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1045 branch: A
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1046 tag: base
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1047 user: debugbuilddag
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1048 date: Thu Jan 01 00:00:00 1970 +0000
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1049 summary: r0
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1050
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1051 $ hg branches
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1052 A 3:71ca9a6d524e
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1053 $ hg clone -r 1 -r 2 . ../branchmap-testing1-clone
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1054 adding changesets
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1055 adding manifests
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1056 adding file changes
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1057 added 3 changesets with 0 changes to 0 files (+1 heads)
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1058 new changesets 2ab8003a1750:a3b807b3ff0b
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1059 updating to branch A
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1060 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1061 $ cd ../branchmap-testing1-clone
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1062 $ hg pull ../branchmap-testing1
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1063 pulling from ../branchmap-testing1
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1064 searching for changes
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1065 adding changesets
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1066 adding manifests
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1067 adding file changes
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1068 added 1 changesets with 0 changes to 0 files (-1 heads)
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1069 new changesets 71ca9a6d524e
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1070 (run 'hg update' to get a working copy)
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1071 $ hg branches
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1072 A 3:71ca9a6d524e
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1073 $ cd ..
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1074
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1075 Switching to a different branch and back
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1076
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1077 $ hg init branchmap-testing2
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1078 $ cd branchmap-testing2
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1079 $ hg debugbuild '@A . @B . @A .'
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1080 $ hg log -G
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1081 o changeset: 2:9699e9f260b5
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1082 | branch: A
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1083 | tag: tip
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1084 | user: debugbuilddag
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1085 | date: Thu Jan 01 00:00:02 1970 +0000
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1086 | summary: r2
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1087 |
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1088 o changeset: 1:0bc7d348d965
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1089 | branch: B
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1090 | user: debugbuilddag
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1091 | date: Thu Jan 01 00:00:01 1970 +0000
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1092 | summary: r1
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1093 |
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1094 o changeset: 0:2ab8003a1750
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1095 branch: A
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1096 user: debugbuilddag
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1097 date: Thu Jan 01 00:00:00 1970 +0000
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1098 summary: r0
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1099
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1100 $ hg branches
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1101 A 2:9699e9f260b5
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1102 B 1:0bc7d348d965 (inactive)
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1103 $ hg clone -r 1 . ../branchmap-testing2-clone
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1104 adding changesets
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1105 adding manifests
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1106 adding file changes
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1107 added 2 changesets with 0 changes to 0 files
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1108 new changesets 2ab8003a1750:0bc7d348d965
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1109 updating to branch B
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1110 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1111 $ cd ../branchmap-testing2-clone
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1112 $ hg pull ../branchmap-testing2
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1113 pulling from ../branchmap-testing2
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1114 searching for changes
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1115 adding changesets
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1116 adding manifests
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1117 adding file changes
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1118 added 1 changesets with 0 changes to 0 files
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1119 new changesets 9699e9f260b5
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1120 (run 'hg update' to get a working copy)
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1121 $ hg branches
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1122 A 2:9699e9f260b5
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1123 B 1:0bc7d348d965 (inactive)
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1124 $ cd ..
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1125
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1126 A fork on a branch switching to a different branch and back
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1127 is still collecting the fork.
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1128
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1129 $ hg init branchmap-testing3
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1130 $ cd branchmap-testing3
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1131 $ hg debugbuild '@A . :base . :p1 *base @B . @A /p1'
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1132 $ hg log -G
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1133 o changeset: 4:3614a1711d23
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1134 |\ branch: A
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1135 | | tag: tip
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1136 | | parent: 3:e9c8abcf65aa
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1137 | | parent: 1:99ba08759bc7
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1138 | | user: debugbuilddag
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1139 | | date: Thu Jan 01 00:00:04 1970 +0000
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1140 | | summary: r4
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1141 | |
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1142 | o changeset: 3:e9c8abcf65aa
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1143 | | branch: B
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1144 | | user: debugbuilddag
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1145 | | date: Thu Jan 01 00:00:03 1970 +0000
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1146 | | summary: r3
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1147 | |
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1148 | o changeset: 2:a3b807b3ff0b
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1149 | | branch: A
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1150 | | parent: 0:2ab8003a1750
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1151 | | user: debugbuilddag
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1152 | | date: Thu Jan 01 00:00:02 1970 +0000
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1153 | | summary: r2
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1154 | |
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1155 o | changeset: 1:99ba08759bc7
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1156 |/ branch: A
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1157 | tag: p1
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1158 | user: debugbuilddag
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1159 | date: Thu Jan 01 00:00:01 1970 +0000
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1160 | summary: r1
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1161 |
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1162 o changeset: 0:2ab8003a1750
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1163 branch: A
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1164 tag: base
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1165 user: debugbuilddag
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1166 date: Thu Jan 01 00:00:00 1970 +0000
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1167 summary: r0
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1168
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1169 $ hg branches
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1170 A 4:3614a1711d23
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1171 B 3:e9c8abcf65aa (inactive)
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1172 $ hg clone -r 1 -r 3 . ../branchmap-testing3-clone
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1173 adding changesets
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1174 adding manifests
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1175 adding file changes
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1176 added 4 changesets with 0 changes to 0 files (+1 heads)
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1177 new changesets 2ab8003a1750:e9c8abcf65aa
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1178 updating to branch A
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1179 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1180 $ cd ../branchmap-testing3-clone
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1181 $ hg pull ../branchmap-testing3
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1182 pulling from ../branchmap-testing3
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1183 searching for changes
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1184 adding changesets
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1185 adding manifests
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1186 adding file changes
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1187 added 1 changesets with 0 changes to 0 files (-1 heads)
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1188 new changesets 3614a1711d23
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1189 (run 'hg update' to get a working copy)
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1190 $ hg branches
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1191 A 4:3614a1711d23
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1192 B 3:e9c8abcf65aa (inactive)
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1193 $ cd ..
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1194
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1195 Intermediary parents are on different branches.
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1196
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1197 $ hg init branchmap-testing4
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1198 $ cd branchmap-testing4
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1199 $ hg debugbuild '@A . @B :base . @A :p1 *base @C . @A /p1'
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1200 $ hg log -G
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1201 o changeset: 4:4bf67499b70a
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1202 |\ branch: A
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1203 | | tag: tip
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1204 | | parent: 3:4a546028fa8f
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1205 | | parent: 1:0bc7d348d965
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1206 | | user: debugbuilddag
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1207 | | date: Thu Jan 01 00:00:04 1970 +0000
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1208 | | summary: r4
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1209 | |
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1210 | o changeset: 3:4a546028fa8f
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1211 | | branch: C
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1212 | | user: debugbuilddag
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1213 | | date: Thu Jan 01 00:00:03 1970 +0000
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1214 | | summary: r3
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1215 | |
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1216 | o changeset: 2:a3b807b3ff0b
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1217 | | branch: A
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1218 | | parent: 0:2ab8003a1750
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1219 | | user: debugbuilddag
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1220 | | date: Thu Jan 01 00:00:02 1970 +0000
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1221 | | summary: r2
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1222 | |
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1223 o | changeset: 1:0bc7d348d965
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1224 |/ branch: B
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1225 | tag: p1
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1226 | user: debugbuilddag
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1227 | date: Thu Jan 01 00:00:01 1970 +0000
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1228 | summary: r1
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1229 |
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1230 o changeset: 0:2ab8003a1750
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1231 branch: A
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1232 tag: base
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1233 user: debugbuilddag
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1234 date: Thu Jan 01 00:00:00 1970 +0000
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1235 summary: r0
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1236
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1237 $ hg branches
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1238 A 4:4bf67499b70a
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1239 C 3:4a546028fa8f (inactive)
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1240 B 1:0bc7d348d965 (inactive)
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1241 $ hg clone -r 1 -r 3 . ../branchmap-testing4-clone
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1242 adding changesets
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1243 adding manifests
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1244 adding file changes
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1245 added 4 changesets with 0 changes to 0 files (+1 heads)
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1246 new changesets 2ab8003a1750:4a546028fa8f
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1247 updating to branch B
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1248 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1249 $ cd ../branchmap-testing4-clone
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1250 $ hg pull ../branchmap-testing4
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1251 pulling from ../branchmap-testing4
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1252 searching for changes
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1253 adding changesets
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1254 adding manifests
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1255 adding file changes
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1256 added 1 changesets with 0 changes to 0 files (-1 heads)
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1257 new changesets 4bf67499b70a
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1258 (run 'hg update' to get a working copy)
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1259 $ hg branches
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1260 A 4:4bf67499b70a
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1261 C 3:4a546028fa8f (inactive)
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1262 B 1:0bc7d348d965 (inactive)
c4b792fa109e branchmap: avoid ancestor computations in absence of non-continous branches
Joerg Sonnenberger <joerg@bec.de>
parents: 45845
diff changeset
1263 $ cd ..
48675
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1264
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1265 Check that the cache are not written too early
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1266 ----------------------------------------------
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1267
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1268 $ hg log -R branchmap-testing1 -G
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1269 o changeset: 3:71ca9a6d524e
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1270 |\ branch: A
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1271 | | tag: tip
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1272 | | parent: 2:a3b807b3ff0b
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1273 | | parent: 1:99ba08759bc7
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1274 | | user: debugbuilddag
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1275 | | date: Thu Jan 01 00:00:03 1970 +0000
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1276 | | summary: r3
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1277 | |
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1278 | o changeset: 2:a3b807b3ff0b
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1279 | | branch: A
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1280 | | parent: 0:2ab8003a1750
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1281 | | user: debugbuilddag
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1282 | | date: Thu Jan 01 00:00:02 1970 +0000
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1283 | | summary: r2
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1284 | |
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1285 o | changeset: 1:99ba08759bc7
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1286 |/ branch: A
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1287 | tag: p1
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1288 | user: debugbuilddag
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1289 | date: Thu Jan 01 00:00:01 1970 +0000
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1290 | summary: r1
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1291 |
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1292 o changeset: 0:2ab8003a1750
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1293 branch: A
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1294 tag: base
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1295 user: debugbuilddag
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1296 date: Thu Jan 01 00:00:00 1970 +0000
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1297 summary: r0
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1298
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1299 $ hg bundle -R branchmap-testing1 --base 1 bundle.hg --rev 'head()'
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1300 2 changesets found
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1301
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1302 Unbundling revision should warm the served cache
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1303
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1304 $ hg clone branchmap-testing1 --rev 1 branchmap-update-01
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1305 adding changesets
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1306 adding manifests
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1307 adding file changes
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1308 added 2 changesets with 0 changes to 0 files
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1309 new changesets 2ab8003a1750:99ba08759bc7
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1310 updating to branch A
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1311 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1312 $ cat branchmap-update-01/.hg/cache/branch2-served
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1313 99ba08759bc7f6fdbe5304e83d0387f35c082479 1
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1314 99ba08759bc7f6fdbe5304e83d0387f35c082479 o A
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1315 $ hg -R branchmap-update-01 unbundle bundle.hg
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1316 adding changesets
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1317 adding manifests
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1318 adding file changes
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1319 added 2 changesets with 0 changes to 0 files
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1320 new changesets a3b807b3ff0b:71ca9a6d524e (2 drafts)
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1321 (run 'hg update' to get a working copy)
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1322 $ cat branchmap-update-01/.hg/cache/branch2-served
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1323 71ca9a6d524ed3c2a215119b2086ac3b8c4c8286 3
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1324 71ca9a6d524ed3c2a215119b2086ac3b8c4c8286 o A
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1325
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1326 aborted Unbundle should not update the on disk cache
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1327
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1328 $ cat >> simplehook.py << EOF
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1329 > import sys
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1330 > from mercurial import node
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1331 > from mercurial import branchmap
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1332 > def hook(ui, repo, *args, **kwargs):
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1333 > s = repo.filtered(b"served")
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1334 > s.branchmap()
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1335 > return 1
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1336 > EOF
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1337 $ hg clone branchmap-testing1 --rev 1 branchmap-update-02
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1338 adding changesets
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1339 adding manifests
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1340 adding file changes
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1341 added 2 changesets with 0 changes to 0 files
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1342 new changesets 2ab8003a1750:99ba08759bc7
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1343 updating to branch A
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1344 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1345
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1346 $ cat branchmap-update-02/.hg/cache/branch2-served
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1347 99ba08759bc7f6fdbe5304e83d0387f35c082479 1
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1348 99ba08759bc7f6fdbe5304e83d0387f35c082479 o A
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1349 $ hg -R branchmap-update-02 unbundle bundle.hg --config "hooks.pretxnclose=python:$TESTTMP/simplehook.py:hook"
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1350 adding changesets
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1351 adding manifests
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1352 adding file changes
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1353 transaction abort!
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1354 rollback completed
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1355 abort: pretxnclose hook failed
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1356 [40]
6ed7ee9f44db branchmap: Add a test about writing branchmap and aborted transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46254
diff changeset
1357 $ cat branchmap-update-02/.hg/cache/branch2-served
48677
8e5effbf52d0 branchmap: stop writing cache for uncommitted data
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48675
diff changeset
1358 99ba08759bc7f6fdbe5304e83d0387f35c082479 1
8e5effbf52d0 branchmap: stop writing cache for uncommitted data
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48675
diff changeset
1359 99ba08759bc7f6fdbe5304e83d0387f35c082479 o A