Mercurial > hg
annotate tests/test-branches.t @ 30155:b7a966ce89ed
changelog: disable delta chains
This patch disables delta chains on changelogs. After this patch, new
entries on changelogs - including existing changelogs - will be stored
as the fulltext of that data (likely compressed). No delta computation
will be performed.
An overview of delta chains and data justifying this change follows.
Revlogs try to store entries as a delta against a previous entry (either
a parent revision in the case of generaldelta or the previous physical
revision when not using generaldelta). Most of the time this is the
correct thing to do: it frequently results in less CPU usage and smaller
storage.
Delta chains are most effective when the base revision being deltad
against is similar to the current data. This tends to occur naturally
for manifests and file data, since only small parts of each tend to
change with each revision. Changelogs, however, are a different story.
Changelog entries represent changesets/commits. And unless commits in a
repository are homogonous (same author, changing same files, similar
commit messages, etc), a delta from one entry to the next tends to be
relatively large compared to the size of the entry. This means that
delta chains tend to be short. How short? Here is the full vs delta
revision breakdown on some real world repos:
Repo % Full % Delta Max Length
hg 45.8 54.2 6
mozilla-central 42.4 57.6 8
mozilla-unified 42.5 57.5 17
pypy 46.1 53.9 6
python-zstandard 46.1 53.9 3
(I threw in python-zstandard as an example of a repo that is homogonous.
It contains a small Python project with changes all from the same
author.)
Contrast this with the manifest revlog for these repos, where 99+% of
revisions are deltas and delta chains run into the thousands.
So delta chains aren't as useful on changelogs. But even a short delta
chain may provide benefits. Let's measure that.
Delta chains may require less CPU to read revisions if the CPU time
spent reading smaller deltas is less than the CPU time used to
decompress larger individual entries. We can measure this via
`hg perfrevlog -c -d 1` to iterate a revlog to resolve each revision's
fulltext. Here are the results of that command on a repo using delta
chains in its changelog and on a repo without delta chains:
hg (forward)
! wall 0.407008 comb 0.410000 user 0.410000 sys 0.000000 (best of 25)
! wall 0.390061 comb 0.390000 user 0.390000 sys 0.000000 (best of 26)
hg (reverse)
! wall 0.515221 comb 0.520000 user 0.520000 sys 0.000000 (best of 19)
! wall 0.400018 comb 0.400000 user 0.390000 sys 0.010000 (best of 25)
mozilla-central (forward)
! wall 4.508296 comb 4.490000 user 4.490000 sys 0.000000 (best of 3)
! wall 4.370222 comb 4.370000 user 4.350000 sys 0.020000 (best of 3)
mozilla-central (reverse)
! wall 5.758995 comb 5.760000 user 5.720000 sys 0.040000 (best of 3)
! wall 4.346503 comb 4.340000 user 4.320000 sys 0.020000 (best of 3)
mozilla-unified (forward)
! wall 4.957088 comb 4.950000 user 4.940000 sys 0.010000 (best of 3)
! wall 4.660528 comb 4.650000 user 4.630000 sys 0.020000 (best of 3)
mozilla-unified (reverse)
! wall 6.119827 comb 6.110000 user 6.090000 sys 0.020000 (best of 3)
! wall 4.675136 comb 4.670000 user 4.670000 sys 0.000000 (best of 3)
pypy (forward)
! wall 1.231122 comb 1.240000 user 1.230000 sys 0.010000 (best of 8)
! wall 1.164896 comb 1.160000 user 1.160000 sys 0.000000 (best of 9)
pypy (reverse)
! wall 1.467049 comb 1.460000 user 1.460000 sys 0.000000 (best of 7)
! wall 1.160200 comb 1.170000 user 1.160000 sys 0.010000 (best of 9)
The data clearly shows that it takes less wall and CPU time to resolve
revisions when there are no delta chains in the changelogs, regardless
of the direction of traversal. Furthermore, not using a delta chain
means that fulltext resolution in reverse is as fast as iterating
forward. So not using delta chains on the changelog is a clear CPU win
for reading operations.
An example of a user-visible operation showing this speed-up is revset
evaluation. Here are results for
`hg perfrevset 'author(gps) or author(mpm)'`:
hg
! wall 1.655506 comb 1.660000 user 1.650000 sys 0.010000 (best of 6)
! wall 1.612723 comb 1.610000 user 1.600000 sys 0.010000 (best of 7)
mozilla-central
! wall 17.629826 comb 17.640000 user 17.600000 sys 0.040000 (best of 3)
! wall 17.311033 comb 17.300000 user 17.260000 sys 0.040000 (best of 3)
What about 00changelog.i size?
Repo Delta Chains No Delta Chains
hg 7,033,250 6,976,771
mozilla-central 82,978,748 81,574,623
mozilla-unified 88,112,349 86,702,162
pypy 20,740,699 20,659,741
The data shows that removing delta chains from the changelog makes the
changelog smaller.
Delta chains are also used during changegroup generation. This
operation essentially converts a series of revisions to one large
delta chain. And changegroup generation is smart: if the delta in
the revlog matches what the changegroup is emitting, it will reuse
the delta instead of recalculating it. We can measure the impact
removing changelog delta chains has on changegroup generation via
`hg perfchangegroupchangelog`:
hg
! wall 1.589245 comb 1.590000 user 1.590000 sys 0.000000 (best of 7)
! wall 1.788060 comb 1.790000 user 1.790000 sys 0.000000 (best of 6)
mozilla-central
! wall 17.382585 comb 17.380000 user 17.340000 sys 0.040000 (best of 3)
! wall 20.161357 comb 20.160000 user 20.120000 sys 0.040000 (best of 3)
mozilla-unified
! wall 18.722839 comb 18.720000 user 18.680000 sys 0.040000 (best of 3)
! wall 21.168075 comb 21.170000 user 21.130000 sys 0.040000 (best of 3)
pypy
! wall 4.828317 comb 4.830000 user 4.820000 sys 0.010000 (best of 3)
! wall 5.415455 comb 5.420000 user 5.410000 sys 0.010000 (best of 3)
The data shows eliminating delta chains makes the changelog part of
changegroup generation slower. This is expected since we now have to
compute deltas for revisions where we could recycle the delta before.
It is worth putting this regression into context of overall changegroup
times. Here is the rough total CPU time spent in changegroup generation
for various repos while using delta chains on the changelog:
Repo CPU Time (s) CPU Time w/ compression
hg 4.50 7.05
mozilla-central 111.1 222.0
pypy 28.68 75.5
Before compression, removing delta chains from the changegroup adds
~4.4% overhead to hg changegroup generation, 1.3% to mozilla-central,
and 2.0% to pypy. When you factor in zlib compression, these percentages
are roughly divided by 2.
While the increased CPU usage for changegroup generation is unfortunate,
I think it is acceptable because the percentage is small, server
operators (those likely impacted most by this) have other mechanisms
to mitigate CPU consumption (namely reducing zlib compression level and
pre-generated clone bundles), and because there is room to optimize this
in the future. For example, we could use the nullid as the base revision,
effectively encoding the full revision for each entry in the changegroup.
When doing this, `hg perfchangegroupchangelog` nearly halves:
mozilla-unified
! wall 21.168075 comb 21.170000 user 21.130000 sys 0.040000 (best of 3)
! wall 11.196461 comb 11.200000 user 11.190000 sys 0.010000 (best of 3)
This looks very promising as a future optimization opportunity.
It's worth that the changes in test-acl.t to the changegroup part size.
This is because revision 6 in the changegroup had a delta chain of
length 2 before and after this patch the base revision is nullrev.
When the base revision is nullrev, cg2packer.deltaparent() hardcodes
the *previous* revision from the changegroup as the delta parent.
This caused the delta in the changegroup to switch base revisions,
the delta to change, and the size to change accordingly. While the
size increased in this case, I think sizes will remain the same
on average, as the delta base for changelog revisions doesn't matter
too much (as this patch shows). So, I don't consider this a regression.
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Thu, 13 Oct 2016 12:50:27 +0200 |
parents | 034412ca28c3 |
children | 052e4f1ffce9 |
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 | 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 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
16 $ echo 'aa' >a |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
17 $ hg branch -C |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
18 reset working directory to branch a |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
19 $ 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
|
20 |
11868
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
21 $ hg update -C 0 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
22 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
|
23 $ echo 'b' >b |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
24 $ hg add b |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
25 $ hg branch b |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
26 marked working directory as branch b |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
27 $ hg commit -d '2 0' -m "Adding b branch" |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
28 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
29 $ echo 'bh1' >bh1 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
30 $ hg add bh1 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
31 $ 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
|
32 |
11868
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
33 $ hg update -C 2 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
34 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
|
35 $ echo 'bh2' >bh2 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
36 $ hg add bh2 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
37 $ 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
|
38 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
39 $ echo 'c' >c |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
40 $ hg add c |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
41 $ hg branch c |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
42 marked working directory as branch c |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
43 $ hg commit -d '5 0' -m "Adding c branch" |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
44 |
17821
361ab1e2086f
scmutil: add bad character checking to checknewlabel
Kevin Bullock <kbullock@ringworld.org>
parents:
16913
diff
changeset
|
45 reserved names |
361ab1e2086f
scmutil: add bad character checking to checknewlabel
Kevin Bullock <kbullock@ringworld.org>
parents:
16913
diff
changeset
|
46 |
11868
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
47 $ hg branch tip |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
48 abort: the name 'tip' is reserved |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
11969
diff
changeset
|
49 [255] |
11868
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
50 $ hg branch null |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
51 abort: the name 'null' 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 . |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
54 abort: the name '.' is reserved |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
11969
diff
changeset
|
55 [255] |
7006
92d44ec32430
branch: added more support for named branches
Sune Foldager <cryo@cyanite.org>
parents:
6815
diff
changeset
|
56 |
17821
361ab1e2086f
scmutil: add bad character checking to checknewlabel
Kevin Bullock <kbullock@ringworld.org>
parents:
16913
diff
changeset
|
57 invalid characters |
361ab1e2086f
scmutil: add bad character checking to checknewlabel
Kevin Bullock <kbullock@ringworld.org>
parents:
16913
diff
changeset
|
58 |
361ab1e2086f
scmutil: add bad character checking to checknewlabel
Kevin Bullock <kbullock@ringworld.org>
parents:
16913
diff
changeset
|
59 $ hg branch 'foo:bar' |
17850
71c1513fd560
scmutil: generalize message to make it more i18n-friendly
Wagner Bruna <wbruna@yahoo.com>
parents:
17821
diff
changeset
|
60 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
|
61 [255] |
361ab1e2086f
scmutil: add bad character checking to checknewlabel
Kevin Bullock <kbullock@ringworld.org>
parents:
16913
diff
changeset
|
62 |
361ab1e2086f
scmutil: add bad character checking to checknewlabel
Kevin Bullock <kbullock@ringworld.org>
parents:
16913
diff
changeset
|
63 $ hg branch 'foo |
361ab1e2086f
scmutil: add bad character checking to checknewlabel
Kevin Bullock <kbullock@ringworld.org>
parents:
16913
diff
changeset
|
64 > bar' |
17850
71c1513fd560
scmutil: generalize message to make it more i18n-friendly
Wagner Bruna <wbruna@yahoo.com>
parents:
17821
diff
changeset
|
65 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
|
66 [255] |
361ab1e2086f
scmutil: add bad character checking to checknewlabel
Kevin Bullock <kbullock@ringworld.org>
parents:
16913
diff
changeset
|
67 |
19180
12dbdd348bb0
branch: strip whitespace before testing known branch name
Yuya Nishihara <yuya@tcha.org>
parents:
18955
diff
changeset
|
68 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
|
69 |
12dbdd348bb0
branch: strip whitespace before testing known branch name
Yuya Nishihara <yuya@tcha.org>
parents:
18955
diff
changeset
|
70 $ hg branch 'b ' |
12dbdd348bb0
branch: strip whitespace before testing known branch name
Yuya Nishihara <yuya@tcha.org>
parents:
18955
diff
changeset
|
71 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
|
72 (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
|
73 [255] |
12dbdd348bb0
branch: strip whitespace before testing known branch name
Yuya Nishihara <yuya@tcha.org>
parents:
18955
diff
changeset
|
74 |
12dbdd348bb0
branch: strip whitespace before testing known branch name
Yuya Nishihara <yuya@tcha.org>
parents:
18955
diff
changeset
|
75 $ hg branch ' b' |
12dbdd348bb0
branch: strip whitespace before testing known branch name
Yuya Nishihara <yuya@tcha.org>
parents:
18955
diff
changeset
|
76 abort: a branch of the same name already exists |
12dbdd348bb0
branch: strip whitespace before testing known branch name
Yuya Nishihara <yuya@tcha.org>
parents:
18955
diff
changeset
|
77 (use 'hg update' to switch to it) |
12dbdd348bb0
branch: strip whitespace before testing known branch name
Yuya Nishihara <yuya@tcha.org>
parents:
18955
diff
changeset
|
78 [255] |
12dbdd348bb0
branch: strip whitespace before testing known branch name
Yuya Nishihara <yuya@tcha.org>
parents:
18955
diff
changeset
|
79 |
17984
b74361cf7c0a
update: allow update to existing branches with invalid names (issue3710)
Tim Henigan <tim.henigan@gmail.com>
parents:
17850
diff
changeset
|
80 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
|
81 |
b74361cf7c0a
update: allow update to existing branches with invalid names (issue3710)
Tim Henigan <tim.henigan@gmail.com>
parents:
17850
diff
changeset
|
82 $ 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
|
83 $ 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
|
84 $ 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
|
85 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
|
86 requesting all changes |
b74361cf7c0a
update: allow update to existing branches with invalid names (issue3710)
Tim Henigan <tim.henigan@gmail.com>
parents:
17850
diff
changeset
|
87 adding changesets |
b74361cf7c0a
update: allow update to existing branches with invalid names (issue3710)
Tim Henigan <tim.henigan@gmail.com>
parents:
17850
diff
changeset
|
88 adding manifests |
b74361cf7c0a
update: allow update to existing branches with invalid names (issue3710)
Tim Henigan <tim.henigan@gmail.com>
parents:
17850
diff
changeset
|
89 adding file changes |
b74361cf7c0a
update: allow update to existing branches with invalid names (issue3710)
Tim Henigan <tim.henigan@gmail.com>
parents:
17850
diff
changeset
|
90 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
|
91 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
|
92 |
b74361cf7c0a
update: allow update to existing branches with invalid names (issue3710)
Tim Henigan <tim.henigan@gmail.com>
parents:
17850
diff
changeset
|
93 $ 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
|
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 $ cd .. |
b74361cf7c0a
update: allow update to existing branches with invalid names (issue3710)
Tim Henigan <tim.henigan@gmail.com>
parents:
17850
diff
changeset
|
96 |
11868
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
97 $ echo 'd' >d |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
98 $ hg add d |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
99 $ 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
|
100 marked working directory as branch a branch name much longer than the default justification used by branches |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
101 $ 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
|
102 |
11868
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
103 $ hg branches |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
104 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
|
105 b 4:aee39cd168d0 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
106 c 6:589736a22561 (inactive) |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
107 a 5:d8cbc61dbaa6 (inactive) |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
108 default 0:19709c5a4e75 (inactive) |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
109 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
110 ------- |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
111 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
112 $ hg branches -a |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
113 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
|
114 b 4:aee39cd168d0 |
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 --- 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
|
117 |
11868
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
118 $ hg log -b a |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
119 changeset: 5:d8cbc61dbaa6 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
120 branch: a |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
121 parent: 2:881fe2b92ad0 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
122 user: test |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
123 date: Thu Jan 01 00:00:04 1970 +0000 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
124 summary: Adding b branch head 2 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
125 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
126 changeset: 2:881fe2b92ad0 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
127 branch: a |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
128 user: test |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
129 date: Thu Jan 01 00:00:02 1970 +0000 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
130 summary: Adding to a branch |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
131 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
132 changeset: 1:dd6b440dd85a |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
133 branch: a |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
134 user: test |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
135 date: Thu Jan 01 00:00:01 1970 +0000 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
136 summary: Adding a branch |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
137 |
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
|
138 |
11868
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
139 ---- 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
|
140 |
11868
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
141 $ hg log -b b |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
142 changeset: 4:aee39cd168d0 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
143 branch: b |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
144 user: test |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
145 date: Thu Jan 01 00:00:03 1970 +0000 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
146 summary: Adding b branch head 1 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
147 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
148 changeset: 3:ac22033332d1 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
149 branch: b |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
150 parent: 0:19709c5a4e75 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
151 user: test |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
152 date: Thu Jan 01 00:00:02 1970 +0000 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
153 summary: Adding b branch |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
154 |
10417
58e040c51231
branch: avoid using reserved tag names
Wagner Bruna <wbruna@softwareexpress.com.br>
parents:
8991
diff
changeset
|
155 |
11868
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
156 ---- going to test branch closing |
6631
a2b13cac0922
Active branches fix (issue1104)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
6067
diff
changeset
|
157 |
11868
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
158 $ hg branches |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
159 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
|
160 b 4:aee39cd168d0 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
161 c 6:589736a22561 (inactive) |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
162 a 5:d8cbc61dbaa6 (inactive) |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
163 default 0:19709c5a4e75 (inactive) |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
164 $ hg up -C b |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
165 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
|
166 $ echo 'xxx1' >> b |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
167 $ 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
|
168 $ hg up -C aee39cd168d0 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
169 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
|
170 $ echo 'xxx2' >> b |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
171 $ 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
|
172 created new head |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
173 $ echo 'xxx3' >> b |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
174 $ 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
|
175 $ hg branches |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
176 b 10:bfbe841b666e |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
177 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
|
178 c 6:589736a22561 (inactive) |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
179 a 5:d8cbc61dbaa6 (inactive) |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
180 default 0:19709c5a4e75 (inactive) |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
181 $ hg heads --closed |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
182 changeset: 10:bfbe841b666e |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
183 branch: b |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
184 tag: tip |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
185 user: test |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
186 date: Thu Jan 01 00:00:09 1970 +0000 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
187 summary: adding another cset to branch b |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
188 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
189 changeset: 8:eebb944467c9 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
190 branch: b |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
191 parent: 4:aee39cd168d0 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
192 user: test |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
193 date: Thu Jan 01 00:00:07 1970 +0000 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
194 summary: adding cset to branch b |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
195 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
196 changeset: 7:10ff5895aa57 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
197 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
|
198 user: test |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
199 date: Thu Jan 01 00:00:06 1970 +0000 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
200 summary: Adding d branch |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
201 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
202 changeset: 6:589736a22561 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
203 branch: c |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
204 user: test |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
205 date: Thu Jan 01 00:00:05 1970 +0000 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
206 summary: Adding c branch |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
207 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
208 changeset: 5:d8cbc61dbaa6 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
209 branch: a |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
210 parent: 2:881fe2b92ad0 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
211 user: test |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
212 date: Thu Jan 01 00:00:04 1970 +0000 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
213 summary: Adding b branch head 2 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
214 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
215 changeset: 0:19709c5a4e75 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
216 user: test |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
217 date: Thu Jan 01 00:00:00 1970 +0000 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
218 summary: Adding root node |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
219 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
220 $ hg heads |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
221 changeset: 10:bfbe841b666e |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
222 branch: b |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
223 tag: tip |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
224 user: test |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
225 date: Thu Jan 01 00:00:09 1970 +0000 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
226 summary: adding another cset to branch b |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
227 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
228 changeset: 8:eebb944467c9 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
229 branch: b |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
230 parent: 4:aee39cd168d0 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
231 user: test |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
232 date: Thu Jan 01 00:00:07 1970 +0000 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
233 summary: adding cset to branch b |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
234 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
235 changeset: 7:10ff5895aa57 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
236 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
|
237 user: test |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
238 date: Thu Jan 01 00:00:06 1970 +0000 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
239 summary: Adding d branch |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
240 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
241 changeset: 6:589736a22561 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
242 branch: c |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
243 user: test |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
244 date: Thu Jan 01 00:00:05 1970 +0000 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
245 summary: Adding c branch |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
246 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
247 changeset: 5:d8cbc61dbaa6 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
248 branch: a |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
249 parent: 2:881fe2b92ad0 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
250 user: test |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
251 date: Thu Jan 01 00:00:04 1970 +0000 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
252 summary: Adding b branch head 2 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
253 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
254 changeset: 0:19709c5a4e75 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
255 user: test |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
256 date: Thu Jan 01 00:00:00 1970 +0000 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
257 summary: Adding root node |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
258 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
259 $ 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
|
260 $ hg branches -a |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
261 b 8:eebb944467c9 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
262 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
|
263 $ hg up -C b |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
264 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
|
265 $ 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
|
266 $ 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
|
267 abort: can only close branch heads |
b500a663a2c7
commit: amending with --close-branch (issue3445)
Iulian Stana <julian.stana@gmail.com>
parents:
19180
diff
changeset
|
268 [255] |
6067
57c1a7052982
Option to log to only show changesets within a specified branch.
Dustin Sallings <dustin@spy.net>
parents:
4675
diff
changeset
|
269 |
18955
f3245f22771c
commit: allow closing "non-head" changesets
Mads Kiilerich <madski@unity3d.com>
parents:
17984
diff
changeset
|
270 $ hg log -r tip --debug |
19305
b500a663a2c7
commit: amending with --close-branch (issue3445)
Iulian Stana <julian.stana@gmail.com>
parents:
19180
diff
changeset
|
271 changeset: 12:e3d49c0575d8fc2cb1cd6859c747c14f5f6d499f |
18955
f3245f22771c
commit: allow closing "non-head" changesets
Mads Kiilerich <madski@unity3d.com>
parents:
17984
diff
changeset
|
272 branch: b |
f3245f22771c
commit: allow closing "non-head" changesets
Mads Kiilerich <madski@unity3d.com>
parents:
17984
diff
changeset
|
273 tag: tip |
f3245f22771c
commit: allow closing "non-head" changesets
Mads Kiilerich <madski@unity3d.com>
parents:
17984
diff
changeset
|
274 phase: draft |
19305
b500a663a2c7
commit: amending with --close-branch (issue3445)
Iulian Stana <julian.stana@gmail.com>
parents:
19180
diff
changeset
|
275 parent: 8:eebb944467c9fb9651ed232aeaf31b3c0a7fc6c1 |
18955
f3245f22771c
commit: allow closing "non-head" changesets
Mads Kiilerich <madski@unity3d.com>
parents:
17984
diff
changeset
|
276 parent: -1:0000000000000000000000000000000000000000 |
f3245f22771c
commit: allow closing "non-head" changesets
Mads Kiilerich <madski@unity3d.com>
parents:
17984
diff
changeset
|
277 manifest: 8:6f9ed32d2b310e391a4f107d5f0f071df785bfee |
f3245f22771c
commit: allow closing "non-head" changesets
Mads Kiilerich <madski@unity3d.com>
parents:
17984
diff
changeset
|
278 user: test |
f3245f22771c
commit: allow closing "non-head" changesets
Mads Kiilerich <madski@unity3d.com>
parents:
17984
diff
changeset
|
279 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
|
280 extra: branch=b |
f3245f22771c
commit: allow closing "non-head" changesets
Mads Kiilerich <madski@unity3d.com>
parents:
17984
diff
changeset
|
281 extra: close=1 |
f3245f22771c
commit: allow closing "non-head" changesets
Mads Kiilerich <madski@unity3d.com>
parents:
17984
diff
changeset
|
282 description: |
19305
b500a663a2c7
commit: amending with --close-branch (issue3445)
Iulian Stana <julian.stana@gmail.com>
parents:
19180
diff
changeset
|
283 close this part branch too |
18955
f3245f22771c
commit: allow closing "non-head" changesets
Mads Kiilerich <madski@unity3d.com>
parents:
17984
diff
changeset
|
284 |
f3245f22771c
commit: allow closing "non-head" changesets
Mads Kiilerich <madski@unity3d.com>
parents:
17984
diff
changeset
|
285 |
11868
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
286 --- 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
|
287 |
11868
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
288 $ hg branches |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
289 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
|
290 c 6:589736a22561 (inactive) |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
291 a 5:d8cbc61dbaa6 (inactive) |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
292 default 0:19709c5a4e75 (inactive) |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
293 $ hg branches -c |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
294 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
|
295 b 12:e3d49c0575d8 (closed) |
11868
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
296 c 6:589736a22561 (inactive) |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
297 a 5:d8cbc61dbaa6 (inactive) |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
298 default 0:19709c5a4e75 (inactive) |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
299 $ hg branches -a |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
300 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
|
301 $ hg branches -q |
726dd0fc7cfe
branches: quiet option observes other parameters
Travis Herrick <tthetoad@gmail.com>
parents:
15615
diff
changeset
|
302 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
|
303 c |
726dd0fc7cfe
branches: quiet option observes other parameters
Travis Herrick <tthetoad@gmail.com>
parents:
15615
diff
changeset
|
304 a |
726dd0fc7cfe
branches: quiet option observes other parameters
Travis Herrick <tthetoad@gmail.com>
parents:
15615
diff
changeset
|
305 default |
11868
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
306 $ hg heads b |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
307 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
|
308 [1] |
11868
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
309 $ 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
|
310 changeset: 12:e3d49c0575d8 |
11868
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
311 branch: b |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
312 tag: tip |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
313 parent: 8:eebb944467c9 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
314 user: test |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
315 date: Thu Jan 01 00:00:09 1970 +0000 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
316 summary: close this part branch too |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
317 |
14162
301725c3df9a
localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
13987
diff
changeset
|
318 changeset: 11:d3f163457ebf |
11868
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
319 branch: b |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
320 user: test |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
321 date: Thu Jan 01 00:00:09 1970 +0000 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
322 summary: prune bad branch |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
323 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
324 $ echo 'xxx4' >> b |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
325 $ 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
|
326 reopening closed branch head 12 |
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 --- branch b is back in action |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
329 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
330 $ 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
|
331 b 13:e23b5505d1ad |
11868
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
332 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
|
333 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
334 ---- test heads listings |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
335 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
336 $ 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
|
337 changeset: 13:e23b5505d1ad |
11868
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
338 branch: b |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
339 tag: tip |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
340 user: test |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
341 date: Thu Jan 01 00:00:09 1970 +0000 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
342 summary: reopen branch with a change |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
343 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
344 changeset: 7:10ff5895aa57 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
345 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
|
346 user: test |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
347 date: Thu Jan 01 00:00:06 1970 +0000 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
348 summary: Adding d branch |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
349 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
350 changeset: 6:589736a22561 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
351 branch: c |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
352 user: test |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
353 date: Thu Jan 01 00:00:05 1970 +0000 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
354 summary: Adding c branch |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
355 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
356 changeset: 5:d8cbc61dbaa6 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
357 branch: a |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
358 parent: 2:881fe2b92ad0 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
359 user: test |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
360 date: Thu Jan 01 00:00:04 1970 +0000 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
361 summary: Adding b branch head 2 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
362 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
363 changeset: 0:19709c5a4e75 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
364 user: test |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
365 date: Thu Jan 01 00:00:00 1970 +0000 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
366 summary: Adding root node |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
367 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
368 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
369 branch default |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
370 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
371 $ hg heads default |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
372 changeset: 0:19709c5a4e75 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
373 user: test |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
374 date: Thu Jan 01 00:00:00 1970 +0000 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
375 summary: Adding root node |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
376 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
377 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
378 branch a |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
379 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
380 $ hg heads a |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
381 changeset: 5:d8cbc61dbaa6 |
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 parent: 2:881fe2b92ad0 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
384 user: test |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
385 date: Thu Jan 01 00:00:04 1970 +0000 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
386 summary: Adding b branch head 2 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
387 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
388 $ hg heads --active a |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
389 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
|
390 [1] |
11868
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 branch b |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
393 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
394 $ 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
|
395 changeset: 13:e23b5505d1ad |
11868
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 tag: tip |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
398 user: test |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
399 date: Thu Jan 01 00:00:09 1970 +0000 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
400 summary: reopen branch with a change |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
401 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
402 $ 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
|
403 changeset: 13:e23b5505d1ad |
11868
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
404 branch: b |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
405 tag: tip |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
406 user: test |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
407 date: Thu Jan 01 00:00:09 1970 +0000 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
408 summary: reopen branch with a change |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
409 |
14162
301725c3df9a
localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
13987
diff
changeset
|
410 changeset: 11:d3f163457ebf |
11868
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
411 branch: b |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
412 user: test |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
413 date: Thu Jan 01 00:00:09 1970 +0000 |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
414 summary: prune bad branch |
062052b0d737
tests: unify test-branches
Martin Geisler <mg@lazybytes.net>
parents:
10417
diff
changeset
|
415 |
11969
52ec5c813723
color: enable branches support
Jeremy Whitlock <jcscoobyrs@gmail.com>
parents:
11868
diff
changeset
|
416 default branch colors: |
52ec5c813723
color: enable branches support
Jeremy Whitlock <jcscoobyrs@gmail.com>
parents:
11868
diff
changeset
|
417 |
23172
e955549cd045
tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents:
22705
diff
changeset
|
418 $ 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
|
419 > [extensions] |
e955549cd045
tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents:
22705
diff
changeset
|
420 > color = |
e955549cd045
tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents:
22705
diff
changeset
|
421 > [color] |
e955549cd045
tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents:
22705
diff
changeset
|
422 > mode = ansi |
e955549cd045
tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents:
22705
diff
changeset
|
423 > EOF |
11969
52ec5c813723
color: enable branches support
Jeremy Whitlock <jcscoobyrs@gmail.com>
parents:
11868
diff
changeset
|
424 |
52ec5c813723
color: enable branches support
Jeremy Whitlock <jcscoobyrs@gmail.com>
parents:
11868
diff
changeset
|
425 $ hg up -C c |
52ec5c813723
color: enable branches support
Jeremy Whitlock <jcscoobyrs@gmail.com>
parents:
11868
diff
changeset
|
426 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
|
427 $ 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
|
428 $ hg up -C b |
52ec5c813723
color: enable branches support
Jeremy Whitlock <jcscoobyrs@gmail.com>
parents:
11868
diff
changeset
|
429 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
|
430 $ hg branches --color=always |
22704
386339ffe421
branches: merge white space to format string
Yuya Nishihara <yuya@tcha.org>
parents:
22703
diff
changeset
|
431 \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
|
432 \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
|
433 \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
|
434 \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
|
435 |
52ec5c813723
color: enable branches support
Jeremy Whitlock <jcscoobyrs@gmail.com>
parents:
11868
diff
changeset
|
436 default closed branch color: |
52ec5c813723
color: enable branches support
Jeremy Whitlock <jcscoobyrs@gmail.com>
parents:
11868
diff
changeset
|
437 |
52ec5c813723
color: enable branches support
Jeremy Whitlock <jcscoobyrs@gmail.com>
parents:
11868
diff
changeset
|
438 $ hg branches --color=always --closed |
22704
386339ffe421
branches: merge white space to format string
Yuya Nishihara <yuya@tcha.org>
parents:
22703
diff
changeset
|
439 \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
|
440 \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
|
441 \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
|
442 \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
|
443 \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
|
444 |
23172
e955549cd045
tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents:
22705
diff
changeset
|
445 $ 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
|
446 > [extensions] |
e955549cd045
tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents:
22705
diff
changeset
|
447 > color = |
e955549cd045
tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents:
22705
diff
changeset
|
448 > [color] |
e955549cd045
tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents:
22705
diff
changeset
|
449 > 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
|
450 > 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
|
451 > 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
|
452 > 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
|
453 > 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
|
454 > EOF |
11969
52ec5c813723
color: enable branches support
Jeremy Whitlock <jcscoobyrs@gmail.com>
parents:
11868
diff
changeset
|
455 |
52ec5c813723
color: enable branches support
Jeremy Whitlock <jcscoobyrs@gmail.com>
parents:
11868
diff
changeset
|
456 custom branch colors: |
52ec5c813723
color: enable branches support
Jeremy Whitlock <jcscoobyrs@gmail.com>
parents:
11868
diff
changeset
|
457 |
52ec5c813723
color: enable branches support
Jeremy Whitlock <jcscoobyrs@gmail.com>
parents:
11868
diff
changeset
|
458 $ hg branches --color=always |
22704
386339ffe421
branches: merge white space to format string
Yuya Nishihara <yuya@tcha.org>
parents:
22703
diff
changeset
|
459 \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
|
460 \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
|
461 \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
|
462 \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
|
463 |
52ec5c813723
color: enable branches support
Jeremy Whitlock <jcscoobyrs@gmail.com>
parents:
11868
diff
changeset
|
464 custom closed branch color: |
52ec5c813723
color: enable branches support
Jeremy Whitlock <jcscoobyrs@gmail.com>
parents:
11868
diff
changeset
|
465 |
52ec5c813723
color: enable branches support
Jeremy Whitlock <jcscoobyrs@gmail.com>
parents:
11868
diff
changeset
|
466 $ hg branches --color=always --closed |
22704
386339ffe421
branches: merge white space to format string
Yuya Nishihara <yuya@tcha.org>
parents:
22703
diff
changeset
|
467 \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
|
468 \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
|
469 \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
|
470 \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
|
471 \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
|
472 |
22703
bd6e95cb82b4
branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
19305
diff
changeset
|
473 template output: |
bd6e95cb82b4
branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
19305
diff
changeset
|
474 |
bd6e95cb82b4
branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
19305
diff
changeset
|
475 $ hg branches -Tjson --closed |
bd6e95cb82b4
branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
19305
diff
changeset
|
476 [ |
bd6e95cb82b4
branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
19305
diff
changeset
|
477 { |
22705
d4869b280cd6
branches: include active, closed and current flags in template output
Yuya Nishihara <yuya@tcha.org>
parents:
22704
diff
changeset
|
478 "active": true, |
22703
bd6e95cb82b4
branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
19305
diff
changeset
|
479 "branch": "b", |
22705
d4869b280cd6
branches: include active, closed and current flags in template output
Yuya Nishihara <yuya@tcha.org>
parents:
22704
diff
changeset
|
480 "closed": false, |
d4869b280cd6
branches: include active, closed and current flags in template output
Yuya Nishihara <yuya@tcha.org>
parents:
22704
diff
changeset
|
481 "current": true, |
22703
bd6e95cb82b4
branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
19305
diff
changeset
|
482 "node": "e23b5505d1ad24aab6f84fd8c7cb8cd8e5e93be0", |
bd6e95cb82b4
branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
19305
diff
changeset
|
483 "rev": 13 |
bd6e95cb82b4
branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
19305
diff
changeset
|
484 }, |
bd6e95cb82b4
branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
19305
diff
changeset
|
485 { |
22705
d4869b280cd6
branches: include active, closed and current flags in template output
Yuya Nishihara <yuya@tcha.org>
parents:
22704
diff
changeset
|
486 "active": true, |
22703
bd6e95cb82b4
branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
19305
diff
changeset
|
487 "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
|
488 "closed": false, |
d4869b280cd6
branches: include active, closed and current flags in template output
Yuya Nishihara <yuya@tcha.org>
parents:
22704
diff
changeset
|
489 "current": false, |
22703
bd6e95cb82b4
branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
19305
diff
changeset
|
490 "node": "10ff5895aa5793bd378da574af8cec8ea408d831", |
bd6e95cb82b4
branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
19305
diff
changeset
|
491 "rev": 7 |
bd6e95cb82b4
branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
19305
diff
changeset
|
492 }, |
bd6e95cb82b4
branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
19305
diff
changeset
|
493 { |
22705
d4869b280cd6
branches: include active, closed and current flags in template output
Yuya Nishihara <yuya@tcha.org>
parents:
22704
diff
changeset
|
494 "active": false, |
22703
bd6e95cb82b4
branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
19305
diff
changeset
|
495 "branch": "c", |
22705
d4869b280cd6
branches: include active, closed and current flags in template output
Yuya Nishihara <yuya@tcha.org>
parents:
22704
diff
changeset
|
496 "closed": true, |
d4869b280cd6
branches: include active, closed and current flags in template output
Yuya Nishihara <yuya@tcha.org>
parents:
22704
diff
changeset
|
497 "current": false, |
22703
bd6e95cb82b4
branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
19305
diff
changeset
|
498 "node": "f894c25619d3f1484639d81be950e0a07bc6f1f6", |
bd6e95cb82b4
branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
19305
diff
changeset
|
499 "rev": 14 |
bd6e95cb82b4
branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
19305
diff
changeset
|
500 }, |
bd6e95cb82b4
branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
19305
diff
changeset
|
501 { |
22705
d4869b280cd6
branches: include active, closed and current flags in template output
Yuya Nishihara <yuya@tcha.org>
parents:
22704
diff
changeset
|
502 "active": false, |
22703
bd6e95cb82b4
branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
19305
diff
changeset
|
503 "branch": "a", |
22705
d4869b280cd6
branches: include active, closed and current flags in template output
Yuya Nishihara <yuya@tcha.org>
parents:
22704
diff
changeset
|
504 "closed": false, |
d4869b280cd6
branches: include active, closed and current flags in template output
Yuya Nishihara <yuya@tcha.org>
parents:
22704
diff
changeset
|
505 "current": false, |
22703
bd6e95cb82b4
branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
19305
diff
changeset
|
506 "node": "d8cbc61dbaa6dc817175d1e301eecb863f280832", |
bd6e95cb82b4
branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
19305
diff
changeset
|
507 "rev": 5 |
bd6e95cb82b4
branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
19305
diff
changeset
|
508 }, |
bd6e95cb82b4
branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
19305
diff
changeset
|
509 { |
22705
d4869b280cd6
branches: include active, closed and current flags in template output
Yuya Nishihara <yuya@tcha.org>
parents:
22704
diff
changeset
|
510 "active": false, |
22703
bd6e95cb82b4
branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
19305
diff
changeset
|
511 "branch": "default", |
22705
d4869b280cd6
branches: include active, closed and current flags in template output
Yuya Nishihara <yuya@tcha.org>
parents:
22704
diff
changeset
|
512 "closed": false, |
d4869b280cd6
branches: include active, closed and current flags in template output
Yuya Nishihara <yuya@tcha.org>
parents:
22704
diff
changeset
|
513 "current": false, |
22703
bd6e95cb82b4
branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
19305
diff
changeset
|
514 "node": "19709c5a4e75bf938f8e349aff97438539bb729e", |
bd6e95cb82b4
branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
19305
diff
changeset
|
515 "rev": 0 |
bd6e95cb82b4
branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
19305
diff
changeset
|
516 } |
bd6e95cb82b4
branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
19305
diff
changeset
|
517 ] |
bd6e95cb82b4
branches: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
19305
diff
changeset
|
518 |
29816
034412ca28c3
templater: fix if() to not evaluate False as bool('False')
Yuya Nishihara <yuya@tcha.org>
parents:
29744
diff
changeset
|
519 $ hg branches --closed -T '{if(closed, "{branch}\n")}' |
034412ca28c3
templater: fix if() to not evaluate False as bool('False')
Yuya Nishihara <yuya@tcha.org>
parents:
29744
diff
changeset
|
520 c |
23861
01426cad66dc
tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents:
23787
diff
changeset
|
521 |
01426cad66dc
tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents:
23787
diff
changeset
|
522 Tests of revision branch name caching |
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 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
|
525 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
|
526 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
|
527 |
23861
01426cad66dc
tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents:
23787
diff
changeset
|
528 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
|
529 $ 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
|
530 5 |
01426cad66dc
tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents:
23787
diff
changeset
|
531 $ f --hexdump --size .hg/cache/rbc-* |
01426cad66dc
tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents:
23787
diff
changeset
|
532 .hg/cache/rbc-names-v1: size=87 |
01426cad66dc
tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents:
23787
diff
changeset
|
533 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
|
534 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
|
535 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
|
536 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
|
537 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
|
538 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
|
539 .hg/cache/rbc-revs-v1: size=120 |
01426cad66dc
tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents:
23787
diff
changeset
|
540 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
|
541 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
|
542 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
|
543 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
|
544 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
|
545 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
|
546 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
|
547 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
|
548 |
577f65cf1a57
revbranchcache: add test for when the cache is not writable
Durham Goode <durham@fb.com>
parents:
23862
diff
changeset
|
549 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
|
550 |
577f65cf1a57
revbranchcache: add test for when the cache is not writable
Durham Goode <durham@fb.com>
parents:
23862
diff
changeset
|
551 $ echo >> .hg/cache/rbc-revs-v1 |
28145
cfa0037448f4
tests: change branches test to work cross platform
timeless <timeless@mozdev.org>
parents:
25295
diff
changeset
|
552 $ mv .hg/cache/rbc-revs-v1 .hg/cache/rbc-revs-v1_ |
cfa0037448f4
tests: change branches test to work cross platform
timeless <timeless@mozdev.org>
parents:
25295
diff
changeset
|
553 $ mkdir .hg/cache/rbc-revs-v1 |
24372
577f65cf1a57
revbranchcache: add test for when the cache is not writable
Durham Goode <durham@fb.com>
parents:
23862
diff
changeset
|
554 $ 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
|
555 5 |
28145
cfa0037448f4
tests: change branches test to work cross platform
timeless <timeless@mozdev.org>
parents:
25295
diff
changeset
|
556 $ rmdir .hg/cache/rbc-revs-v1 |
cfa0037448f4
tests: change branches test to work cross platform
timeless <timeless@mozdev.org>
parents:
25295
diff
changeset
|
557 $ mv .hg/cache/rbc-revs-v1_ .hg/cache/rbc-revs-v1 |
24372
577f65cf1a57
revbranchcache: add test for when the cache is not writable
Durham Goode <durham@fb.com>
parents:
23862
diff
changeset
|
558 |
29744
0d588332ad2c
branchmap: acquires lock before writting the rev branch cache
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
29615
diff
changeset
|
559 no errors when wlock cannot be acquired |
0d588332ad2c
branchmap: acquires lock before writting the rev branch cache
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
29615
diff
changeset
|
560 |
0d588332ad2c
branchmap: acquires lock before writting the rev branch cache
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
29615
diff
changeset
|
561 #if unix-permissions |
0d588332ad2c
branchmap: acquires lock before writting the rev branch cache
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
29615
diff
changeset
|
562 $ mv .hg/cache/rbc-revs-v1 .hg/cache/rbc-revs-v1_ |
0d588332ad2c
branchmap: acquires lock before writting the rev branch cache
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
29615
diff
changeset
|
563 $ rm -f .hg/cache/branch* |
0d588332ad2c
branchmap: acquires lock before writting the rev branch cache
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
29615
diff
changeset
|
564 $ chmod 555 .hg |
0d588332ad2c
branchmap: acquires lock before writting the rev branch cache
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
29615
diff
changeset
|
565 $ hg head a -T '{rev}\n' |
0d588332ad2c
branchmap: acquires lock before writting the rev branch cache
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
29615
diff
changeset
|
566 5 |
0d588332ad2c
branchmap: acquires lock before writting the rev branch cache
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
29615
diff
changeset
|
567 $ chmod 755 .hg |
0d588332ad2c
branchmap: acquires lock before writting the rev branch cache
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
29615
diff
changeset
|
568 $ mv .hg/cache/rbc-revs-v1_ .hg/cache/rbc-revs-v1 |
0d588332ad2c
branchmap: acquires lock before writting the rev branch cache
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
29615
diff
changeset
|
569 #endif |
0d588332ad2c
branchmap: acquires lock before writting the rev branch cache
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
29615
diff
changeset
|
570 |
23861
01426cad66dc
tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents:
23787
diff
changeset
|
571 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
|
572 $ echo >> .hg/cache/rbc-revs-v1 |
23861
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 120 |
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 partial last record |
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 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
|
581 $ f --size .hg/cache/rbc-revs* |
01426cad66dc
tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents:
23787
diff
changeset
|
582 .hg/cache/rbc-revs-v1: size=119 |
01426cad66dc
tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents:
23787
diff
changeset
|
583 $ 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
|
584 5 |
23862
7aa1405528a3
branchcache: add debug output whenever cache files use truncate
Mads Kiilerich <madski@unity3d.com>
parents:
23861
diff
changeset
|
585 truncating cache/rbc-revs-v1 to 112 |
23861
01426cad66dc
tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents:
23787
diff
changeset
|
586 $ f --size .hg/cache/rbc-revs* |
01426cad66dc
tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents:
23787
diff
changeset
|
587 .hg/cache/rbc-revs-v1: size=120 |
01426cad66dc
tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents:
23787
diff
changeset
|
588 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
|
589 $ mv .hg/cache/rbc-revs-v1 . |
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 $ 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
|
592 5 |
01426cad66dc
tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents:
23787
diff
changeset
|
593 $ f --size .hg/cache/rbc-revs* |
01426cad66dc
tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents:
23787
diff
changeset
|
594 .hg/cache/rbc-revs-v1: size=120 |
01426cad66dc
tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents:
23787
diff
changeset
|
595 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
|
596 $ mv .hg/cache/rbc-revs-v1 . |
01426cad66dc
tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents:
23787
diff
changeset
|
597 $ 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
|
598 $ f --size .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=8 |
01426cad66dc
tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents:
23787
diff
changeset
|
600 $ 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
|
601 $ f --size .hg/cache/rbc-revs* |
01426cad66dc
tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents:
23787
diff
changeset
|
602 .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
|
603 $ hg log -r 'branch(.)' -T '{rev} ' --debug |
29615
a2a380e2750f
rbc: fix superfluous rebuilding from scratch - don't abuse self._rbcnamescount
Mads Kiilerich <madski@unity3d.com>
parents:
29614
diff
changeset
|
604 history modification detected - truncating revision branch cache to revision 13 |
a2a380e2750f
rbc: fix superfluous rebuilding from scratch - don't abuse self._rbcnamescount
Mads Kiilerich <madski@unity3d.com>
parents:
29614
diff
changeset
|
605 history modification detected - truncating revision branch cache to revision 1 |
24378
9347c15d8136
revbranchcache: write cache even during read operations
Durham Goode <durham@fb.com>
parents:
24372
diff
changeset
|
606 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
|
607 $ 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
|
608 5 |
24378
9347c15d8136
revbranchcache: write cache even during read operations
Durham Goode <durham@fb.com>
parents:
24372
diff
changeset
|
609 truncating cache/rbc-revs-v1 to 104 |
23861
01426cad66dc
tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents:
23787
diff
changeset
|
610 $ 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
|
611 .hg/cache/rbc-revs-v1: size=120 |
01426cad66dc
tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents:
23787
diff
changeset
|
612 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
|
613 cache is updated when committing |
01426cad66dc
tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents:
23787
diff
changeset
|
614 $ hg branch i-will-regret-this |
01426cad66dc
tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents:
23787
diff
changeset
|
615 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
|
616 $ hg ci -m regrets |
01426cad66dc
tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents:
23787
diff
changeset
|
617 $ f --size .hg/cache/rbc-* |
01426cad66dc
tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents:
23787
diff
changeset
|
618 .hg/cache/rbc-names-v1: size=106 |
01426cad66dc
tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents:
23787
diff
changeset
|
619 .hg/cache/rbc-revs-v1: size=128 |
01426cad66dc
tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents:
23787
diff
changeset
|
620 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
|
621 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
|
622 $ hg up -qr '.^' |
678f53865c68
revset: use localrepo revbranchcache for branch name filtering
Mads Kiilerich <madski@unity3d.com>
parents:
23172
diff
changeset
|
623 $ hg rollback -qf |
23861
01426cad66dc
tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents:
23787
diff
changeset
|
624 $ f --size --hexdump .hg/cache/rbc-* |
01426cad66dc
tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents:
23787
diff
changeset
|
625 .hg/cache/rbc-names-v1: size=106 |
01426cad66dc
tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents:
23787
diff
changeset
|
626 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
|
627 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
|
628 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
|
629 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
|
630 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
|
631 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
|
632 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
|
633 .hg/cache/rbc-revs-v1: size=120 |
01426cad66dc
tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents:
23787
diff
changeset
|
634 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
|
635 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
|
636 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
|
637 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
|
638 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
|
639 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
|
640 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
|
641 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
|
642 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
|
643 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
|
644 $ hg --config extensions.strip= strip -r tip --nob |
01426cad66dc
tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents:
23787
diff
changeset
|
645 $ f --size .hg/cache/rbc-revs* |
01426cad66dc
tests: rework revision branch cache tests
Mads Kiilerich <madski@unity3d.com>
parents:
23787
diff
changeset
|
646 .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
|
647 |
28558
bcd106d456c4
cache: rebuild branch cache from scratch when inconsistencies are detected
Mads Kiilerich <madski@unity3d.com>
parents:
28145
diff
changeset
|
648 cache is rebuilt when corruption is detected |
bcd106d456c4
cache: rebuild branch cache from scratch when inconsistencies are detected
Mads Kiilerich <madski@unity3d.com>
parents:
28145
diff
changeset
|
649 $ echo > .hg/cache/rbc-names-v1 |
bcd106d456c4
cache: rebuild branch cache from scratch when inconsistencies are detected
Mads Kiilerich <madski@unity3d.com>
parents:
28145
diff
changeset
|
650 $ hg log -r '5:&branch(.)' -T '{rev} ' --debug |
29615
a2a380e2750f
rbc: fix superfluous rebuilding from scratch - don't abuse self._rbcnamescount
Mads Kiilerich <madski@unity3d.com>
parents:
29614
diff
changeset
|
651 referenced branch names not found - rebuilding revision branch cache from scratch |
28558
bcd106d456c4
cache: rebuild branch cache from scratch when inconsistencies are detected
Mads Kiilerich <madski@unity3d.com>
parents:
28145
diff
changeset
|
652 8 9 10 11 12 13 truncating cache/rbc-revs-v1 to 40 |
bcd106d456c4
cache: rebuild branch cache from scratch when inconsistencies are detected
Mads Kiilerich <madski@unity3d.com>
parents:
28145
diff
changeset
|
653 $ f --size --hexdump .hg/cache/rbc-* |
bcd106d456c4
cache: rebuild branch cache from scratch when inconsistencies are detected
Mads Kiilerich <madski@unity3d.com>
parents:
28145
diff
changeset
|
654 .hg/cache/rbc-names-v1: size=79 |
bcd106d456c4
cache: rebuild branch cache from scratch when inconsistencies are detected
Mads Kiilerich <madski@unity3d.com>
parents:
28145
diff
changeset
|
655 0000: 62 00 61 00 63 00 61 20 62 72 61 6e 63 68 20 6e |b.a.c.a branch n| |
bcd106d456c4
cache: rebuild branch cache from scratch when inconsistencies are detected
Mads Kiilerich <madski@unity3d.com>
parents:
28145
diff
changeset
|
656 0010: 61 6d 65 20 6d 75 63 68 20 6c 6f 6e 67 65 72 20 |ame much longer | |
bcd106d456c4
cache: rebuild branch cache from scratch when inconsistencies are detected
Mads Kiilerich <madski@unity3d.com>
parents:
28145
diff
changeset
|
657 0020: 74 68 61 6e 20 74 68 65 20 64 65 66 61 75 6c 74 |than the default| |
bcd106d456c4
cache: rebuild branch cache from scratch when inconsistencies are detected
Mads Kiilerich <madski@unity3d.com>
parents:
28145
diff
changeset
|
658 0030: 20 6a 75 73 74 69 66 69 63 61 74 69 6f 6e 20 75 | justification u| |
bcd106d456c4
cache: rebuild branch cache from scratch when inconsistencies are detected
Mads Kiilerich <madski@unity3d.com>
parents:
28145
diff
changeset
|
659 0040: 73 65 64 20 62 79 20 62 72 61 6e 63 68 65 73 |sed by branches| |
bcd106d456c4
cache: rebuild branch cache from scratch when inconsistencies are detected
Mads Kiilerich <madski@unity3d.com>
parents:
28145
diff
changeset
|
660 .hg/cache/rbc-revs-v1: size=112 |
bcd106d456c4
cache: rebuild branch cache from scratch when inconsistencies are detected
Mads Kiilerich <madski@unity3d.com>
parents:
28145
diff
changeset
|
661 0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| |
bcd106d456c4
cache: rebuild branch cache from scratch when inconsistencies are detected
Mads Kiilerich <madski@unity3d.com>
parents:
28145
diff
changeset
|
662 0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| |
bcd106d456c4
cache: rebuild branch cache from scratch when inconsistencies are detected
Mads Kiilerich <madski@unity3d.com>
parents:
28145
diff
changeset
|
663 0020: 00 00 00 00 00 00 00 00 d8 cb c6 1d 00 00 00 01 |................| |
bcd106d456c4
cache: rebuild branch cache from scratch when inconsistencies are detected
Mads Kiilerich <madski@unity3d.com>
parents:
28145
diff
changeset
|
664 0030: 58 97 36 a2 00 00 00 02 10 ff 58 95 00 00 00 03 |X.6.......X.....| |
bcd106d456c4
cache: rebuild branch cache from scratch when inconsistencies are detected
Mads Kiilerich <madski@unity3d.com>
parents:
28145
diff
changeset
|
665 0040: ee bb 94 44 00 00 00 00 5f 40 61 bb 00 00 00 00 |...D...._@a.....| |
bcd106d456c4
cache: rebuild branch cache from scratch when inconsistencies are detected
Mads Kiilerich <madski@unity3d.com>
parents:
28145
diff
changeset
|
666 0050: bf be 84 1b 00 00 00 00 d3 f1 63 45 80 00 00 00 |..........cE....| |
bcd106d456c4
cache: rebuild branch cache from scratch when inconsistencies are detected
Mads Kiilerich <madski@unity3d.com>
parents:
28145
diff
changeset
|
667 0060: e3 d4 9c 05 80 00 00 00 e2 3b 55 05 00 00 00 00 |.........;U.....| |
bcd106d456c4
cache: rebuild branch cache from scratch when inconsistencies are detected
Mads Kiilerich <madski@unity3d.com>
parents:
28145
diff
changeset
|
668 |
29603
b181a650a886
rbc: test case for cache file not growing correctly, causing bad new entries
Mads Kiilerich <madski@unity3d.com>
parents:
28558
diff
changeset
|
669 Test that cache files are created and grows correctly: |
b181a650a886
rbc: test case for cache file not growing correctly, causing bad new entries
Mads Kiilerich <madski@unity3d.com>
parents:
28558
diff
changeset
|
670 |
b181a650a886
rbc: test case for cache file not growing correctly, causing bad new entries
Mads Kiilerich <madski@unity3d.com>
parents:
28558
diff
changeset
|
671 $ rm .hg/cache/rbc* |
b181a650a886
rbc: test case for cache file not growing correctly, causing bad new entries
Mads Kiilerich <madski@unity3d.com>
parents:
28558
diff
changeset
|
672 $ hg log -r "5 & branch(5)" -T "{rev}\n" |
b181a650a886
rbc: test case for cache file not growing correctly, causing bad new entries
Mads Kiilerich <madski@unity3d.com>
parents:
28558
diff
changeset
|
673 5 |
b181a650a886
rbc: test case for cache file not growing correctly, causing bad new entries
Mads Kiilerich <madski@unity3d.com>
parents:
28558
diff
changeset
|
674 $ f --size --hexdump .hg/cache/rbc-* |
b181a650a886
rbc: test case for cache file not growing correctly, causing bad new entries
Mads Kiilerich <madski@unity3d.com>
parents:
28558
diff
changeset
|
675 .hg/cache/rbc-names-v1: size=1 |
b181a650a886
rbc: test case for cache file not growing correctly, causing bad new entries
Mads Kiilerich <madski@unity3d.com>
parents:
28558
diff
changeset
|
676 0000: 61 |a| |
29604
db0095c83344
rbc: fix invalid rbc-revs entries caused by missing cache growth
Mads Kiilerich <madski@unity3d.com>
parents:
29603
diff
changeset
|
677 .hg/cache/rbc-revs-v1: size=112 |
db0095c83344
rbc: fix invalid rbc-revs entries caused by missing cache growth
Mads Kiilerich <madski@unity3d.com>
parents:
29603
diff
changeset
|
678 0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| |
db0095c83344
rbc: fix invalid rbc-revs entries caused by missing cache growth
Mads Kiilerich <madski@unity3d.com>
parents:
29603
diff
changeset
|
679 0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| |
db0095c83344
rbc: fix invalid rbc-revs entries caused by missing cache growth
Mads Kiilerich <madski@unity3d.com>
parents:
29603
diff
changeset
|
680 0020: 00 00 00 00 00 00 00 00 d8 cb c6 1d 00 00 00 00 |................| |
db0095c83344
rbc: fix invalid rbc-revs entries caused by missing cache growth
Mads Kiilerich <madski@unity3d.com>
parents:
29603
diff
changeset
|
681 0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| |
db0095c83344
rbc: fix invalid rbc-revs entries caused by missing cache growth
Mads Kiilerich <madski@unity3d.com>
parents:
29603
diff
changeset
|
682 0040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| |
db0095c83344
rbc: fix invalid rbc-revs entries caused by missing cache growth
Mads Kiilerich <madski@unity3d.com>
parents:
29603
diff
changeset
|
683 0050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| |
db0095c83344
rbc: fix invalid rbc-revs entries caused by missing cache growth
Mads Kiilerich <madski@unity3d.com>
parents:
29603
diff
changeset
|
684 0060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| |
29603
b181a650a886
rbc: test case for cache file not growing correctly, causing bad new entries
Mads Kiilerich <madski@unity3d.com>
parents:
28558
diff
changeset
|
685 |
16913
f2719b387380
tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents:
16612
diff
changeset
|
686 $ cd .. |
29614
5c79bae8166f
rbc: test case for incorrect and too aggressive invalidation of invalid caches
Mads Kiilerich <madski@unity3d.com>
parents:
29604
diff
changeset
|
687 |
5c79bae8166f
rbc: test case for incorrect and too aggressive invalidation of invalid caches
Mads Kiilerich <madski@unity3d.com>
parents:
29604
diff
changeset
|
688 Test for multiple incorrect branch cache entries: |
5c79bae8166f
rbc: test case for incorrect and too aggressive invalidation of invalid caches
Mads Kiilerich <madski@unity3d.com>
parents:
29604
diff
changeset
|
689 |
5c79bae8166f
rbc: test case for incorrect and too aggressive invalidation of invalid caches
Mads Kiilerich <madski@unity3d.com>
parents:
29604
diff
changeset
|
690 $ hg init b |
5c79bae8166f
rbc: test case for incorrect and too aggressive invalidation of invalid caches
Mads Kiilerich <madski@unity3d.com>
parents:
29604
diff
changeset
|
691 $ cd b |
5c79bae8166f
rbc: test case for incorrect and too aggressive invalidation of invalid caches
Mads Kiilerich <madski@unity3d.com>
parents:
29604
diff
changeset
|
692 $ touch f |
5c79bae8166f
rbc: test case for incorrect and too aggressive invalidation of invalid caches
Mads Kiilerich <madski@unity3d.com>
parents:
29604
diff
changeset
|
693 $ hg ci -Aqmf |
5c79bae8166f
rbc: test case for incorrect and too aggressive invalidation of invalid caches
Mads Kiilerich <madski@unity3d.com>
parents:
29604
diff
changeset
|
694 $ echo >> f |
5c79bae8166f
rbc: test case for incorrect and too aggressive invalidation of invalid caches
Mads Kiilerich <madski@unity3d.com>
parents:
29604
diff
changeset
|
695 $ hg ci -Amf |
5c79bae8166f
rbc: test case for incorrect and too aggressive invalidation of invalid caches
Mads Kiilerich <madski@unity3d.com>
parents:
29604
diff
changeset
|
696 $ hg branch -q branch |
5c79bae8166f
rbc: test case for incorrect and too aggressive invalidation of invalid caches
Mads Kiilerich <madski@unity3d.com>
parents:
29604
diff
changeset
|
697 $ hg ci -Amf |
5c79bae8166f
rbc: test case for incorrect and too aggressive invalidation of invalid caches
Mads Kiilerich <madski@unity3d.com>
parents:
29604
diff
changeset
|
698 |
5c79bae8166f
rbc: test case for incorrect and too aggressive invalidation of invalid caches
Mads Kiilerich <madski@unity3d.com>
parents:
29604
diff
changeset
|
699 $ f --size --hexdump .hg/cache/rbc-* |
5c79bae8166f
rbc: test case for incorrect and too aggressive invalidation of invalid caches
Mads Kiilerich <madski@unity3d.com>
parents:
29604
diff
changeset
|
700 .hg/cache/rbc-names-v1: size=14 |
5c79bae8166f
rbc: test case for incorrect and too aggressive invalidation of invalid caches
Mads Kiilerich <madski@unity3d.com>
parents:
29604
diff
changeset
|
701 0000: 64 65 66 61 75 6c 74 00 62 72 61 6e 63 68 |default.branch| |
5c79bae8166f
rbc: test case for incorrect and too aggressive invalidation of invalid caches
Mads Kiilerich <madski@unity3d.com>
parents:
29604
diff
changeset
|
702 .hg/cache/rbc-revs-v1: size=24 |
5c79bae8166f
rbc: test case for incorrect and too aggressive invalidation of invalid caches
Mads Kiilerich <madski@unity3d.com>
parents:
29604
diff
changeset
|
703 0000: 66 e5 f5 aa 00 00 00 00 fa 4c 04 e5 00 00 00 00 |f........L......| |
5c79bae8166f
rbc: test case for incorrect and too aggressive invalidation of invalid caches
Mads Kiilerich <madski@unity3d.com>
parents:
29604
diff
changeset
|
704 0010: 56 46 78 69 00 00 00 01 |VFxi....| |
5c79bae8166f
rbc: test case for incorrect and too aggressive invalidation of invalid caches
Mads Kiilerich <madski@unity3d.com>
parents:
29604
diff
changeset
|
705 $ : > .hg/cache/rbc-revs-v1 |
5c79bae8166f
rbc: test case for incorrect and too aggressive invalidation of invalid caches
Mads Kiilerich <madski@unity3d.com>
parents:
29604
diff
changeset
|
706 |
29615
a2a380e2750f
rbc: fix superfluous rebuilding from scratch - don't abuse self._rbcnamescount
Mads Kiilerich <madski@unity3d.com>
parents:
29614
diff
changeset
|
707 No superfluous rebuilding of cache: |
29614
5c79bae8166f
rbc: test case for incorrect and too aggressive invalidation of invalid caches
Mads Kiilerich <madski@unity3d.com>
parents:
29604
diff
changeset
|
708 $ hg log -r "branch(null)&branch(branch)" --debug |
5c79bae8166f
rbc: test case for incorrect and too aggressive invalidation of invalid caches
Mads Kiilerich <madski@unity3d.com>
parents:
29604
diff
changeset
|
709 $ f --size --hexdump .hg/cache/rbc-* |
5c79bae8166f
rbc: test case for incorrect and too aggressive invalidation of invalid caches
Mads Kiilerich <madski@unity3d.com>
parents:
29604
diff
changeset
|
710 .hg/cache/rbc-names-v1: size=14 |
5c79bae8166f
rbc: test case for incorrect and too aggressive invalidation of invalid caches
Mads Kiilerich <madski@unity3d.com>
parents:
29604
diff
changeset
|
711 0000: 64 65 66 61 75 6c 74 00 62 72 61 6e 63 68 |default.branch| |
5c79bae8166f
rbc: test case for incorrect and too aggressive invalidation of invalid caches
Mads Kiilerich <madski@unity3d.com>
parents:
29604
diff
changeset
|
712 .hg/cache/rbc-revs-v1: size=24 |
29615
a2a380e2750f
rbc: fix superfluous rebuilding from scratch - don't abuse self._rbcnamescount
Mads Kiilerich <madski@unity3d.com>
parents:
29614
diff
changeset
|
713 0000: 66 e5 f5 aa 00 00 00 00 fa 4c 04 e5 00 00 00 00 |f........L......| |
29614
5c79bae8166f
rbc: test case for incorrect and too aggressive invalidation of invalid caches
Mads Kiilerich <madski@unity3d.com>
parents:
29604
diff
changeset
|
714 0010: 56 46 78 69 00 00 00 01 |VFxi....| |
5c79bae8166f
rbc: test case for incorrect and too aggressive invalidation of invalid caches
Mads Kiilerich <madski@unity3d.com>
parents:
29604
diff
changeset
|
715 |
5c79bae8166f
rbc: test case for incorrect and too aggressive invalidation of invalid caches
Mads Kiilerich <madski@unity3d.com>
parents:
29604
diff
changeset
|
716 $ cd .. |