annotate tests/test-branches.t @ 24378:9347c15d8136

revbranchcache: write cache even during read operations Previously we would only actually write the revbranchcache to disk if we were in the middle of a write operation (like commit). Now we will also write it during any read operation. The cache knows how to invalidate itself, so it shouldn't become corrupt if multiple writers try at once (and the write-on-read behavior/risk is the same as all our other caches).
author Durham Goode <durham@fb.com>
date Tue, 24 Feb 2015 18:43:31 -0800
parents 577f65cf1a57
children 701df761aa94
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
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
3 $ echo 'root' >root
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
4 $ hg add root
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
5 $ 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
6
11868
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
7 $ echo 'a' >a
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
8 $ hg add a
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
9 $ hg branch a
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
10 marked working directory as branch a
15615
41885892796e branch: warn on branching
Matt Mackall <mpm@selenic.com>
parents: 14162
diff changeset
11 (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
12 $ hg commit -d '1 0' -m "Adding a branch"
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
13
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
14 $ hg branch q
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
15 marked working directory as branch q
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 $ echo 'aa' >a
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
18 $ hg branch -C
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
19 reset working directory to branch a
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
20 $ 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
21
11868
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
22 $ hg update -C 0
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
23 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
24 $ echo 'b' >b
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
25 $ hg add b
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
26 $ hg branch b
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
27 marked working directory as branch b
15615
41885892796e branch: warn on branching
Matt Mackall <mpm@selenic.com>
parents: 14162
diff changeset
28 (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
29 $ hg commit -d '2 0' -m "Adding b branch"
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
30
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
31 $ echo 'bh1' >bh1
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
32 $ hg add bh1
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
33 $ 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
34
11868
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
35 $ hg update -C 2
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
36 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
37 $ echo 'bh2' >bh2
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
38 $ hg add bh2
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
39 $ 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
40
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
41 $ echo 'c' >c
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
42 $ hg add c
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
43 $ hg branch c
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
44 marked working directory as branch c
15615
41885892796e branch: warn on branching
Matt Mackall <mpm@selenic.com>
parents: 14162
diff changeset
45 (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
46 $ hg commit -d '5 0' -m "Adding c branch"
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
47
17821
361ab1e2086f scmutil: add bad character checking to checknewlabel
Kevin Bullock <kbullock@ringworld.org>
parents: 16913
diff changeset
48 reserved names
361ab1e2086f scmutil: add bad character checking to checknewlabel
Kevin Bullock <kbullock@ringworld.org>
parents: 16913
diff changeset
49
11868
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
50 $ hg branch tip
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
51 abort: the name 'tip' is reserved
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 11969
diff changeset
52 [255]
11868
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
53 $ hg branch null
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
54 abort: the name 'null' is reserved
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 11969
diff changeset
55 [255]
11868
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
56 $ hg branch .
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
57 abort: the name '.' is reserved
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 11969
diff changeset
58 [255]
7006
92d44ec32430 branch: added more support for named branches
Sune Foldager <cryo@cyanite.org>
parents: 6815
diff changeset
59
17821
361ab1e2086f scmutil: add bad character checking to checknewlabel
Kevin Bullock <kbullock@ringworld.org>
parents: 16913
diff changeset
60 invalid characters
361ab1e2086f scmutil: add bad character checking to checknewlabel
Kevin Bullock <kbullock@ringworld.org>
parents: 16913
diff changeset
61
361ab1e2086f scmutil: add bad character checking to checknewlabel
Kevin Bullock <kbullock@ringworld.org>
parents: 16913
diff changeset
62 $ hg branch 'foo:bar'
17850
71c1513fd560 scmutil: generalize message to make it more i18n-friendly
Wagner Bruna <wbruna@yahoo.com>
parents: 17821
diff changeset
63 abort: ':' cannot be used in a name
17821
361ab1e2086f scmutil: add bad character checking to checknewlabel
Kevin Bullock <kbullock@ringworld.org>
parents: 16913
diff changeset
64 [255]
361ab1e2086f scmutil: add bad character checking to checknewlabel
Kevin Bullock <kbullock@ringworld.org>
parents: 16913
diff changeset
65
361ab1e2086f scmutil: add bad character checking to checknewlabel
Kevin Bullock <kbullock@ringworld.org>
parents: 16913
diff changeset
66 $ hg branch 'foo
361ab1e2086f scmutil: add bad character checking to checknewlabel
Kevin Bullock <kbullock@ringworld.org>
parents: 16913
diff changeset
67 > bar'
17850
71c1513fd560 scmutil: generalize message to make it more i18n-friendly
Wagner Bruna <wbruna@yahoo.com>
parents: 17821
diff changeset
68 abort: '\n' cannot be used in a name
17821
361ab1e2086f scmutil: add bad character checking to checknewlabel
Kevin Bullock <kbullock@ringworld.org>
parents: 16913
diff changeset
69 [255]
361ab1e2086f scmutil: add bad character checking to checknewlabel
Kevin Bullock <kbullock@ringworld.org>
parents: 16913
diff changeset
70
19180
12dbdd348bb0 branch: strip whitespace before testing known branch name
Yuya Nishihara <yuya@tcha.org>
parents: 18955
diff changeset
71 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
72
12dbdd348bb0 branch: strip whitespace before testing known branch name
Yuya Nishihara <yuya@tcha.org>
parents: 18955
diff changeset
73 $ hg branch 'b '
12dbdd348bb0 branch: strip whitespace before testing known branch name
Yuya Nishihara <yuya@tcha.org>
parents: 18955
diff changeset
74 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
75 (use 'hg update' to switch to it)
12dbdd348bb0 branch: strip whitespace before testing known branch name
Yuya Nishihara <yuya@tcha.org>
parents: 18955
diff changeset
76 [255]
12dbdd348bb0 branch: strip whitespace before testing known branch name
Yuya Nishihara <yuya@tcha.org>
parents: 18955
diff changeset
77
12dbdd348bb0 branch: strip whitespace before testing known branch name
Yuya Nishihara <yuya@tcha.org>
parents: 18955
diff changeset
78 $ hg branch ' b'
12dbdd348bb0 branch: strip whitespace before testing known branch name
Yuya Nishihara <yuya@tcha.org>
parents: 18955
diff changeset
79 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
80 (use 'hg update' to switch to it)
12dbdd348bb0 branch: strip whitespace before testing known branch name
Yuya Nishihara <yuya@tcha.org>
parents: 18955
diff changeset
81 [255]
12dbdd348bb0 branch: strip whitespace before testing known branch name
Yuya Nishihara <yuya@tcha.org>
parents: 18955
diff changeset
82
17984
b74361cf7c0a update: allow update to existing branches with invalid names (issue3710)
Tim Henigan <tim.henigan@gmail.com>
parents: 17850
diff changeset
83 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
84
b74361cf7c0a update: allow update to existing branches with invalid names (issue3710)
Tim Henigan <tim.henigan@gmail.com>
parents: 17850
diff changeset
85 $ 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
86 $ cd 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
87 $ hg pull -u "$TESTDIR"/bundles/test-invalid-branch-name.hg
b74361cf7c0a update: allow update to existing branches with invalid names (issue3710)
Tim Henigan <tim.henigan@gmail.com>
parents: 17850
diff changeset
88 pulling from *test-invalid-branch-name.hg (glob)
b74361cf7c0a update: allow update to existing branches with invalid names (issue3710)
Tim Henigan <tim.henigan@gmail.com>
parents: 17850
diff changeset
89 requesting all changes
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
b74361cf7c0a update: allow update to existing branches with invalid names (issue3710)
Tim Henigan <tim.henigan@gmail.com>
parents: 17850
diff changeset
94 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
95
b74361cf7c0a update: allow update to existing branches with invalid names (issue3710)
Tim Henigan <tim.henigan@gmail.com>
parents: 17850
diff changeset
96 $ 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
97 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
98 $ cd ..
b74361cf7c0a update: allow update to existing branches with invalid names (issue3710)
Tim Henigan <tim.henigan@gmail.com>
parents: 17850
diff changeset
99
11868
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
100 $ echo 'd' >d
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
101 $ hg add d
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
102 $ 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
103 marked working directory as branch a branch name much longer than the default justification used by branches
15615
41885892796e branch: warn on branching
Matt Mackall <mpm@selenic.com>
parents: 14162
diff changeset
104 (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
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
11868
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
160 ---- going to test branch closing
6631
a2b13cac0922 Active branches fix (issue1104)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 6067
diff changeset
161
11868
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
162 $ hg branches
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
163 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
164 b 4:aee39cd168d0
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
165 c 6:589736a22561 (inactive)
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
166 a 5:d8cbc61dbaa6 (inactive)
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
167 default 0:19709c5a4e75 (inactive)
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
168 $ hg up -C b
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
169 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
170 $ echo 'xxx1' >> b
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
171 $ 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
172 $ hg up -C aee39cd168d0
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
173 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
174 $ echo 'xxx2' >> b
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
175 $ 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
176 created new head
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
177 $ echo 'xxx3' >> b
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
178 $ 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
179 $ hg branches
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
180 b 10:bfbe841b666e
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
181 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
182 c 6:589736a22561 (inactive)
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
183 a 5:d8cbc61dbaa6 (inactive)
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
184 default 0:19709c5a4e75 (inactive)
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
185 $ hg heads --closed
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
186 changeset: 10:bfbe841b666e
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
187 branch: b
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
188 tag: tip
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
189 user: test
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
190 date: Thu Jan 01 00:00:09 1970 +0000
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
191 summary: adding another cset to branch b
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
192
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
193 changeset: 8:eebb944467c9
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
194 branch: b
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
195 parent: 4:aee39cd168d0
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
196 user: test
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
197 date: Thu Jan 01 00:00:07 1970 +0000
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
198 summary: adding cset to branch b
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
199
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
200 changeset: 7:10ff5895aa57
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
201 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
202 user: test
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
203 date: Thu Jan 01 00:00:06 1970 +0000
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
204 summary: Adding d branch
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
205
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
206 changeset: 6:589736a22561
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
207 branch: c
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:05 1970 +0000
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
210 summary: Adding c branch
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: 5:d8cbc61dbaa6
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
213 branch: a
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
214 parent: 2:881fe2b92ad0
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
215 user: test
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
216 date: Thu Jan 01 00:00:04 1970 +0000
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
217 summary: Adding b branch head 2
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
218
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
219 changeset: 0:19709c5a4e75
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:00 1970 +0000
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
222 summary: Adding root node
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 $ hg heads
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
225 changeset: 10:bfbe841b666e
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
226 branch: b
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
227 tag: tip
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
228 user: test
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
229 date: Thu Jan 01 00:00:09 1970 +0000
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
230 summary: adding another cset to branch b
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
231
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
232 changeset: 8:eebb944467c9
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
233 branch: b
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
234 parent: 4:aee39cd168d0
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
235 user: test
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
236 date: Thu Jan 01 00:00:07 1970 +0000
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
237 summary: adding cset to branch b
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
238
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
239 changeset: 7:10ff5895aa57
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
240 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
241 user: test
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
242 date: Thu Jan 01 00:00:06 1970 +0000
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
243 summary: Adding d branch
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
244
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
245 changeset: 6:589736a22561
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
246 branch: c
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:05 1970 +0000
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
249 summary: Adding c branch
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: 5:d8cbc61dbaa6
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
252 branch: a
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
253 parent: 2:881fe2b92ad0
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
254 user: test
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
255 date: Thu Jan 01 00:00:04 1970 +0000
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
256 summary: Adding b branch head 2
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
257
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
258 changeset: 0:19709c5a4e75
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:00 1970 +0000
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
261 summary: Adding root node
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 $ 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
264 $ hg branches -a
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
265 b 8:eebb944467c9
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
266 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
267 $ hg up -C b
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
268 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
269 $ 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
270 $ hg commit -d '9 0' --close-branch -m 're-closing this branch'
b500a663a2c7 commit: amending with --close-branch (issue3445)
Iulian Stana <julian.stana@gmail.com>
parents: 19180
diff changeset
271 abort: can only close branch heads
b500a663a2c7 commit: amending with --close-branch (issue3445)
Iulian Stana <julian.stana@gmail.com>
parents: 19180
diff changeset
272 [255]
6067
57c1a7052982 Option to log to only show changesets within a specified branch.
Dustin Sallings <dustin@spy.net>
parents: 4675
diff changeset
273
18955
f3245f22771c commit: allow closing "non-head" changesets
Mads Kiilerich <madski@unity3d.com>
parents: 17984
diff changeset
274 $ hg log -r tip --debug
19305
b500a663a2c7 commit: amending with --close-branch (issue3445)
Iulian Stana <julian.stana@gmail.com>
parents: 19180
diff changeset
275 changeset: 12:e3d49c0575d8fc2cb1cd6859c747c14f5f6d499f
18955
f3245f22771c commit: allow closing "non-head" changesets
Mads Kiilerich <madski@unity3d.com>
parents: 17984
diff changeset
276 branch: b
f3245f22771c commit: allow closing "non-head" changesets
Mads Kiilerich <madski@unity3d.com>
parents: 17984
diff changeset
277 tag: tip
f3245f22771c commit: allow closing "non-head" changesets
Mads Kiilerich <madski@unity3d.com>
parents: 17984
diff changeset
278 phase: draft
19305
b500a663a2c7 commit: amending with --close-branch (issue3445)
Iulian Stana <julian.stana@gmail.com>
parents: 19180
diff changeset
279 parent: 8:eebb944467c9fb9651ed232aeaf31b3c0a7fc6c1
18955
f3245f22771c commit: allow closing "non-head" changesets
Mads Kiilerich <madski@unity3d.com>
parents: 17984
diff changeset
280 parent: -1:0000000000000000000000000000000000000000
f3245f22771c commit: allow closing "non-head" changesets
Mads Kiilerich <madski@unity3d.com>
parents: 17984
diff changeset
281 manifest: 8:6f9ed32d2b310e391a4f107d5f0f071df785bfee
f3245f22771c commit: allow closing "non-head" changesets
Mads Kiilerich <madski@unity3d.com>
parents: 17984
diff changeset
282 user: test
f3245f22771c commit: allow closing "non-head" changesets
Mads Kiilerich <madski@unity3d.com>
parents: 17984
diff changeset
283 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
284 extra: branch=b
f3245f22771c commit: allow closing "non-head" changesets
Mads Kiilerich <madski@unity3d.com>
parents: 17984
diff changeset
285 extra: close=1
f3245f22771c commit: allow closing "non-head" changesets
Mads Kiilerich <madski@unity3d.com>
parents: 17984
diff changeset
286 description:
19305
b500a663a2c7 commit: amending with --close-branch (issue3445)
Iulian Stana <julian.stana@gmail.com>
parents: 19180
diff changeset
287 close this part branch too
18955
f3245f22771c commit: allow closing "non-head" changesets
Mads Kiilerich <madski@unity3d.com>
parents: 17984
diff changeset
288
f3245f22771c commit: allow closing "non-head" changesets
Mads Kiilerich <madski@unity3d.com>
parents: 17984
diff changeset
289
11868
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
290 --- 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
291
11868
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
292 $ hg branches
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
293 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
294 c 6:589736a22561 (inactive)
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
295 a 5:d8cbc61dbaa6 (inactive)
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
296 default 0:19709c5a4e75 (inactive)
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
297 $ hg branches -c
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
298 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
299 b 12:e3d49c0575d8 (closed)
11868
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
300 c 6:589736a22561 (inactive)
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
301 a 5:d8cbc61dbaa6 (inactive)
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
302 default 0:19709c5a4e75 (inactive)
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
303 $ hg branches -a
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
304 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
305 $ hg branches -q
726dd0fc7cfe branches: quiet option observes other parameters
Travis Herrick <tthetoad@gmail.com>
parents: 15615
diff changeset
306 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
307 c
726dd0fc7cfe branches: quiet option observes other parameters
Travis Herrick <tthetoad@gmail.com>
parents: 15615
diff changeset
308 a
726dd0fc7cfe branches: quiet option observes other parameters
Travis Herrick <tthetoad@gmail.com>
parents: 15615
diff changeset
309 default
11868
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
310 $ hg heads b
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
311 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
312 [1]
11868
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
313 $ 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
314 changeset: 12:e3d49c0575d8
11868
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
315 branch: b
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
316 tag: tip
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
317 parent: 8:eebb944467c9
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
318 user: test
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
319 date: Thu Jan 01 00:00:09 1970 +0000
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
320 summary: close this part branch too
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
321
14162
301725c3df9a localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 13987
diff changeset
322 changeset: 11:d3f163457ebf
11868
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
323 branch: b
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
324 user: test
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
325 date: Thu Jan 01 00:00:09 1970 +0000
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
326 summary: prune bad branch
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
327
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
328 $ echo 'xxx4' >> b
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
329 $ 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
330 reopening closed branch head 12
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
331
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
332 --- branch b is back in action
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
333
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
334 $ 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
335 b 13:e23b5505d1ad
11868
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
336 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
337
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
338 ---- test heads listings
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
339
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
340 $ 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
341 changeset: 13:e23b5505d1ad
11868
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
342 branch: b
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
343 tag: tip
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
344 user: test
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
345 date: Thu Jan 01 00:00:09 1970 +0000
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
346 summary: reopen branch with a change
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
347
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
348 changeset: 7:10ff5895aa57
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
349 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
350 user: test
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
351 date: Thu Jan 01 00:00:06 1970 +0000
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
352 summary: Adding d branch
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
353
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
354 changeset: 6:589736a22561
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
355 branch: c
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
356 user: test
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
357 date: Thu Jan 01 00:00:05 1970 +0000
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
358 summary: Adding c branch
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
359
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
360 changeset: 5:d8cbc61dbaa6
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
361 branch: a
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
362 parent: 2:881fe2b92ad0
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
363 user: test
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
364 date: Thu Jan 01 00:00:04 1970 +0000
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
365 summary: Adding b branch head 2
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
366
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
367 changeset: 0:19709c5a4e75
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
368 user: test
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
369 date: Thu Jan 01 00:00:00 1970 +0000
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
370 summary: Adding root node
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
371
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
372
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
373 branch default
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
374
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
375 $ hg heads default
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
376 changeset: 0:19709c5a4e75
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
377 user: test
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
378 date: Thu Jan 01 00:00:00 1970 +0000
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
379 summary: Adding root node
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
380
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
381
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
382 branch a
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
383
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
384 $ hg heads a
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
385 changeset: 5:d8cbc61dbaa6
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
386 branch: a
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
387 parent: 2:881fe2b92ad0
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
388 user: test
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
389 date: Thu Jan 01 00:00:04 1970 +0000
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
390 summary: Adding b branch head 2
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
391
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
392 $ hg heads --active a
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
393 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
394 [1]
11868
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
395
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
396 branch b
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 $ 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
399 changeset: 13:e23b5505d1ad
11868
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
400 branch: b
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
401 tag: tip
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
402 user: test
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
403 date: Thu Jan 01 00:00:09 1970 +0000
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
404 summary: reopen branch with a change
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 --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
407 changeset: 13:e23b5505d1ad
11868
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
408 branch: b
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
409 tag: tip
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
410 user: test
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
411 date: Thu Jan 01 00:00:09 1970 +0000
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
412 summary: reopen branch with a change
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
413
14162
301725c3df9a localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 13987
diff changeset
414 changeset: 11:d3f163457ebf
11868
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
415 branch: b
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
416 user: test
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
417 date: Thu Jan 01 00:00:09 1970 +0000
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
418 summary: prune bad branch
062052b0d737 tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents: 10417
diff changeset
419
11969
52ec5c813723 color: enable branches support
Jeremy Whitlock <jcscoobyrs@gmail.com>
parents: 11868
diff changeset
420 default branch colors:
52ec5c813723 color: enable branches support
Jeremy Whitlock <jcscoobyrs@gmail.com>
parents: 11868
diff changeset
421
23172
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 22705
diff changeset
422 $ 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
423 > [extensions]
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 22705
diff changeset
424 > color =
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 22705
diff changeset
425 > [color]
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 22705
diff changeset
426 > mode = ansi
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 22705
diff changeset
427 > EOF
11969
52ec5c813723 color: enable branches support
Jeremy Whitlock <jcscoobyrs@gmail.com>
parents: 11868
diff changeset
428
52ec5c813723 color: enable branches support
Jeremy Whitlock <jcscoobyrs@gmail.com>
parents: 11868
diff changeset
429 $ hg up -C c
52ec5c813723 color: enable branches support
Jeremy Whitlock <jcscoobyrs@gmail.com>
parents: 11868
diff changeset
430 3 files updated, 0 files merged, 2 files removed, 0 files unresolved
52ec5c813723 color: enable branches support
Jeremy Whitlock <jcscoobyrs@gmail.com>
parents: 11868
diff changeset
431 $ hg commit -d '9 0' --close-branch -m 'reclosing this branch'
52ec5c813723 color: enable branches support
Jeremy Whitlock <jcscoobyrs@gmail.com>
parents: 11868
diff changeset
432 $ hg up -C b
52ec5c813723 color: enable branches support
Jeremy Whitlock <jcscoobyrs@gmail.com>
parents: 11868
diff changeset
433 2 files updated, 0 files merged, 3 files removed, 0 files unresolved
52ec5c813723 color: enable branches support
Jeremy Whitlock <jcscoobyrs@gmail.com>
parents: 11868
diff changeset
434 $ hg branches --color=always
22704
386339ffe421 branches: merge white space to format string
Yuya Nishihara <yuya@tcha.org>
parents: 22703
diff changeset
435 \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
436 \x1b[0;0ma branch name much longer than the default justification used by branches\x1b[0m\x1b[0;33m 7:10ff5895aa57\x1b[0m (esc)
386339ffe421 branches: merge white space to format string
Yuya Nishihara <yuya@tcha.org>
parents: 22703
diff changeset
437 \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
438 \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
439
52ec5c813723 color: enable branches support
Jeremy Whitlock <jcscoobyrs@gmail.com>
parents: 11868
diff changeset
440 default closed branch color:
52ec5c813723 color: enable branches support
Jeremy Whitlock <jcscoobyrs@gmail.com>
parents: 11868
diff changeset
441
52ec5c813723 color: enable branches support
Jeremy Whitlock <jcscoobyrs@gmail.com>
parents: 11868
diff changeset
442 $ hg branches --color=always --closed
22704
386339ffe421 branches: merge white space to format string
Yuya Nishihara <yuya@tcha.org>
parents: 22703
diff changeset
443 \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
444 \x1b[0;0ma branch name much longer than the default justification used by branches\x1b[0m\x1b[0;33m 7:10ff5895aa57\x1b[0m (esc)
386339ffe421 branches: merge white space to format string
Yuya Nishihara <yuya@tcha.org>
parents: 22703
diff changeset
445 \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
446 \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
447 \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
448
23172
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 22705
diff changeset
449 $ 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
450 > [extensions]
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 22705
diff changeset
451 > color =
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 22705
diff changeset
452 > [color]
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 22705
diff changeset
453 > 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
454 > 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
455 > 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
456 > 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
457 > 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
458 > EOF
11969
52ec5c813723 color: enable branches support
Jeremy Whitlock <jcscoobyrs@gmail.com>
parents: 11868
diff changeset
459
52ec5c813723 color: enable branches support
Jeremy Whitlock <jcscoobyrs@gmail.com>
parents: 11868
diff changeset
460 custom branch colors:
52ec5c813723 color: enable branches support
Jeremy Whitlock <jcscoobyrs@gmail.com>
parents: 11868
diff changeset
461
52ec5c813723 color: enable branches support
Jeremy Whitlock <jcscoobyrs@gmail.com>
parents: 11868
diff changeset
462 $ hg branches --color=always
22704
386339ffe421 branches: merge white space to format string
Yuya Nishihara <yuya@tcha.org>
parents: 22703
diff changeset
463 \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
464 \x1b[0;32ma branch name much longer than the default justification used by branches\x1b[0m\x1b[0;36m 7:10ff5895aa57\x1b[0m (esc)
386339ffe421 branches: merge white space to format string
Yuya Nishihara <yuya@tcha.org>
parents: 22703
diff changeset
465 \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
466 \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
467
52ec5c813723 color: enable branches support
Jeremy Whitlock <jcscoobyrs@gmail.com>
parents: 11868
diff changeset
468 custom closed branch color:
52ec5c813723 color: enable branches support
Jeremy Whitlock <jcscoobyrs@gmail.com>
parents: 11868
diff changeset
469
52ec5c813723 color: enable branches support
Jeremy Whitlock <jcscoobyrs@gmail.com>
parents: 11868
diff changeset
470 $ hg branches --color=always --closed
22704
386339ffe421 branches: merge white space to format string
Yuya Nishihara <yuya@tcha.org>
parents: 22703
diff changeset
471 \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
472 \x1b[0;32ma branch name much longer than the default justification used by branches\x1b[0m\x1b[0;36m 7:10ff5895aa57\x1b[0m (esc)
386339ffe421 branches: merge white space to format string
Yuya Nishihara <yuya@tcha.org>
parents: 22703
diff changeset
473 \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
474 \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
475 \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
476
22703
bd6e95cb82b4 branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents: 19305
diff changeset
477 template output:
bd6e95cb82b4 branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents: 19305
diff changeset
478
bd6e95cb82b4 branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents: 19305
diff changeset
479 $ hg branches -Tjson --closed
bd6e95cb82b4 branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents: 19305
diff changeset
480 [
bd6e95cb82b4 branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents: 19305
diff changeset
481 {
22705
d4869b280cd6 branches: include active, closed and current flags in template output
Yuya Nishihara <yuya@tcha.org>
parents: 22704
diff changeset
482 "active": true,
22703
bd6e95cb82b4 branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents: 19305
diff changeset
483 "branch": "b",
22705
d4869b280cd6 branches: include active, closed and current flags in template output
Yuya Nishihara <yuya@tcha.org>
parents: 22704
diff changeset
484 "closed": false,
d4869b280cd6 branches: include active, closed and current flags in template output
Yuya Nishihara <yuya@tcha.org>
parents: 22704
diff changeset
485 "current": true,
22703
bd6e95cb82b4 branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents: 19305
diff changeset
486 "node": "e23b5505d1ad24aab6f84fd8c7cb8cd8e5e93be0",
bd6e95cb82b4 branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents: 19305
diff changeset
487 "rev": 13
bd6e95cb82b4 branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents: 19305
diff changeset
488 },
bd6e95cb82b4 branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents: 19305
diff changeset
489 {
22705
d4869b280cd6 branches: include active, closed and current flags in template output
Yuya Nishihara <yuya@tcha.org>
parents: 22704
diff changeset
490 "active": true,
22703
bd6e95cb82b4 branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents: 19305
diff changeset
491 "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
492 "closed": false,
d4869b280cd6 branches: include active, closed and current flags in template output
Yuya Nishihara <yuya@tcha.org>
parents: 22704
diff changeset
493 "current": false,
22703
bd6e95cb82b4 branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents: 19305
diff changeset
494 "node": "10ff5895aa5793bd378da574af8cec8ea408d831",
bd6e95cb82b4 branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents: 19305
diff changeset
495 "rev": 7
bd6e95cb82b4 branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents: 19305
diff changeset
496 },
bd6e95cb82b4 branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents: 19305
diff changeset
497 {
22705
d4869b280cd6 branches: include active, closed and current flags in template output
Yuya Nishihara <yuya@tcha.org>
parents: 22704
diff changeset
498 "active": false,
22703
bd6e95cb82b4 branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents: 19305
diff changeset
499 "branch": "c",
22705
d4869b280cd6 branches: include active, closed and current flags in template output
Yuya Nishihara <yuya@tcha.org>
parents: 22704
diff changeset
500 "closed": true,
d4869b280cd6 branches: include active, closed and current flags in template output
Yuya Nishihara <yuya@tcha.org>
parents: 22704
diff changeset
501 "current": false,
22703
bd6e95cb82b4 branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents: 19305
diff changeset
502 "node": "f894c25619d3f1484639d81be950e0a07bc6f1f6",
bd6e95cb82b4 branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents: 19305
diff changeset
503 "rev": 14
bd6e95cb82b4 branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents: 19305
diff changeset
504 },
bd6e95cb82b4 branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents: 19305
diff changeset
505 {
22705
d4869b280cd6 branches: include active, closed and current flags in template output
Yuya Nishihara <yuya@tcha.org>
parents: 22704
diff changeset
506 "active": false,
22703
bd6e95cb82b4 branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents: 19305
diff changeset
507 "branch": "a",
22705
d4869b280cd6 branches: include active, closed and current flags in template output
Yuya Nishihara <yuya@tcha.org>
parents: 22704
diff changeset
508 "closed": false,
d4869b280cd6 branches: include active, closed and current flags in template output
Yuya Nishihara <yuya@tcha.org>
parents: 22704
diff changeset
509 "current": false,
22703
bd6e95cb82b4 branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents: 19305
diff changeset
510 "node": "d8cbc61dbaa6dc817175d1e301eecb863f280832",
bd6e95cb82b4 branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents: 19305
diff changeset
511 "rev": 5
bd6e95cb82b4 branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents: 19305
diff changeset
512 },
bd6e95cb82b4 branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents: 19305
diff changeset
513 {
22705
d4869b280cd6 branches: include active, closed and current flags in template output
Yuya Nishihara <yuya@tcha.org>
parents: 22704
diff changeset
514 "active": false,
22703
bd6e95cb82b4 branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents: 19305
diff changeset
515 "branch": "default",
22705
d4869b280cd6 branches: include active, closed and current flags in template output
Yuya Nishihara <yuya@tcha.org>
parents: 22704
diff changeset
516 "closed": false,
d4869b280cd6 branches: include active, closed and current flags in template output
Yuya Nishihara <yuya@tcha.org>
parents: 22704
diff changeset
517 "current": false,
22703
bd6e95cb82b4 branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents: 19305
diff changeset
518 "node": "19709c5a4e75bf938f8e349aff97438539bb729e",
bd6e95cb82b4 branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents: 19305
diff changeset
519 "rev": 0
bd6e95cb82b4 branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents: 19305
diff changeset
520 }
bd6e95cb82b4 branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents: 19305
diff changeset
521 ]
bd6e95cb82b4 branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents: 19305
diff changeset
522
23861
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
523
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
524 Tests of revision branch name caching
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
525
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
526 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
527 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
528 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
529
23861
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
530 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
531 $ 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
532 5
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
533 $ f --hexdump --size .hg/cache/rbc-*
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
534 .hg/cache/rbc-names-v1: size=87
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
535 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
536 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
537 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
538 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
539 0040: 63 61 74 69 6f 6e 20 75 73 65 64 20 62 79 20 62 |cation used by b|
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
540 0050: 72 61 6e 63 68 65 73 |ranches|
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
541 .hg/cache/rbc-revs-v1: size=120
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
542 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
543 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
544 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
545 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
546 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
547 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
548 0060: e3 d4 9c 05 80 00 00 02 e2 3b 55 05 00 00 00 02 |.........;U.....|
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
549 0070: f8 94 c2 56 80 00 00 03 |...V....|
24372
577f65cf1a57 revbranchcache: add test for when the cache is not writable
Durham Goode <durham@fb.com>
parents: 23862
diff changeset
550
577f65cf1a57 revbranchcache: add test for when the cache is not writable
Durham Goode <durham@fb.com>
parents: 23862
diff changeset
551 #if unix-permissions no-root
577f65cf1a57 revbranchcache: add test for when the cache is not writable
Durham Goode <durham@fb.com>
parents: 23862
diff changeset
552 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
553
577f65cf1a57 revbranchcache: add test for when the cache is not writable
Durham Goode <durham@fb.com>
parents: 23862
diff changeset
554 $ echo >> .hg/cache/rbc-revs-v1
577f65cf1a57 revbranchcache: add test for when the cache is not writable
Durham Goode <durham@fb.com>
parents: 23862
diff changeset
555 $ chmod a-w .hg/cache/rbc-revs-v1
577f65cf1a57 revbranchcache: add test for when the cache is not writable
Durham Goode <durham@fb.com>
parents: 23862
diff changeset
556 $ 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
557 5
577f65cf1a57 revbranchcache: add test for when the cache is not writable
Durham Goode <durham@fb.com>
parents: 23862
diff changeset
558 $ chmod a+w .hg/cache/rbc-revs-v1
577f65cf1a57 revbranchcache: add test for when the cache is not writable
Durham Goode <durham@fb.com>
parents: 23862
diff changeset
559 #endif
577f65cf1a57 revbranchcache: add test for when the cache is not writable
Durham Goode <durham@fb.com>
parents: 23862
diff changeset
560
23861
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
561 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
562 $ echo >> .hg/cache/rbc-revs-v1
23861
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
563 $ 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
564 5
23862
7aa1405528a3 branchcache: add debug output whenever cache files use truncate
Mads Kiilerich <madski@unity3d.com>
parents: 23861
diff changeset
565 truncating cache/rbc-revs-v1 to 120
23861
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
566 $ f --size .hg/cache/rbc-revs*
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
567 .hg/cache/rbc-revs-v1: size=120
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
568 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
569 $ mv .hg/cache/rbc-revs-v1 .
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
570 $ 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
571 $ f --size .hg/cache/rbc-revs*
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
572 .hg/cache/rbc-revs-v1: size=119
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
573 $ 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
574 5
23862
7aa1405528a3 branchcache: add debug output whenever cache files use truncate
Mads Kiilerich <madski@unity3d.com>
parents: 23861
diff changeset
575 truncating cache/rbc-revs-v1 to 112
23861
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
576 $ f --size .hg/cache/rbc-revs*
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
577 .hg/cache/rbc-revs-v1: size=120
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
578 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
579 $ mv .hg/cache/rbc-revs-v1 .
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
580 $ 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
581 $ 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
582 5
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
583 $ f --size .hg/cache/rbc-revs*
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
584 .hg/cache/rbc-revs-v1: size=120
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
585 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
586 $ mv .hg/cache/rbc-revs-v1 .
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
587 $ 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
588 $ f --size .hg/cache/rbc-revs*
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
589 .hg/cache/rbc-revs-v1: size=8
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
590 $ 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
591 $ f --size .hg/cache/rbc-revs*
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
592 .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
593 $ hg log -r 'branch(.)' -T '{rev} ' --debug
9347c15d8136 revbranchcache: write cache even during read operations
Durham Goode <durham@fb.com>
parents: 24372
diff changeset
594 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
595 $ 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
596 5
24378
9347c15d8136 revbranchcache: write cache even during read operations
Durham Goode <durham@fb.com>
parents: 24372
diff changeset
597 truncating cache/rbc-revs-v1 to 104
23861
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
598 $ f --size --hexdump --bytes=16 .hg/cache/rbc-revs*
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
599 .hg/cache/rbc-revs-v1: size=120
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
600 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
601 cache is updated when committing
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
602 $ hg branch i-will-regret-this
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
603 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
604 (branches are permanent and global, did you want a bookmark?)
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
605 $ hg ci -m regrets
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
606 $ f --size .hg/cache/rbc-*
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
607 .hg/cache/rbc-names-v1: size=106
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
608 .hg/cache/rbc-revs-v1: size=128
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
609 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
610 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
611 $ hg up -qr '.^'
678f53865c68 revset: use localrepo revbranchcache for branch name filtering
Mads Kiilerich <madski@unity3d.com>
parents: 23172
diff changeset
612 $ hg rollback -qf
23861
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
613 $ f --size --hexdump .hg/cache/rbc-*
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
614 .hg/cache/rbc-names-v1: size=106
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
615 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
616 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
617 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
618 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
619 0040: 63 61 74 69 6f 6e 20 75 73 65 64 20 62 79 20 62 |cation used by b|
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
620 0050: 72 61 6e 63 68 65 73 00 69 2d 77 69 6c 6c 2d 72 |ranches.i-will-r|
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
621 0060: 65 67 72 65 74 2d 74 68 69 73 |egret-this|
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
622 .hg/cache/rbc-revs-v1: size=120
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
623 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
624 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
625 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
626 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
627 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
628 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
629 0060: e3 d4 9c 05 80 00 00 02 e2 3b 55 05 00 00 00 02 |.........;U.....|
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
630 0070: f8 94 c2 56 80 00 00 03 |...V....|
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
631 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
632 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
633 $ hg --config extensions.strip= strip -r tip --nob
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
634 $ f --size .hg/cache/rbc-revs*
01426cad66dc tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents: 23787
diff changeset
635 .hg/cache/rbc-revs-v1: size=112
23787
678f53865c68 revset: use localrepo revbranchcache for branch name filtering
Mads Kiilerich <madski@unity3d.com>
parents: 23172
diff changeset
636
16913
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 16612
diff changeset
637 $ cd ..