annotate tests/test-tags.t @ 48549:28f0092ec89f

exchange: add fast path for subrepo check on push Try to check if .hgsub and .hgsubstate exist at all before looking for them in every changeset to be pushed. The latter can be quite expensive for large repositories and the existance check is almost free. Differential Revision: https://phab.mercurial-scm.org/D11956
author Joerg Sonnenberger <joerg@bec.de>
date Mon, 03 Jan 2022 01:09:56 +0100
parents 8be95673eb8a
children 011f5218ff2d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
24706
5150b2b5b345 tests: move blackbox testing of tags to test-tags.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24532
diff changeset
1 setup
5150b2b5b345 tests: move blackbox testing of tags to test-tags.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24532
diff changeset
2
5150b2b5b345 tests: move blackbox testing of tags to test-tags.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24532
diff changeset
3 $ cat >> $HGRCPATH << EOF
5150b2b5b345 tests: move blackbox testing of tags to test-tags.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24532
diff changeset
4 > [extensions]
5150b2b5b345 tests: move blackbox testing of tags to test-tags.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24532
diff changeset
5 > blackbox=
5150b2b5b345 tests: move blackbox testing of tags to test-tags.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24532
diff changeset
6 > mock=$TESTDIR/mockblackbox.py
40992
1de3364320af tests: filter out uninteresting log events
Yuya Nishihara <yuya@tcha.org>
parents: 40792
diff changeset
7 > [blackbox]
1de3364320af tests: filter out uninteresting log events
Yuya Nishihara <yuya@tcha.org>
parents: 40792
diff changeset
8 > track = command, commandfinish, tagscache
24706
5150b2b5b345 tests: move blackbox testing of tags to test-tags.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24532
diff changeset
9 > EOF
5150b2b5b345 tests: move blackbox testing of tags to test-tags.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24532
diff changeset
10
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
11 Helper functions:
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
12
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
13 $ cacheexists() {
24762
1062663808ce tags: write a separate tags cache file for unfiltered repos
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24760
diff changeset
14 > [ -f .hg/cache/tags2-visible ] && echo "tag cache exists" || echo "no tag cache"
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
15 > }
345
9d8d9207c0b3 Add a tags/identify test group
mpm@selenic.com
parents:
diff changeset
16
24735
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
17 $ fnodescacheexists() {
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
18 > [ -f .hg/cache/hgtagsfnodes1 ] && echo "fnodes cache exists" || echo "no fnodes cache"
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
19 > }
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
20
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
21 $ dumptags() {
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
22 > rev=$1
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
23 > echo "rev $rev: .hgtags:"
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
24 > hg cat -r$rev .hgtags
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
25 > }
9151
f528d1a93491 tags: implement persistent tag caching (issue548).
Greg Ward <greg-hg@gerg.ca>
parents: 9144
diff changeset
26
9152
4017291c4c48 tags: support 'instant' tag retrieval (issue548)
Greg Ward <greg-hg@gerg.ca>
parents: 9151
diff changeset
27 # XXX need to test that the tag cache works when we strip an old head
4017291c4c48 tags: support 'instant' tag retrieval (issue548)
Greg Ward <greg-hg@gerg.ca>
parents: 9151
diff changeset
28 # and add a new one rooted off non-tip: i.e. node and rev of tip are the
4017291c4c48 tags: support 'instant' tag retrieval (issue548)
Greg Ward <greg-hg@gerg.ca>
parents: 9151
diff changeset
29 # same, but stuff has changed behind tip.
4017291c4c48 tags: support 'instant' tag retrieval (issue548)
Greg Ward <greg-hg@gerg.ca>
parents: 9151
diff changeset
30
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
31 Setup:
9143
a604c98dbf62 test-tags: clarify test output; simplify test script a bit (issue548).
Greg Ward <greg-hg@gerg.ca>
parents: 5658
diff changeset
32
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
33 $ hg init t
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
34 $ cd t
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
35 $ cacheexists
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
36 no tag cache
24735
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
37 $ fnodescacheexists
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
38 no fnodes cache
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
39 $ hg id
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
40 000000000000 tip
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
41 $ cacheexists
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
42 no tag cache
24735
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
43 $ fnodescacheexists
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
44 no fnodes cache
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
45 $ echo a > a
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
46 $ hg add a
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
47 $ hg commit -m "test"
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
48 $ hg co
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
49 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
50 $ hg identify
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
51 acb14030fe0a tip
25683
3b1fc40626d8 identify: avoid a crash when given '-r wdir()'
Matt Harbison <matt_harbison@yahoo.com>
parents: 25402
diff changeset
52 $ hg identify -r 'wdir()'
3b1fc40626d8 identify: avoid a crash when given '-r wdir()'
Matt Harbison <matt_harbison@yahoo.com>
parents: 25402
diff changeset
53 acb14030fe0a tip
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
54 $ cacheexists
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
55 tag cache exists
24735
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
56 No fnodes cache because .hgtags file doesn't exist
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
57 (this is an implementation detail)
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
58 $ fnodescacheexists
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
59 no fnodes cache
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
60
12758
2d754eae430c tags: do not fail if tags.cache is corrupted (issue2444)
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12640
diff changeset
61 Try corrupting the cache
2d754eae430c tags: do not fail if tags.cache is corrupted (issue2444)
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12640
diff changeset
62
24762
1062663808ce tags: write a separate tags cache file for unfiltered repos
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24760
diff changeset
63 $ printf 'a b' > .hg/cache/tags2-visible
12758
2d754eae430c tags: do not fail if tags.cache is corrupted (issue2444)
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12640
diff changeset
64 $ hg identify
2d754eae430c tags: do not fail if tags.cache is corrupted (issue2444)
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12640
diff changeset
65 acb14030fe0a tip
2d754eae430c tags: do not fail if tags.cache is corrupted (issue2444)
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12640
diff changeset
66 $ cacheexists
2d754eae430c tags: do not fail if tags.cache is corrupted (issue2444)
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12640
diff changeset
67 tag cache exists
24735
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
68 $ fnodescacheexists
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
69 no fnodes cache
12758
2d754eae430c tags: do not fail if tags.cache is corrupted (issue2444)
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12640
diff changeset
70 $ hg identify
2d754eae430c tags: do not fail if tags.cache is corrupted (issue2444)
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12640
diff changeset
71 acb14030fe0a tip
2d754eae430c tags: do not fail if tags.cache is corrupted (issue2444)
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12640
diff changeset
72
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
73 Create local tag with long name:
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
74
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
75 $ T=`hg identify --debug --id`
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
76 $ hg tag -l "This is a local tag with a really long name!"
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
77 $ hg tags
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
78 tip 0:acb14030fe0a
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
79 This is a local tag with a really long name! 0:acb14030fe0a
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
80 $ rm .hg/localtags
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
81
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
82 Create a tag behind hg's back:
9143
a604c98dbf62 test-tags: clarify test output; simplify test script a bit (issue548).
Greg Ward <greg-hg@gerg.ca>
parents: 5658
diff changeset
83
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
84 $ echo "$T first" > .hgtags
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
85 $ cat .hgtags
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
86 acb14030fe0a21b60322c440ad2d20cf7685a376 first
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
87 $ hg add .hgtags
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
88 $ hg commit -m "add tags"
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
89 $ hg tags
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
90 tip 1:b9154636be93
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
91 first 0:acb14030fe0a
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
92 $ hg identify
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
93 b9154636be93 tip
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
94
24735
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
95 We should have a fnodes cache now that we have a real tag
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
96 The cache should have an empty entry for rev 0 and a valid entry for rev 1.
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
97
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
98
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
99 $ fnodescacheexists
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
100 fnodes cache exists
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
101 $ f --size --hexdump .hg/cache/hgtagsfnodes1
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
102 .hg/cache/hgtagsfnodes1: size=48
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
103 0000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
104 0010: ff ff ff ff ff ff ff ff b9 15 46 36 26 b7 b4 a7 |..........F6&...|
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
105 0020: 73 e0 9e e3 c5 2f 51 0e 19 e0 5e 1f f9 66 d8 59 |s..../Q...^..f.Y|
44290
d8b53385b1bc tags: add a debug command to display .hg/cache/hgtagsfnodes1
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents: 42237
diff changeset
106 $ hg debugtagscache
46495
5aac1a1a5beb tagcache: distinguish between invalid and missing entries
Matt Harbison <matt_harbison@yahoo.com>
parents: 46314
diff changeset
107 0 acb14030fe0a21b60322c440ad2d20cf7685a376 missing
44290
d8b53385b1bc tags: add a debug command to display .hg/cache/hgtagsfnodes1
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents: 42237
diff changeset
108 1 b9154636be938d3d431e75a7c906504a079bfe07 26b7b4a773e09ee3c52f510e19e05e1ff966d859
24735
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
109
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
110 Repeat with cold tag cache:
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
111
24762
1062663808ce tags: write a separate tags cache file for unfiltered repos
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24760
diff changeset
112 $ rm -f .hg/cache/tags2-visible .hg/cache/hgtagsfnodes1
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
113 $ hg identify
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
114 b9154636be93 tip
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
115
24735
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
116 $ fnodescacheexists
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
117 fnodes cache exists
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
118 $ f --size --hexdump .hg/cache/hgtagsfnodes1
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
119 .hg/cache/hgtagsfnodes1: size=48
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
120 0000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
121 0010: ff ff ff ff ff ff ff ff b9 15 46 36 26 b7 b4 a7 |..........F6&...|
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
122 0020: 73 e0 9e e3 c5 2f 51 0e 19 e0 5e 1f f9 66 d8 59 |s..../Q...^..f.Y|
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
123
24806
61aea11fb83d tags: do not abort if failed to write lock file to save cache
Yuya Nishihara <yuya@tcha.org>
parents: 24802
diff changeset
124 And again, but now unable to write tag cache or lock file:
9143
a604c98dbf62 test-tags: clarify test output; simplify test script a bit (issue548).
Greg Ward <greg-hg@gerg.ca>
parents: 5658
diff changeset
125
33428
435f63d12475 tests: avoid tests related to directory permission if running with fsmonitor
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32495
diff changeset
126 #if unix-permissions no-fsmonitor
435f63d12475 tests: avoid tests related to directory permission if running with fsmonitor
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32495
diff changeset
127
24762
1062663808ce tags: write a separate tags cache file for unfiltered repos
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24760
diff changeset
128 $ rm -f .hg/cache/tags2-visible .hg/cache/hgtagsfnodes1
24735
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
129 $ chmod 555 .hg/cache
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
130 $ hg identify
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
131 b9154636be93 tip
24735
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
132 $ chmod 755 .hg/cache
24806
61aea11fb83d tags: do not abort if failed to write lock file to save cache
Yuya Nishihara <yuya@tcha.org>
parents: 24802
diff changeset
133
33428
435f63d12475 tests: avoid tests related to directory permission if running with fsmonitor
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32495
diff changeset
134 (this block should be protected by no-fsmonitor, because "chmod 555 .hg"
435f63d12475 tests: avoid tests related to directory permission if running with fsmonitor
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32495
diff changeset
135 makes watchman fail at accessing to files under .hg)
435f63d12475 tests: avoid tests related to directory permission if running with fsmonitor
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32495
diff changeset
136
24806
61aea11fb83d tags: do not abort if failed to write lock file to save cache
Yuya Nishihara <yuya@tcha.org>
parents: 24802
diff changeset
137 $ chmod 555 .hg
61aea11fb83d tags: do not abort if failed to write lock file to save cache
Yuya Nishihara <yuya@tcha.org>
parents: 24802
diff changeset
138 $ hg identify
61aea11fb83d tags: do not abort if failed to write lock file to save cache
Yuya Nishihara <yuya@tcha.org>
parents: 24802
diff changeset
139 b9154636be93 tip
61aea11fb83d tags: do not abort if failed to write lock file to save cache
Yuya Nishihara <yuya@tcha.org>
parents: 24802
diff changeset
140 $ chmod 755 .hg
16857
1415edd88c56 test-tags: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents: 15443
diff changeset
141 #endif
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
142
24706
5150b2b5b345 tests: move blackbox testing of tags to test-tags.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24532
diff changeset
143 Tag cache debug info written to blackbox log
5150b2b5b345 tests: move blackbox testing of tags to test-tags.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24532
diff changeset
144
24762
1062663808ce tags: write a separate tags cache file for unfiltered repos
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24760
diff changeset
145 $ rm -f .hg/cache/tags2-visible .hg/cache/hgtagsfnodes1
24706
5150b2b5b345 tests: move blackbox testing of tags to test-tags.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24532
diff changeset
146 $ hg identify
5150b2b5b345 tests: move blackbox testing of tags to test-tags.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24532
diff changeset
147 b9154636be93 tip
28025
ab6468270b83 blackbox: flush output file descriptor
timeless <timeless@mozdev.org>
parents: 26185
diff changeset
148 $ hg blackbox -l 6
28245
caa2a0c6fbb7 blackbox: log working directory version
timeless <timeless@mozdev.org>
parents: 28242
diff changeset
149 1970/01/01 00:00:00 bob @b9154636be938d3d431e75a7c906504a079bfe07 (5000)> identify
caa2a0c6fbb7 blackbox: log working directory version
timeless <timeless@mozdev.org>
parents: 28242
diff changeset
150 1970/01/01 00:00:00 bob @b9154636be938d3d431e75a7c906504a079bfe07 (5000)> writing 48 bytes to cache/hgtagsfnodes1
42237
9f45d3d526f9 hgtagsfnodescache: inherit fnode from parent when possible
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 41490
diff changeset
151 1970/01/01 00:00:00 bob @b9154636be938d3d431e75a7c906504a079bfe07 (5000)> 0/2 cache hits/lookups in * seconds (glob)
28245
caa2a0c6fbb7 blackbox: log working directory version
timeless <timeless@mozdev.org>
parents: 28242
diff changeset
152 1970/01/01 00:00:00 bob @b9154636be938d3d431e75a7c906504a079bfe07 (5000)> writing .hg/cache/tags2-visible with 1 tags
28247
d2c0527af364 blackbox: store the blackbox ui object instead of the log file
timeless <timeless@mozdev.org>
parents: 28246
diff changeset
153 1970/01/01 00:00:00 bob @b9154636be938d3d431e75a7c906504a079bfe07 (5000)> identify exited 0 after * seconds (glob)
28245
caa2a0c6fbb7 blackbox: log working directory version
timeless <timeless@mozdev.org>
parents: 28242
diff changeset
154 1970/01/01 00:00:00 bob @b9154636be938d3d431e75a7c906504a079bfe07 (5000)> blackbox -l 6
24706
5150b2b5b345 tests: move blackbox testing of tags to test-tags.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24532
diff changeset
155
24735
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
156 Failure to acquire lock results in no write
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
157
24762
1062663808ce tags: write a separate tags cache file for unfiltered repos
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24760
diff changeset
158 $ rm -f .hg/cache/tags2-visible .hg/cache/hgtagsfnodes1
45435
64de86fd0984 tags: take lock instead of wlock before writing hgtagsfnodes1 cache
Pulkit Goyal <7895pulkit@gmail.com>
parents: 44376
diff changeset
159 $ echo 'foo:1' > .hg/store/lock
24735
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
160 $ hg identify
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
161 b9154636be93 tip
28025
ab6468270b83 blackbox: flush output file descriptor
timeless <timeless@mozdev.org>
parents: 26185
diff changeset
162 $ hg blackbox -l 6
28245
caa2a0c6fbb7 blackbox: log working directory version
timeless <timeless@mozdev.org>
parents: 28242
diff changeset
163 1970/01/01 00:00:00 bob @b9154636be938d3d431e75a7c906504a079bfe07 (5000)> identify
caa2a0c6fbb7 blackbox: log working directory version
timeless <timeless@mozdev.org>
parents: 28242
diff changeset
164 1970/01/01 00:00:00 bob @b9154636be938d3d431e75a7c906504a079bfe07 (5000)> not writing .hg/cache/hgtagsfnodes1 because lock cannot be acquired
42237
9f45d3d526f9 hgtagsfnodescache: inherit fnode from parent when possible
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 41490
diff changeset
165 1970/01/01 00:00:00 bob @b9154636be938d3d431e75a7c906504a079bfe07 (5000)> 0/2 cache hits/lookups in * seconds (glob)
28245
caa2a0c6fbb7 blackbox: log working directory version
timeless <timeless@mozdev.org>
parents: 28242
diff changeset
166 1970/01/01 00:00:00 bob @b9154636be938d3d431e75a7c906504a079bfe07 (5000)> writing .hg/cache/tags2-visible with 1 tags
28247
d2c0527af364 blackbox: store the blackbox ui object instead of the log file
timeless <timeless@mozdev.org>
parents: 28246
diff changeset
167 1970/01/01 00:00:00 bob @b9154636be938d3d431e75a7c906504a079bfe07 (5000)> identify exited 0 after * seconds (glob)
28245
caa2a0c6fbb7 blackbox: log working directory version
timeless <timeless@mozdev.org>
parents: 28242
diff changeset
168 1970/01/01 00:00:00 bob @b9154636be938d3d431e75a7c906504a079bfe07 (5000)> blackbox -l 6
24735
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
169
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
170 $ fnodescacheexists
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
171 no fnodes cache
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
172
45435
64de86fd0984 tags: take lock instead of wlock before writing hgtagsfnodes1 cache
Pulkit Goyal <7895pulkit@gmail.com>
parents: 44376
diff changeset
173 $ rm .hg/store/lock
24735
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
174
24762
1062663808ce tags: write a separate tags cache file for unfiltered repos
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24760
diff changeset
175 $ rm -f .hg/cache/tags2-visible .hg/cache/hgtagsfnodes1
24735
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
176 $ hg identify
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
177 b9154636be93 tip
24706
5150b2b5b345 tests: move blackbox testing of tags to test-tags.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24532
diff changeset
178
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
179 Create a branch:
9151
f528d1a93491 tags: implement persistent tag caching (issue548).
Greg Ward <greg-hg@gerg.ca>
parents: 9144
diff changeset
180
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
181 $ echo bb > a
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
182 $ hg status
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
183 M a
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
184 $ hg identify
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
185 b9154636be93+ tip
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
186 $ hg co first
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
187 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
188 $ hg id
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
189 acb14030fe0a+ first
25683
3b1fc40626d8 identify: avoid a crash when given '-r wdir()'
Matt Harbison <matt_harbison@yahoo.com>
parents: 25402
diff changeset
190 $ hg id -r 'wdir()'
3b1fc40626d8 identify: avoid a crash when given '-r wdir()'
Matt Harbison <matt_harbison@yahoo.com>
parents: 25402
diff changeset
191 acb14030fe0a+ first
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
192 $ hg -v id
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
193 acb14030fe0a+ first
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
194 $ hg status
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
195 M a
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
196 $ echo 1 > b
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
197 $ hg add b
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
198 $ hg commit -m "branch"
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
199 created new head
24735
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
200
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
201 Creating a new commit shouldn't append the .hgtags fnodes cache until
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
202 tags info is accessed
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
203
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
204 $ f --size --hexdump .hg/cache/hgtagsfnodes1
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
205 .hg/cache/hgtagsfnodes1: size=48
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
206 0000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
207 0010: ff ff ff ff ff ff ff ff b9 15 46 36 26 b7 b4 a7 |..........F6&...|
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
208 0020: 73 e0 9e e3 c5 2f 51 0e 19 e0 5e 1f f9 66 d8 59 |s..../Q...^..f.Y|
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
209
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
210 $ hg id
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
211 c8edf04160c7 tip
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
212
24735
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
213 First 4 bytes of record 3 are changeset fragment
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
214
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
215 $ f --size --hexdump .hg/cache/hgtagsfnodes1
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
216 .hg/cache/hgtagsfnodes1: size=72
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
217 0000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
218 0010: ff ff ff ff ff ff ff ff b9 15 46 36 26 b7 b4 a7 |..........F6&...|
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
219 0020: 73 e0 9e e3 c5 2f 51 0e 19 e0 5e 1f f9 66 d8 59 |s..../Q...^..f.Y|
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
220 0030: c8 ed f0 41 00 00 00 00 00 00 00 00 00 00 00 00 |...A............|
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
221 0040: 00 00 00 00 00 00 00 00 |........|
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
222
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
223 Merge the two heads:
9366
9ff178e7b627 tags: don't crash if unable to write tag cache
Greg Ward <greg-hg@gerg.ca>
parents: 9152
diff changeset
224
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
225 $ hg merge 1
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
226 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
227 (branch merge, don't forget to commit)
28246
b862e793ec10 blackbox: log dirty state
timeless <timeless@mozdev.org>
parents: 28245
diff changeset
228 $ hg blackbox -l3
b862e793ec10 blackbox: log dirty state
timeless <timeless@mozdev.org>
parents: 28245
diff changeset
229 1970/01/01 00:00:00 bob @c8edf04160c7f731e4589d66ab3ab3486a64ac28 (5000)> merge 1
28247
d2c0527af364 blackbox: store the blackbox ui object instead of the log file
timeless <timeless@mozdev.org>
parents: 28246
diff changeset
230 1970/01/01 00:00:00 bob @c8edf04160c7f731e4589d66ab3ab3486a64ac28+b9154636be938d3d431e75a7c906504a079bfe07 (5000)> merge 1 exited 0 after * seconds (glob)
28246
b862e793ec10 blackbox: log dirty state
timeless <timeless@mozdev.org>
parents: 28245
diff changeset
231 1970/01/01 00:00:00 bob @c8edf04160c7f731e4589d66ab3ab3486a64ac28+b9154636be938d3d431e75a7c906504a079bfe07 (5000)> blackbox -l3
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
232 $ hg id
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
233 c8edf04160c7+b9154636be93+ tip
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
234 $ hg status
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
235 M .hgtags
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
236 $ hg commit -m "merge"
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
237
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
238 Create a fake head, make sure tag not visible afterwards:
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
239
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
240 $ cp .hgtags tags
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
241 $ hg tag last
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
242 $ hg rm .hgtags
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
243 $ hg commit -m "remove"
9143
a604c98dbf62 test-tags: clarify test output; simplify test script a bit (issue548).
Greg Ward <greg-hg@gerg.ca>
parents: 5658
diff changeset
244
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
245 $ mv tags .hgtags
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
246 $ hg add .hgtags
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
247 $ hg commit -m "readd"
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
248 $
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
249 $ hg tags
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
250 tip 6:35ff301afafe
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
251 first 0:acb14030fe0a
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
252
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
253 Add invalid tags:
345
9d8d9207c0b3 Add a tags/identify test group
mpm@selenic.com
parents:
diff changeset
254
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
255 $ echo "spam" >> .hgtags
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
256 $ echo >> .hgtags
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
257 $ echo "foo bar" >> .hgtags
12366
c01dc9087d9a tests: drop a bunch of sed calls from unified tests
Matt Mackall <mpm@selenic.com>
parents: 12327
diff changeset
258 $ echo "a5a5 invalid" >> .hg/localtags
17345
4f8054d3171b check-code: fix check for trailing whitespace on sh command lines
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
259 $ cat .hgtags
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
260 acb14030fe0a21b60322c440ad2d20cf7685a376 first
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
261 spam
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
262
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
263 foo bar
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
264 $ hg commit -m "tags"
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
265
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
266 Report tag parse error on other head:
2320
dbdce3b99988 fix parsing of tags. make parse errors useful. add new tag tests.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2283
diff changeset
267
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
268 $ hg up 3
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
269 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
270 $ echo 'x y' >> .hgtags
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
271 $ hg commit -m "head"
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
272 created new head
2320
dbdce3b99988 fix parsing of tags. make parse errors useful. add new tag tests.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2283
diff changeset
273
29038
a9dd92c48a1c tags: silence cache parsing errors
Matt Mackall <mpm@selenic.com>
parents: 28247
diff changeset
274 $ hg tags --debug
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
275 .hgtags@75d9f02dfe28, line 2: cannot parse entry
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
276 .hgtags@75d9f02dfe28, line 4: node 'foo' is not well formed
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
277 .hgtags@c4be69a18c11, line 2: node 'x' is not well formed
29038
a9dd92c48a1c tags: silence cache parsing errors
Matt Mackall <mpm@selenic.com>
parents: 28247
diff changeset
278 tip 8:c4be69a18c11e8bc3a5fdbb576017c25f7d84663
a9dd92c48a1c tags: silence cache parsing errors
Matt Mackall <mpm@selenic.com>
parents: 28247
diff changeset
279 first 0:acb14030fe0a21b60322c440ad2d20cf7685a376
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
280 $ hg tip
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
281 changeset: 8:c4be69a18c11
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
282 tag: tip
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
283 parent: 3:ac5e980c4dc0
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
284 user: test
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
285 date: Thu Jan 01 00:00:00 1970 +0000
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
286 summary: head
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
287
2320
dbdce3b99988 fix parsing of tags. make parse errors useful. add new tag tests.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2283
diff changeset
288
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
289 Test tag precedence rules:
2320
dbdce3b99988 fix parsing of tags. make parse errors useful. add new tag tests.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2283
diff changeset
290
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
291 $ cd ..
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
292 $ hg init t2
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
293 $ cd t2
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
294 $ echo foo > foo
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
295 $ hg add foo
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
296 $ hg ci -m 'add foo' # rev 0
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
297 $ hg tag bar # rev 1
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
298 $ echo >> foo
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
299 $ hg ci -m 'change foo 1' # rev 2
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
300 $ hg up -C 1
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
301 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
302 $ hg tag -r 1 -f bar # rev 3
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
303 $ hg up -C 1
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
304 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
305 $ echo >> foo
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
306 $ hg ci -m 'change foo 2' # rev 4
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
307 created new head
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
308 $ hg tags
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
309 tip 4:0c192d7d5e6b
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
310 bar 1:78391a272241
2320
dbdce3b99988 fix parsing of tags. make parse errors useful. add new tag tests.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2283
diff changeset
311
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
312 Repeat in case of cache effects:
2320
dbdce3b99988 fix parsing of tags. make parse errors useful. add new tag tests.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2283
diff changeset
313
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
314 $ hg tags
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
315 tip 4:0c192d7d5e6b
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
316 bar 1:78391a272241
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
317
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
318 Detailed dump of tag info:
1986
719cf07b076d add checking for invalid entries in tag files
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 1933
diff changeset
319
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
320 $ hg heads -q # expect 4, 3, 2
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
321 4:0c192d7d5e6b
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
322 3:6fa450212aeb
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
323 2:7a94127795a3
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
324 $ dumptags 2
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
325 rev 2: .hgtags:
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
326 bbd179dfa0a71671c253b3ae0aa1513b60d199fa bar
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
327 $ dumptags 3
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
328 rev 3: .hgtags:
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
329 bbd179dfa0a71671c253b3ae0aa1513b60d199fa bar
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
330 bbd179dfa0a71671c253b3ae0aa1513b60d199fa bar
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
331 78391a272241d70354aa14c874552cad6b51bb42 bar
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
332 $ dumptags 4
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
333 rev 4: .hgtags:
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
334 bbd179dfa0a71671c253b3ae0aa1513b60d199fa bar
9144
ad72e3b08bc0 test-tags: enhance the test to probe tag caching better (issue548).
Greg Ward <greg-hg@gerg.ca>
parents: 9143
diff changeset
335
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
336 Dump cache:
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
337
24762
1062663808ce tags: write a separate tags cache file for unfiltered repos
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24760
diff changeset
338 $ cat .hg/cache/tags2-visible
24760
410f3856196f tags: change format of tags cache files
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24759
diff changeset
339 4 0c192d7d5e6b78a714de54a2e9627952a877e25a
19646
335a558f81dc tags: write tag overwriting history also into tag cache file (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19108
diff changeset
340 bbd179dfa0a71671c253b3ae0aa1513b60d199fa bar
335a558f81dc tags: write tag overwriting history also into tag cache file (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19108
diff changeset
341 bbd179dfa0a71671c253b3ae0aa1513b60d199fa bar
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
342 78391a272241d70354aa14c874552cad6b51bb42 bar
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
343
24735
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
344 $ f --size --hexdump .hg/cache/hgtagsfnodes1
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
345 .hg/cache/hgtagsfnodes1: size=120
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
346 0000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
347 0010: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
348 0020: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
349 0030: 7a 94 12 77 0c 04 f2 a8 af 31 de 17 fa b7 42 28 |z..w.....1....B(|
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
350 0040: 78 ee 5a 2d ad bc 94 3d 6f a4 50 21 7d 3b 71 8c |x.Z-...=o.P!};q.|
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
351 0050: 96 4e f3 7b 89 e5 50 eb da fd 57 89 e7 6c e1 b0 |.N.{..P...W..l..|
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
352 0060: 0c 19 2d 7d 0c 04 f2 a8 af 31 de 17 fa b7 42 28 |..-}.....1....B(|
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
353 0070: 78 ee 5a 2d ad bc 94 3d |x.Z-...=|
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
354
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
355 Corrupt the .hgtags fnodes cache
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
356 Extra junk data at the end should get overwritten on next cache update
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
357
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
358 $ echo extra >> .hg/cache/hgtagsfnodes1
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
359 $ echo dummy1 > foo
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
360 $ hg commit -m throwaway1
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
361
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
362 $ hg tags
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
363 tip 5:8dbfe60eff30
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
364 bar 1:78391a272241
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
365
28025
ab6468270b83 blackbox: flush output file descriptor
timeless <timeless@mozdev.org>
parents: 26185
diff changeset
366 $ hg blackbox -l 6
28245
caa2a0c6fbb7 blackbox: log working directory version
timeless <timeless@mozdev.org>
parents: 28242
diff changeset
367 1970/01/01 00:00:00 bob @8dbfe60eff306a54259cfe007db9e330e7ecf866 (5000)> tags
caa2a0c6fbb7 blackbox: log working directory version
timeless <timeless@mozdev.org>
parents: 28242
diff changeset
368 1970/01/01 00:00:00 bob @8dbfe60eff306a54259cfe007db9e330e7ecf866 (5000)> writing 24 bytes to cache/hgtagsfnodes1
42237
9f45d3d526f9 hgtagsfnodescache: inherit fnode from parent when possible
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 41490
diff changeset
369 1970/01/01 00:00:00 bob @8dbfe60eff306a54259cfe007db9e330e7ecf866 (5000)> 3/4 cache hits/lookups in * seconds (glob)
28245
caa2a0c6fbb7 blackbox: log working directory version
timeless <timeless@mozdev.org>
parents: 28242
diff changeset
370 1970/01/01 00:00:00 bob @8dbfe60eff306a54259cfe007db9e330e7ecf866 (5000)> writing .hg/cache/tags2-visible with 1 tags
28247
d2c0527af364 blackbox: store the blackbox ui object instead of the log file
timeless <timeless@mozdev.org>
parents: 28246
diff changeset
371 1970/01/01 00:00:00 bob @8dbfe60eff306a54259cfe007db9e330e7ecf866 (5000)> tags exited 0 after * seconds (glob)
28245
caa2a0c6fbb7 blackbox: log working directory version
timeless <timeless@mozdev.org>
parents: 28242
diff changeset
372 1970/01/01 00:00:00 bob @8dbfe60eff306a54259cfe007db9e330e7ecf866 (5000)> blackbox -l 6
24735
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
373
44292
f5a7cf0adb12 tags: behave better if a tags cache entry is partially written
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents: 44291
diff changeset
374 On junk data + missing cache entries, hg also overwrites the junk.
44291
89d44cfcdeeb tags: show how hg behaves if a tags cache entry is truncated
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents: 44290
diff changeset
375
89d44cfcdeeb tags: show how hg behaves if a tags cache entry is truncated
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents: 44290
diff changeset
376 $ rm -f .hg/cache/tags2-visible
44376
56f089e40c5a tests: replace truncate(1) with inline python
Matt Harbison <matt_harbison@yahoo.com>
parents: 44292
diff changeset
377 >>> import os
56f089e40c5a tests: replace truncate(1) with inline python
Matt Harbison <matt_harbison@yahoo.com>
parents: 44292
diff changeset
378 >>> with open(".hg/cache/hgtagsfnodes1", "ab+") as fp:
56f089e40c5a tests: replace truncate(1) with inline python
Matt Harbison <matt_harbison@yahoo.com>
parents: 44292
diff changeset
379 ... fp.seek(-10, os.SEEK_END) and None
56f089e40c5a tests: replace truncate(1) with inline python
Matt Harbison <matt_harbison@yahoo.com>
parents: 44292
diff changeset
380 ... fp.truncate() and None
56f089e40c5a tests: replace truncate(1) with inline python
Matt Harbison <matt_harbison@yahoo.com>
parents: 44292
diff changeset
381
44291
89d44cfcdeeb tags: show how hg behaves if a tags cache entry is truncated
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents: 44290
diff changeset
382 $ hg debugtagscache | tail -2
89d44cfcdeeb tags: show how hg behaves if a tags cache entry is truncated
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents: 44290
diff changeset
383 4 0c192d7d5e6b78a714de54a2e9627952a877e25a 0c04f2a8af31de17fab7422878ee5a2dadbc943d
46495
5aac1a1a5beb tagcache: distinguish between invalid and missing entries
Matt Harbison <matt_harbison@yahoo.com>
parents: 46314
diff changeset
384 5 8dbfe60eff306a54259cfe007db9e330e7ecf866 missing
44291
89d44cfcdeeb tags: show how hg behaves if a tags cache entry is truncated
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents: 44290
diff changeset
385 $ hg tags
44292
f5a7cf0adb12 tags: behave better if a tags cache entry is partially written
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents: 44291
diff changeset
386 tip 5:8dbfe60eff30
f5a7cf0adb12 tags: behave better if a tags cache entry is partially written
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents: 44291
diff changeset
387 bar 1:78391a272241
44291
89d44cfcdeeb tags: show how hg behaves if a tags cache entry is truncated
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents: 44290
diff changeset
388 $ hg debugtagscache | tail -2
89d44cfcdeeb tags: show how hg behaves if a tags cache entry is truncated
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents: 44290
diff changeset
389 4 0c192d7d5e6b78a714de54a2e9627952a877e25a 0c04f2a8af31de17fab7422878ee5a2dadbc943d
44292
f5a7cf0adb12 tags: behave better if a tags cache entry is partially written
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents: 44291
diff changeset
390 5 8dbfe60eff306a54259cfe007db9e330e7ecf866 0c04f2a8af31de17fab7422878ee5a2dadbc943d
44291
89d44cfcdeeb tags: show how hg behaves if a tags cache entry is truncated
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents: 44290
diff changeset
391
46495
5aac1a1a5beb tagcache: distinguish between invalid and missing entries
Matt Harbison <matt_harbison@yahoo.com>
parents: 46314
diff changeset
392 If the 4 bytes of node hash for a record don't match an existing node, the entry
5aac1a1a5beb tagcache: distinguish between invalid and missing entries
Matt Harbison <matt_harbison@yahoo.com>
parents: 46314
diff changeset
393 is flagged as invalid.
5aac1a1a5beb tagcache: distinguish between invalid and missing entries
Matt Harbison <matt_harbison@yahoo.com>
parents: 46314
diff changeset
394
5aac1a1a5beb tagcache: distinguish between invalid and missing entries
Matt Harbison <matt_harbison@yahoo.com>
parents: 46314
diff changeset
395 >>> import os
5aac1a1a5beb tagcache: distinguish between invalid and missing entries
Matt Harbison <matt_harbison@yahoo.com>
parents: 46314
diff changeset
396 >>> with open(".hg/cache/hgtagsfnodes1", "rb+") as fp:
5aac1a1a5beb tagcache: distinguish between invalid and missing entries
Matt Harbison <matt_harbison@yahoo.com>
parents: 46314
diff changeset
397 ... fp.seek(-24, os.SEEK_END) and None
5aac1a1a5beb tagcache: distinguish between invalid and missing entries
Matt Harbison <matt_harbison@yahoo.com>
parents: 46314
diff changeset
398 ... fp.write(b'\xde\xad') and None
5aac1a1a5beb tagcache: distinguish between invalid and missing entries
Matt Harbison <matt_harbison@yahoo.com>
parents: 46314
diff changeset
399
5aac1a1a5beb tagcache: distinguish between invalid and missing entries
Matt Harbison <matt_harbison@yahoo.com>
parents: 46314
diff changeset
400 $ f --size --hexdump .hg/cache/hgtagsfnodes1
5aac1a1a5beb tagcache: distinguish between invalid and missing entries
Matt Harbison <matt_harbison@yahoo.com>
parents: 46314
diff changeset
401 .hg/cache/hgtagsfnodes1: size=144
5aac1a1a5beb tagcache: distinguish between invalid and missing entries
Matt Harbison <matt_harbison@yahoo.com>
parents: 46314
diff changeset
402 0000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
5aac1a1a5beb tagcache: distinguish between invalid and missing entries
Matt Harbison <matt_harbison@yahoo.com>
parents: 46314
diff changeset
403 0010: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
5aac1a1a5beb tagcache: distinguish between invalid and missing entries
Matt Harbison <matt_harbison@yahoo.com>
parents: 46314
diff changeset
404 0020: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
5aac1a1a5beb tagcache: distinguish between invalid and missing entries
Matt Harbison <matt_harbison@yahoo.com>
parents: 46314
diff changeset
405 0030: 7a 94 12 77 0c 04 f2 a8 af 31 de 17 fa b7 42 28 |z..w.....1....B(|
5aac1a1a5beb tagcache: distinguish between invalid and missing entries
Matt Harbison <matt_harbison@yahoo.com>
parents: 46314
diff changeset
406 0040: 78 ee 5a 2d ad bc 94 3d 6f a4 50 21 7d 3b 71 8c |x.Z-...=o.P!};q.|
5aac1a1a5beb tagcache: distinguish between invalid and missing entries
Matt Harbison <matt_harbison@yahoo.com>
parents: 46314
diff changeset
407 0050: 96 4e f3 7b 89 e5 50 eb da fd 57 89 e7 6c e1 b0 |.N.{..P...W..l..|
5aac1a1a5beb tagcache: distinguish between invalid and missing entries
Matt Harbison <matt_harbison@yahoo.com>
parents: 46314
diff changeset
408 0060: 0c 19 2d 7d 0c 04 f2 a8 af 31 de 17 fa b7 42 28 |..-}.....1....B(|
5aac1a1a5beb tagcache: distinguish between invalid and missing entries
Matt Harbison <matt_harbison@yahoo.com>
parents: 46314
diff changeset
409 0070: 78 ee 5a 2d ad bc 94 3d de ad e6 0e 0c 04 f2 a8 |x.Z-...=........|
5aac1a1a5beb tagcache: distinguish between invalid and missing entries
Matt Harbison <matt_harbison@yahoo.com>
parents: 46314
diff changeset
410 0080: af 31 de 17 fa b7 42 28 78 ee 5a 2d ad bc 94 3d |.1....B(x.Z-...=|
5aac1a1a5beb tagcache: distinguish between invalid and missing entries
Matt Harbison <matt_harbison@yahoo.com>
parents: 46314
diff changeset
411
5aac1a1a5beb tagcache: distinguish between invalid and missing entries
Matt Harbison <matt_harbison@yahoo.com>
parents: 46314
diff changeset
412 $ hg debugtagscache | tail -2
5aac1a1a5beb tagcache: distinguish between invalid and missing entries
Matt Harbison <matt_harbison@yahoo.com>
parents: 46314
diff changeset
413 4 0c192d7d5e6b78a714de54a2e9627952a877e25a 0c04f2a8af31de17fab7422878ee5a2dadbc943d
5aac1a1a5beb tagcache: distinguish between invalid and missing entries
Matt Harbison <matt_harbison@yahoo.com>
parents: 46314
diff changeset
414 5 8dbfe60eff306a54259cfe007db9e330e7ecf866 invalid
5aac1a1a5beb tagcache: distinguish between invalid and missing entries
Matt Harbison <matt_harbison@yahoo.com>
parents: 46314
diff changeset
415
5aac1a1a5beb tagcache: distinguish between invalid and missing entries
Matt Harbison <matt_harbison@yahoo.com>
parents: 46314
diff changeset
416 $ hg tags
5aac1a1a5beb tagcache: distinguish between invalid and missing entries
Matt Harbison <matt_harbison@yahoo.com>
parents: 46314
diff changeset
417 tip 5:8dbfe60eff30
5aac1a1a5beb tagcache: distinguish between invalid and missing entries
Matt Harbison <matt_harbison@yahoo.com>
parents: 46314
diff changeset
418 bar 1:78391a272241
5aac1a1a5beb tagcache: distinguish between invalid and missing entries
Matt Harbison <matt_harbison@yahoo.com>
parents: 46314
diff changeset
419
46654
9ea6b75b4a95 tests: demonstrate a case where a corrupt tag cache causes an abort
Matt Harbison <matt_harbison@yahoo.com>
parents: 46495
diff changeset
420 BUG: If the filenode part of an entry in hgtagsfnodes is corrupt and
9ea6b75b4a95 tests: demonstrate a case where a corrupt tag cache causes an abort
Matt Harbison <matt_harbison@yahoo.com>
parents: 46495
diff changeset
421 tags2-visible is missing, `hg tags` aborts. Corrupting the leading 4 bytes of
9ea6b75b4a95 tests: demonstrate a case where a corrupt tag cache causes an abort
Matt Harbison <matt_harbison@yahoo.com>
parents: 46495
diff changeset
422 node hash (as above) doesn't seem to trigger the issue. Also note that the
9ea6b75b4a95 tests: demonstrate a case where a corrupt tag cache causes an abort
Matt Harbison <matt_harbison@yahoo.com>
parents: 46495
diff changeset
423 debug command hides the corruption, both with and without tags2-visible.
9ea6b75b4a95 tests: demonstrate a case where a corrupt tag cache causes an abort
Matt Harbison <matt_harbison@yahoo.com>
parents: 46495
diff changeset
424
9ea6b75b4a95 tests: demonstrate a case where a corrupt tag cache causes an abort
Matt Harbison <matt_harbison@yahoo.com>
parents: 46495
diff changeset
425 $ mv .hg/cache/hgtagsfnodes1 .hg/cache/hgtagsfnodes1.bak
9ea6b75b4a95 tests: demonstrate a case where a corrupt tag cache causes an abort
Matt Harbison <matt_harbison@yahoo.com>
parents: 46495
diff changeset
426 $ hg debugupdatecaches
9ea6b75b4a95 tests: demonstrate a case where a corrupt tag cache causes an abort
Matt Harbison <matt_harbison@yahoo.com>
parents: 46495
diff changeset
427
9ea6b75b4a95 tests: demonstrate a case where a corrupt tag cache causes an abort
Matt Harbison <matt_harbison@yahoo.com>
parents: 46495
diff changeset
428 >>> import os
9ea6b75b4a95 tests: demonstrate a case where a corrupt tag cache causes an abort
Matt Harbison <matt_harbison@yahoo.com>
parents: 46495
diff changeset
429 >>> with open(".hg/cache/hgtagsfnodes1", "rb+") as fp:
9ea6b75b4a95 tests: demonstrate a case where a corrupt tag cache causes an abort
Matt Harbison <matt_harbison@yahoo.com>
parents: 46495
diff changeset
430 ... fp.seek(-16, os.SEEK_END) and None
9ea6b75b4a95 tests: demonstrate a case where a corrupt tag cache causes an abort
Matt Harbison <matt_harbison@yahoo.com>
parents: 46495
diff changeset
431 ... fp.write(b'\xde\xad') and None
9ea6b75b4a95 tests: demonstrate a case where a corrupt tag cache causes an abort
Matt Harbison <matt_harbison@yahoo.com>
parents: 46495
diff changeset
432
9ea6b75b4a95 tests: demonstrate a case where a corrupt tag cache causes an abort
Matt Harbison <matt_harbison@yahoo.com>
parents: 46495
diff changeset
433 $ f --size --hexdump .hg/cache/hgtagsfnodes1
9ea6b75b4a95 tests: demonstrate a case where a corrupt tag cache causes an abort
Matt Harbison <matt_harbison@yahoo.com>
parents: 46495
diff changeset
434 .hg/cache/hgtagsfnodes1: size=144
9ea6b75b4a95 tests: demonstrate a case where a corrupt tag cache causes an abort
Matt Harbison <matt_harbison@yahoo.com>
parents: 46495
diff changeset
435 0000: bb d1 79 df 00 00 00 00 00 00 00 00 00 00 00 00 |..y.............|
9ea6b75b4a95 tests: demonstrate a case where a corrupt tag cache causes an abort
Matt Harbison <matt_harbison@yahoo.com>
parents: 46495
diff changeset
436 0010: 00 00 00 00 00 00 00 00 78 39 1a 27 0c 04 f2 a8 |........x9.'....|
9ea6b75b4a95 tests: demonstrate a case where a corrupt tag cache causes an abort
Matt Harbison <matt_harbison@yahoo.com>
parents: 46495
diff changeset
437 0020: af 31 de 17 fa b7 42 28 78 ee 5a 2d ad bc 94 3d |.1....B(x.Z-...=|
9ea6b75b4a95 tests: demonstrate a case where a corrupt tag cache causes an abort
Matt Harbison <matt_harbison@yahoo.com>
parents: 46495
diff changeset
438 0030: 7a 94 12 77 0c 04 f2 a8 af 31 de 17 fa b7 42 28 |z..w.....1....B(|
9ea6b75b4a95 tests: demonstrate a case where a corrupt tag cache causes an abort
Matt Harbison <matt_harbison@yahoo.com>
parents: 46495
diff changeset
439 0040: 78 ee 5a 2d ad bc 94 3d 6f a4 50 21 7d 3b 71 8c |x.Z-...=o.P!};q.|
9ea6b75b4a95 tests: demonstrate a case where a corrupt tag cache causes an abort
Matt Harbison <matt_harbison@yahoo.com>
parents: 46495
diff changeset
440 0050: 96 4e f3 7b 89 e5 50 eb da fd 57 89 e7 6c e1 b0 |.N.{..P...W..l..|
9ea6b75b4a95 tests: demonstrate a case where a corrupt tag cache causes an abort
Matt Harbison <matt_harbison@yahoo.com>
parents: 46495
diff changeset
441 0060: 0c 19 2d 7d 0c 04 f2 a8 af 31 de 17 fa b7 42 28 |..-}.....1....B(|
9ea6b75b4a95 tests: demonstrate a case where a corrupt tag cache causes an abort
Matt Harbison <matt_harbison@yahoo.com>
parents: 46495
diff changeset
442 0070: 78 ee 5a 2d ad bc 94 3d 8d bf e6 0e 0c 04 f2 a8 |x.Z-...=........|
9ea6b75b4a95 tests: demonstrate a case where a corrupt tag cache causes an abort
Matt Harbison <matt_harbison@yahoo.com>
parents: 46495
diff changeset
443 0080: de ad de 17 fa b7 42 28 78 ee 5a 2d ad bc 94 3d |......B(x.Z-...=|
9ea6b75b4a95 tests: demonstrate a case where a corrupt tag cache causes an abort
Matt Harbison <matt_harbison@yahoo.com>
parents: 46495
diff changeset
444
9ea6b75b4a95 tests: demonstrate a case where a corrupt tag cache causes an abort
Matt Harbison <matt_harbison@yahoo.com>
parents: 46495
diff changeset
445 $ hg debugtagscache | tail -2
9ea6b75b4a95 tests: demonstrate a case where a corrupt tag cache causes an abort
Matt Harbison <matt_harbison@yahoo.com>
parents: 46495
diff changeset
446 4 0c192d7d5e6b78a714de54a2e9627952a877e25a 0c04f2a8af31de17fab7422878ee5a2dadbc943d
46655
e4e971abb6a3 debugtagscache: verify that filenode is correct
Pulkit Goyal <7895pulkit@gmail.com>
parents: 46654
diff changeset
447 5 8dbfe60eff306a54259cfe007db9e330e7ecf866 0c04f2a8deadde17fab7422878ee5a2dadbc943d (unknown node)
46654
9ea6b75b4a95 tests: demonstrate a case where a corrupt tag cache causes an abort
Matt Harbison <matt_harbison@yahoo.com>
parents: 46495
diff changeset
448
9ea6b75b4a95 tests: demonstrate a case where a corrupt tag cache causes an abort
Matt Harbison <matt_harbison@yahoo.com>
parents: 46495
diff changeset
449 $ rm -f .hg/cache/tags2-visible
9ea6b75b4a95 tests: demonstrate a case where a corrupt tag cache causes an abort
Matt Harbison <matt_harbison@yahoo.com>
parents: 46495
diff changeset
450 $ hg debugtagscache | tail -2
9ea6b75b4a95 tests: demonstrate a case where a corrupt tag cache causes an abort
Matt Harbison <matt_harbison@yahoo.com>
parents: 46495
diff changeset
451 4 0c192d7d5e6b78a714de54a2e9627952a877e25a 0c04f2a8af31de17fab7422878ee5a2dadbc943d
46655
e4e971abb6a3 debugtagscache: verify that filenode is correct
Pulkit Goyal <7895pulkit@gmail.com>
parents: 46654
diff changeset
452 5 8dbfe60eff306a54259cfe007db9e330e7ecf866 0c04f2a8deadde17fab7422878ee5a2dadbc943d (unknown node)
46654
9ea6b75b4a95 tests: demonstrate a case where a corrupt tag cache causes an abort
Matt Harbison <matt_harbison@yahoo.com>
parents: 46495
diff changeset
453
9ea6b75b4a95 tests: demonstrate a case where a corrupt tag cache causes an abort
Matt Harbison <matt_harbison@yahoo.com>
parents: 46495
diff changeset
454 $ hg tags
46656
9a31f65381ae tags: validate nodes in _getfnodes() and update cache in case of unknown nodes
Pulkit Goyal <7895pulkit@gmail.com>
parents: 46655
diff changeset
455 tip 5:8dbfe60eff30
9a31f65381ae tags: validate nodes in _getfnodes() and update cache in case of unknown nodes
Pulkit Goyal <7895pulkit@gmail.com>
parents: 46655
diff changeset
456 bar 1:78391a272241
46654
9ea6b75b4a95 tests: demonstrate a case where a corrupt tag cache causes an abort
Matt Harbison <matt_harbison@yahoo.com>
parents: 46495
diff changeset
457
9ea6b75b4a95 tests: demonstrate a case where a corrupt tag cache causes an abort
Matt Harbison <matt_harbison@yahoo.com>
parents: 46495
diff changeset
458 BUG: Unless this file is restored, the `hg tags` in the next unix-permissions
9ea6b75b4a95 tests: demonstrate a case where a corrupt tag cache causes an abort
Matt Harbison <matt_harbison@yahoo.com>
parents: 46495
diff changeset
459 conditional will fail: "abort: data/.hgtags.i@0c04f2a8dead: no match found"
9ea6b75b4a95 tests: demonstrate a case where a corrupt tag cache causes an abort
Matt Harbison <matt_harbison@yahoo.com>
parents: 46495
diff changeset
460
9ea6b75b4a95 tests: demonstrate a case where a corrupt tag cache causes an abort
Matt Harbison <matt_harbison@yahoo.com>
parents: 46495
diff changeset
461 $ mv .hg/cache/hgtagsfnodes1.bak .hg/cache/hgtagsfnodes1
9ea6b75b4a95 tests: demonstrate a case where a corrupt tag cache causes an abort
Matt Harbison <matt_harbison@yahoo.com>
parents: 46495
diff changeset
462
24735
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
463 #if unix-permissions no-root
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
464 Errors writing to .hgtags fnodes cache are silently ignored
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
465
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
466 $ echo dummy2 > foo
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
467 $ hg commit -m throwaway2
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
468
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
469 $ chmod a-w .hg/cache/hgtagsfnodes1
24762
1062663808ce tags: write a separate tags cache file for unfiltered repos
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24760
diff changeset
470 $ rm -f .hg/cache/tags2-visible
24735
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
471
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
472 $ hg tags
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
473 tip 6:b968051b5cf3
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
474 bar 1:78391a272241
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
475
28025
ab6468270b83 blackbox: flush output file descriptor
timeless <timeless@mozdev.org>
parents: 26185
diff changeset
476 $ hg blackbox -l 6
28245
caa2a0c6fbb7 blackbox: log working directory version
timeless <timeless@mozdev.org>
parents: 28242
diff changeset
477 1970/01/01 00:00:00 bob @b968051b5cf3f624b771779c6d5f84f1d4c3fb5d (5000)> tags
33752
82c39a8ec3b1 hg: avoid relying on errno numbers / descriptions
Tristan Seligmann <mithrandi@mithrandi.net>
parents: 33428
diff changeset
478 1970/01/01 00:00:00 bob @b968051b5cf3f624b771779c6d5f84f1d4c3fb5d (5000)> couldn't write cache/hgtagsfnodes1: [Errno *] * (glob)
46495
5aac1a1a5beb tagcache: distinguish between invalid and missing entries
Matt Harbison <matt_harbison@yahoo.com>
parents: 46314
diff changeset
479 1970/01/01 00:00:00 bob @b968051b5cf3f624b771779c6d5f84f1d4c3fb5d (5000)> 2/4 cache hits/lookups in * seconds (glob)
28245
caa2a0c6fbb7 blackbox: log working directory version
timeless <timeless@mozdev.org>
parents: 28242
diff changeset
480 1970/01/01 00:00:00 bob @b968051b5cf3f624b771779c6d5f84f1d4c3fb5d (5000)> writing .hg/cache/tags2-visible with 1 tags
28247
d2c0527af364 blackbox: store the blackbox ui object instead of the log file
timeless <timeless@mozdev.org>
parents: 28246
diff changeset
481 1970/01/01 00:00:00 bob @b968051b5cf3f624b771779c6d5f84f1d4c3fb5d (5000)> tags exited 0 after * seconds (glob)
28245
caa2a0c6fbb7 blackbox: log working directory version
timeless <timeless@mozdev.org>
parents: 28242
diff changeset
482 1970/01/01 00:00:00 bob @b968051b5cf3f624b771779c6d5f84f1d4c3fb5d (5000)> blackbox -l 6
24735
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
483
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
484 $ chmod a+w .hg/cache/hgtagsfnodes1
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
485
24762
1062663808ce tags: write a separate tags cache file for unfiltered repos
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24760
diff changeset
486 $ rm -f .hg/cache/tags2-visible
24735
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
487 $ hg tags
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
488 tip 6:b968051b5cf3
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
489 bar 1:78391a272241
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
490
28025
ab6468270b83 blackbox: flush output file descriptor
timeless <timeless@mozdev.org>
parents: 26185
diff changeset
491 $ hg blackbox -l 6
28245
caa2a0c6fbb7 blackbox: log working directory version
timeless <timeless@mozdev.org>
parents: 28242
diff changeset
492 1970/01/01 00:00:00 bob @b968051b5cf3f624b771779c6d5f84f1d4c3fb5d (5000)> tags
caa2a0c6fbb7 blackbox: log working directory version
timeless <timeless@mozdev.org>
parents: 28242
diff changeset
493 1970/01/01 00:00:00 bob @b968051b5cf3f624b771779c6d5f84f1d4c3fb5d (5000)> writing 24 bytes to cache/hgtagsfnodes1
46495
5aac1a1a5beb tagcache: distinguish between invalid and missing entries
Matt Harbison <matt_harbison@yahoo.com>
parents: 46314
diff changeset
494 1970/01/01 00:00:00 bob @b968051b5cf3f624b771779c6d5f84f1d4c3fb5d (5000)> 2/4 cache hits/lookups in * seconds (glob)
28245
caa2a0c6fbb7 blackbox: log working directory version
timeless <timeless@mozdev.org>
parents: 28242
diff changeset
495 1970/01/01 00:00:00 bob @b968051b5cf3f624b771779c6d5f84f1d4c3fb5d (5000)> writing .hg/cache/tags2-visible with 1 tags
28247
d2c0527af364 blackbox: store the blackbox ui object instead of the log file
timeless <timeless@mozdev.org>
parents: 28246
diff changeset
496 1970/01/01 00:00:00 bob @b968051b5cf3f624b771779c6d5f84f1d4c3fb5d (5000)> tags exited 0 after * seconds (glob)
28245
caa2a0c6fbb7 blackbox: log working directory version
timeless <timeless@mozdev.org>
parents: 28242
diff changeset
497 1970/01/01 00:00:00 bob @b968051b5cf3f624b771779c6d5f84f1d4c3fb5d (5000)> blackbox -l 6
24735
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
498
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
499 $ f --size .hg/cache/hgtagsfnodes1
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
500 .hg/cache/hgtagsfnodes1: size=168
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
501
24801
f379428a0754 tests: fix test-tags on vfat
Matt Mackall <mpm@selenic.com>
parents: 24763
diff changeset
502 $ hg -q --config extensions.strip= strip -r 6 --no-backup
f379428a0754 tests: fix test-tags on vfat
Matt Mackall <mpm@selenic.com>
parents: 24763
diff changeset
503 #endif
f379428a0754 tests: fix test-tags on vfat
Matt Mackall <mpm@selenic.com>
parents: 24763
diff changeset
504
24735
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
505 Stripping doesn't truncate the tags cache until new data is available
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
506
24801
f379428a0754 tests: fix test-tags on vfat
Matt Mackall <mpm@selenic.com>
parents: 24763
diff changeset
507 $ rm -f .hg/cache/hgtagsfnodes1 .hg/cache/tags2-visible
24802
2ee10789d66b tests: fix up whitespace complaint
Matt Mackall <mpm@selenic.com>
parents: 24801
diff changeset
508 $ hg tags
24801
f379428a0754 tests: fix test-tags on vfat
Matt Mackall <mpm@selenic.com>
parents: 24763
diff changeset
509 tip 5:8dbfe60eff30
f379428a0754 tests: fix test-tags on vfat
Matt Mackall <mpm@selenic.com>
parents: 24763
diff changeset
510 bar 1:78391a272241
f379428a0754 tests: fix test-tags on vfat
Matt Mackall <mpm@selenic.com>
parents: 24763
diff changeset
511
f379428a0754 tests: fix test-tags on vfat
Matt Mackall <mpm@selenic.com>
parents: 24763
diff changeset
512 $ f --size .hg/cache/hgtagsfnodes1
f379428a0754 tests: fix test-tags on vfat
Matt Mackall <mpm@selenic.com>
parents: 24763
diff changeset
513 .hg/cache/hgtagsfnodes1: size=144
f379428a0754 tests: fix test-tags on vfat
Matt Mackall <mpm@selenic.com>
parents: 24763
diff changeset
514
24735
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
515 $ hg -q --config extensions.strip= strip -r 5 --no-backup
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
516 $ hg tags
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
517 tip 4:0c192d7d5e6b
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
518 bar 1:78391a272241
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
519
28025
ab6468270b83 blackbox: flush output file descriptor
timeless <timeless@mozdev.org>
parents: 26185
diff changeset
520 $ hg blackbox -l 5
28245
caa2a0c6fbb7 blackbox: log working directory version
timeless <timeless@mozdev.org>
parents: 28242
diff changeset
521 1970/01/01 00:00:00 bob @0c192d7d5e6b78a714de54a2e9627952a877e25a (5000)> writing 24 bytes to cache/hgtagsfnodes1
42237
9f45d3d526f9 hgtagsfnodescache: inherit fnode from parent when possible
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 41490
diff changeset
522 1970/01/01 00:00:00 bob @0c192d7d5e6b78a714de54a2e9627952a877e25a (5000)> 2/4 cache hits/lookups in * seconds (glob)
28245
caa2a0c6fbb7 blackbox: log working directory version
timeless <timeless@mozdev.org>
parents: 28242
diff changeset
523 1970/01/01 00:00:00 bob @0c192d7d5e6b78a714de54a2e9627952a877e25a (5000)> writing .hg/cache/tags2-visible with 1 tags
28247
d2c0527af364 blackbox: store the blackbox ui object instead of the log file
timeless <timeless@mozdev.org>
parents: 28246
diff changeset
524 1970/01/01 00:00:00 bob @0c192d7d5e6b78a714de54a2e9627952a877e25a (5000)> tags exited 0 after * seconds (glob)
28245
caa2a0c6fbb7 blackbox: log working directory version
timeless <timeless@mozdev.org>
parents: 28242
diff changeset
525 1970/01/01 00:00:00 bob @0c192d7d5e6b78a714de54a2e9627952a877e25a (5000)> blackbox -l 5
24735
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
526
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
527 $ f --size .hg/cache/hgtagsfnodes1
24801
f379428a0754 tests: fix test-tags on vfat
Matt Mackall <mpm@selenic.com>
parents: 24763
diff changeset
528 .hg/cache/hgtagsfnodes1: size=120
24735
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
529
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
530 $ echo dummy > foo
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
531 $ hg commit -m throwaway3
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
532
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
533 $ hg tags
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
534 tip 5:035f65efb448
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
535 bar 1:78391a272241
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
536
28025
ab6468270b83 blackbox: flush output file descriptor
timeless <timeless@mozdev.org>
parents: 26185
diff changeset
537 $ hg blackbox -l 6
28245
caa2a0c6fbb7 blackbox: log working directory version
timeless <timeless@mozdev.org>
parents: 28242
diff changeset
538 1970/01/01 00:00:00 bob @035f65efb448350f4772141702a81ab1df48c465 (5000)> tags
caa2a0c6fbb7 blackbox: log working directory version
timeless <timeless@mozdev.org>
parents: 28242
diff changeset
539 1970/01/01 00:00:00 bob @035f65efb448350f4772141702a81ab1df48c465 (5000)> writing 24 bytes to cache/hgtagsfnodes1
42237
9f45d3d526f9 hgtagsfnodescache: inherit fnode from parent when possible
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 41490
diff changeset
540 1970/01/01 00:00:00 bob @035f65efb448350f4772141702a81ab1df48c465 (5000)> 3/4 cache hits/lookups in * seconds (glob)
28245
caa2a0c6fbb7 blackbox: log working directory version
timeless <timeless@mozdev.org>
parents: 28242
diff changeset
541 1970/01/01 00:00:00 bob @035f65efb448350f4772141702a81ab1df48c465 (5000)> writing .hg/cache/tags2-visible with 1 tags
28247
d2c0527af364 blackbox: store the blackbox ui object instead of the log file
timeless <timeless@mozdev.org>
parents: 28246
diff changeset
542 1970/01/01 00:00:00 bob @035f65efb448350f4772141702a81ab1df48c465 (5000)> tags exited 0 after * seconds (glob)
28245
caa2a0c6fbb7 blackbox: log working directory version
timeless <timeless@mozdev.org>
parents: 28242
diff changeset
543 1970/01/01 00:00:00 bob @035f65efb448350f4772141702a81ab1df48c465 (5000)> blackbox -l 6
24735
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
544 $ f --size .hg/cache/hgtagsfnodes1
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
545 .hg/cache/hgtagsfnodes1: size=144
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
546
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
547 $ hg -q --config extensions.strip= strip -r 5 --no-backup
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
548
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
549 Test tag removal:
9144
ad72e3b08bc0 test-tags: enhance the test to probe tag caching better (issue548).
Greg Ward <greg-hg@gerg.ca>
parents: 9143
diff changeset
550
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
551 $ hg tag --remove bar # rev 5
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
552 $ hg tip -vp
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
553 changeset: 5:5f6e8655b1c7
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
554 tag: tip
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
555 user: test
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
556 date: Thu Jan 01 00:00:00 1970 +0000
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
557 files: .hgtags
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
558 description:
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
559 Removed tag bar
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
560
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
561
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
562 diff -r 0c192d7d5e6b -r 5f6e8655b1c7 .hgtags
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
563 --- a/.hgtags Thu Jan 01 00:00:00 1970 +0000
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
564 +++ b/.hgtags Thu Jan 01 00:00:00 1970 +0000
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
565 @@ -1,1 +1,3 @@
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
566 bbd179dfa0a71671c253b3ae0aa1513b60d199fa bar
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
567 +78391a272241d70354aa14c874552cad6b51bb42 bar
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
568 +0000000000000000000000000000000000000000 bar
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
569
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
570 $ hg tags
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
571 tip 5:5f6e8655b1c7
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
572 $ hg tags # again, try to expose cache bugs
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
573 tip 5:5f6e8655b1c7
4213
3be4785f8994 tags: add --remove
Matt Mackall <mpm@selenic.com>
parents: 4211
diff changeset
574
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
575 Remove nonexistent tag:
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
576
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
577 $ hg tag --remove foobar
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
578 abort: tag 'foobar' does not exist
45827
8d72e29ad1e0 errors: introduce InputError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 45435
diff changeset
579 [10]
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
580 $ hg tip
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
581 changeset: 5:5f6e8655b1c7
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
582 tag: tip
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
583 user: test
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
584 date: Thu Jan 01 00:00:00 1970 +0000
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
585 summary: Removed tag bar
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
586
4266
fe7f38dda34b tags: fix abababa case, with test case
Matt Mackall <mpm@selenic.com>
parents: 4213
diff changeset
587
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
588 Undo a tag with rollback:
4651
7176f278d6f9 Test attempt to remove nonexistent tag
Brendan Cully <brendan@kublai.com>
parents: 4482
diff changeset
589
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
590 $ hg rollback # destroy rev 5 (restore bar)
13446
1e497df514e2 rollback: clarifies the message about the reverted state (issue2628)
Gilles Moris <gilles.moris@free.fr>
parents: 13272
diff changeset
591 repository tip rolled back to revision 4 (undo commit)
1e497df514e2 rollback: clarifies the message about the reverted state (issue2628)
Gilles Moris <gilles.moris@free.fr>
parents: 13272
diff changeset
592 working directory now based on revision 4
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
593 $ hg tags
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
594 tip 4:0c192d7d5e6b
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
595 bar 1:78391a272241
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
596 $ hg tags
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
597 tip 4:0c192d7d5e6b
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
598 bar 1:78391a272241
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
599
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
600 Test tag rank:
9144
ad72e3b08bc0 test-tags: enhance the test to probe tag caching better (issue548).
Greg Ward <greg-hg@gerg.ca>
parents: 9143
diff changeset
601
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
602 $ cd ..
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
603 $ hg init t3
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
604 $ cd t3
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
605 $ echo foo > foo
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
606 $ hg add foo
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
607 $ hg ci -m 'add foo' # rev 0
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
608 $ hg tag -f bar # rev 1 bar -> 0
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
609 $ hg tag -f bar # rev 2 bar -> 1
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
610 $ hg tag -fr 0 bar # rev 3 bar -> 0
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
611 $ hg tag -fr 1 bar # rev 4 bar -> 1
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
612 $ hg tag -fr 0 bar # rev 5 bar -> 0
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
613 $ hg tags
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
614 tip 5:85f05169d91d
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
615 bar 0:bbd179dfa0a7
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
616 $ hg co 3
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
617 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
618 $ echo barbar > foo
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
619 $ hg ci -m 'change foo' # rev 6
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
620 created new head
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
621 $ hg tags
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
622 tip 6:735c3ca72986
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
623 bar 0:bbd179dfa0a7
4267
8185a1ca8628 tags: require -f to replace an existing tag
Matt Mackall <mpm@selenic.com>
parents: 4266
diff changeset
624
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
625 Don't allow moving tag without -f:
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
626
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
627 $ hg tag -r 3 bar
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
628 abort: tag 'bar' already exists (use -f to force)
45827
8d72e29ad1e0 errors: introduce InputError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 45435
diff changeset
629 [10]
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
630 $ hg tags
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
631 tip 6:735c3ca72986
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
632 bar 0:bbd179dfa0a7
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
633
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
634 Strip 1: expose an old head:
4482
99f411ba0380 use .extend instead of .append in readtags
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4267
diff changeset
635
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
636 $ hg --config extensions.mq= strip 5
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12376
diff changeset
637 saved backup bundle to $TESTTMP/t3/.hg/strip-backup/*-backup.hg (glob)
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
638 $ hg tags # partly stale cache
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
639 tip 5:735c3ca72986
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
640 bar 1:78391a272241
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
641 $ hg tags # up-to-date cache
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
642 tip 5:735c3ca72986
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
643 bar 1:78391a272241
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
644
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
645 Strip 2: destroy whole branch, no old head exposed
9144
ad72e3b08bc0 test-tags: enhance the test to probe tag caching better (issue548).
Greg Ward <greg-hg@gerg.ca>
parents: 9143
diff changeset
646
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
647 $ hg --config extensions.mq= strip 4
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12376
diff changeset
648 saved backup bundle to $TESTTMP/t3/.hg/strip-backup/*-backup.hg (glob)
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
649 $ hg tags # partly stale
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
650 tip 4:735c3ca72986
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
651 bar 0:bbd179dfa0a7
24762
1062663808ce tags: write a separate tags cache file for unfiltered repos
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24760
diff changeset
652 $ rm -f .hg/cache/tags2-visible
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
653 $ hg tags # cold cache
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
654 tip 4:735c3ca72986
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
655 bar 0:bbd179dfa0a7
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
656
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
657 Test tag rank with 3 heads:
5657
47915bf68c44 Properly check tag's existence as a local/global tag when removing it.
Osku Salerma <osku@iki.fi>
parents: 5524
diff changeset
658
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
659 $ cd ..
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
660 $ hg init t4
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
661 $ cd t4
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
662 $ echo foo > foo
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
663 $ hg add
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
664 adding foo
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
665 $ hg ci -m 'add foo' # rev 0
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
666 $ hg tag bar # rev 1 bar -> 0
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
667 $ hg tag -f bar # rev 2 bar -> 1
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
668 $ hg up -qC 0
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
669 $ hg tag -fr 2 bar # rev 3 bar -> 2
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
670 $ hg tags
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
671 tip 3:197c21bbbf2c
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
672 bar 2:6fa450212aeb
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
673 $ hg up -qC 0
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
674 $ hg tag -m 'retag rev 0' -fr 0 bar # rev 4 bar -> 0, but bar stays at 2
5657
47915bf68c44 Properly check tag's existence as a local/global tag when removing it.
Osku Salerma <osku@iki.fi>
parents: 5524
diff changeset
675
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
676 Bar should still point to rev 2:
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
677
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
678 $ hg tags
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
679 tip 4:3b4b14ed0202
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
680 bar 2:6fa450212aeb
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
681
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
682 Test that removing global/local tags does not get confused when trying
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
683 to remove a tag of type X which actually only exists as a type Y:
5657
47915bf68c44 Properly check tag's existence as a local/global tag when removing it.
Osku Salerma <osku@iki.fi>
parents: 5524
diff changeset
684
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
685 $ cd ..
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
686 $ hg init t5
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
687 $ cd t5
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
688 $ echo foo > foo
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
689 $ hg add
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
690 adding foo
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
691 $ hg ci -m 'add foo' # rev 0
5657
47915bf68c44 Properly check tag's existence as a local/global tag when removing it.
Osku Salerma <osku@iki.fi>
parents: 5524
diff changeset
692
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
693 $ hg tag -r 0 -l localtag
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
694 $ hg tag --remove localtag
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
695 abort: tag 'localtag' is not a global tag
45827
8d72e29ad1e0 errors: introduce InputError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 45435
diff changeset
696 [10]
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
697 $
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
698 $ hg tag -r 0 globaltag
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
699 $ hg tag --remove -l globaltag
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
700 abort: tag 'globaltag' is not a local tag
45827
8d72e29ad1e0 errors: introduce InputError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 45435
diff changeset
701 [10]
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
702 $ hg tags -v
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
703 tip 1:a0b6fe111088
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
704 localtag 0:bbd179dfa0a7 local
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
705 globaltag 0:bbd179dfa0a7
16913
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 16857
diff changeset
706
38430
5d9b765dbe15 tags: unblock log-like template keywords and functions
Yuya Nishihara <yuya@tcha.org>
parents: 37842
diff changeset
707 Templated output:
5d9b765dbe15 tags: unblock log-like template keywords and functions
Yuya Nishihara <yuya@tcha.org>
parents: 37842
diff changeset
708
5d9b765dbe15 tags: unblock log-like template keywords and functions
Yuya Nishihara <yuya@tcha.org>
parents: 37842
diff changeset
709 (immediate values)
5d9b765dbe15 tags: unblock log-like template keywords and functions
Yuya Nishihara <yuya@tcha.org>
parents: 37842
diff changeset
710
5d9b765dbe15 tags: unblock log-like template keywords and functions
Yuya Nishihara <yuya@tcha.org>
parents: 37842
diff changeset
711 $ hg tags -T '{pad(tag, 9)} {rev}:{node} ({type})\n'
5d9b765dbe15 tags: unblock log-like template keywords and functions
Yuya Nishihara <yuya@tcha.org>
parents: 37842
diff changeset
712 tip 1:a0b6fe111088c8c29567d3876cc466aa02927cae ()
5d9b765dbe15 tags: unblock log-like template keywords and functions
Yuya Nishihara <yuya@tcha.org>
parents: 37842
diff changeset
713 localtag 0:bbd179dfa0a71671c253b3ae0aa1513b60d199fa (local)
5d9b765dbe15 tags: unblock log-like template keywords and functions
Yuya Nishihara <yuya@tcha.org>
parents: 37842
diff changeset
714 globaltag 0:bbd179dfa0a71671c253b3ae0aa1513b60d199fa ()
5d9b765dbe15 tags: unblock log-like template keywords and functions
Yuya Nishihara <yuya@tcha.org>
parents: 37842
diff changeset
715
5d9b765dbe15 tags: unblock log-like template keywords and functions
Yuya Nishihara <yuya@tcha.org>
parents: 37842
diff changeset
716 (ctx/revcache dependent)
5d9b765dbe15 tags: unblock log-like template keywords and functions
Yuya Nishihara <yuya@tcha.org>
parents: 37842
diff changeset
717
5d9b765dbe15 tags: unblock log-like template keywords and functions
Yuya Nishihara <yuya@tcha.org>
parents: 37842
diff changeset
718 $ hg tags -T '{pad(tag, 9)} {rev} {file_adds}\n'
5d9b765dbe15 tags: unblock log-like template keywords and functions
Yuya Nishihara <yuya@tcha.org>
parents: 37842
diff changeset
719 tip 1 .hgtags
5d9b765dbe15 tags: unblock log-like template keywords and functions
Yuya Nishihara <yuya@tcha.org>
parents: 37842
diff changeset
720 localtag 0 foo
5d9b765dbe15 tags: unblock log-like template keywords and functions
Yuya Nishihara <yuya@tcha.org>
parents: 37842
diff changeset
721 globaltag 0 foo
5d9b765dbe15 tags: unblock log-like template keywords and functions
Yuya Nishihara <yuya@tcha.org>
parents: 37842
diff changeset
722
5d9b765dbe15 tags: unblock log-like template keywords and functions
Yuya Nishihara <yuya@tcha.org>
parents: 37842
diff changeset
723 $ hg tags -T '{pad(tag, 9)} {rev}:{node|shortest}\n'
5d9b765dbe15 tags: unblock log-like template keywords and functions
Yuya Nishihara <yuya@tcha.org>
parents: 37842
diff changeset
724 tip 1:a0b6
5d9b765dbe15 tags: unblock log-like template keywords and functions
Yuya Nishihara <yuya@tcha.org>
parents: 37842
diff changeset
725 localtag 0:bbd1
5d9b765dbe15 tags: unblock log-like template keywords and functions
Yuya Nishihara <yuya@tcha.org>
parents: 37842
diff changeset
726 globaltag 0:bbd1
5d9b765dbe15 tags: unblock log-like template keywords and functions
Yuya Nishihara <yuya@tcha.org>
parents: 37842
diff changeset
727
19108
cb95716da5fe tags: update tag type only if tag node is updated (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17345
diff changeset
728 Test for issue3911
cb95716da5fe tags: update tag type only if tag node is updated (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17345
diff changeset
729
cb95716da5fe tags: update tag type only if tag node is updated (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17345
diff changeset
730 $ hg tag -r 0 -l localtag2
cb95716da5fe tags: update tag type only if tag node is updated (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17345
diff changeset
731 $ hg tag -l --remove localtag2
cb95716da5fe tags: update tag type only if tag node is updated (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17345
diff changeset
732 $ hg tags -v
cb95716da5fe tags: update tag type only if tag node is updated (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17345
diff changeset
733 tip 1:a0b6fe111088
cb95716da5fe tags: update tag type only if tag node is updated (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17345
diff changeset
734 localtag 0:bbd179dfa0a7 local
cb95716da5fe tags: update tag type only if tag node is updated (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17345
diff changeset
735 globaltag 0:bbd179dfa0a7
cb95716da5fe tags: update tag type only if tag node is updated (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17345
diff changeset
736
cb95716da5fe tags: update tag type only if tag node is updated (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17345
diff changeset
737 $ hg tag -r 1 -f localtag
cb95716da5fe tags: update tag type only if tag node is updated (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17345
diff changeset
738 $ hg tags -v
cb95716da5fe tags: update tag type only if tag node is updated (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17345
diff changeset
739 tip 2:5c70a037bb37
cb95716da5fe tags: update tag type only if tag node is updated (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17345
diff changeset
740 localtag 1:a0b6fe111088
cb95716da5fe tags: update tag type only if tag node is updated (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17345
diff changeset
741 globaltag 0:bbd179dfa0a7
cb95716da5fe tags: update tag type only if tag node is updated (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17345
diff changeset
742
19646
335a558f81dc tags: write tag overwriting history also into tag cache file (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19108
diff changeset
743 $ hg tags -v
335a558f81dc tags: write tag overwriting history also into tag cache file (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19108
diff changeset
744 tip 2:5c70a037bb37
335a558f81dc tags: write tag overwriting history also into tag cache file (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19108
diff changeset
745 localtag 1:a0b6fe111088
335a558f81dc tags: write tag overwriting history also into tag cache file (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19108
diff changeset
746 globaltag 0:bbd179dfa0a7
335a558f81dc tags: write tag overwriting history also into tag cache file (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19108
diff changeset
747
19108
cb95716da5fe tags: update tag type only if tag node is updated (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17345
diff changeset
748 $ hg tag -r 1 localtag2
cb95716da5fe tags: update tag type only if tag node is updated (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17345
diff changeset
749 $ hg tags -v
cb95716da5fe tags: update tag type only if tag node is updated (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17345
diff changeset
750 tip 3:bbfb8cd42be2
cb95716da5fe tags: update tag type only if tag node is updated (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17345
diff changeset
751 localtag2 1:a0b6fe111088
cb95716da5fe tags: update tag type only if tag node is updated (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17345
diff changeset
752 localtag 1:a0b6fe111088
cb95716da5fe tags: update tag type only if tag node is updated (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17345
diff changeset
753 globaltag 0:bbd179dfa0a7
cb95716da5fe tags: update tag type only if tag node is updated (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17345
diff changeset
754
19646
335a558f81dc tags: write tag overwriting history also into tag cache file (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19108
diff changeset
755 $ hg tags -v
335a558f81dc tags: write tag overwriting history also into tag cache file (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19108
diff changeset
756 tip 3:bbfb8cd42be2
335a558f81dc tags: write tag overwriting history also into tag cache file (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19108
diff changeset
757 localtag2 1:a0b6fe111088
335a558f81dc tags: write tag overwriting history also into tag cache file (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19108
diff changeset
758 localtag 1:a0b6fe111088
335a558f81dc tags: write tag overwriting history also into tag cache file (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19108
diff changeset
759 globaltag 0:bbd179dfa0a7
335a558f81dc tags: write tag overwriting history also into tag cache file (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19108
diff changeset
760
16913
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 16857
diff changeset
761 $ cd ..
25402
0c2ded041d10 exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24806
diff changeset
762
0c2ded041d10 exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24806
diff changeset
763 Create a repository with tags data to test .hgtags fnodes transfer
0c2ded041d10 exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24806
diff changeset
764
0c2ded041d10 exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24806
diff changeset
765 $ hg init tagsserver
0c2ded041d10 exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24806
diff changeset
766 $ cd tagsserver
0c2ded041d10 exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24806
diff changeset
767 $ touch foo
0c2ded041d10 exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24806
diff changeset
768 $ hg -q commit -A -m initial
0c2ded041d10 exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24806
diff changeset
769 $ hg tag -m 'tag 0.1' 0.1
0c2ded041d10 exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24806
diff changeset
770 $ echo second > foo
0c2ded041d10 exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24806
diff changeset
771 $ hg commit -m second
0c2ded041d10 exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24806
diff changeset
772 $ hg tag -m 'tag 0.2' 0.2
0c2ded041d10 exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24806
diff changeset
773 $ hg tags
0c2ded041d10 exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24806
diff changeset
774 tip 3:40f0358cb314
0c2ded041d10 exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24806
diff changeset
775 0.2 2:f63cc8fe54e4
0c2ded041d10 exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24806
diff changeset
776 0.1 0:96ee1d7354c4
0c2ded041d10 exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24806
diff changeset
777 $ cd ..
0c2ded041d10 exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24806
diff changeset
778
0c2ded041d10 exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24806
diff changeset
779 Cloning should pull down hgtags fnodes mappings and write the cache file
0c2ded041d10 exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24806
diff changeset
780
29670
90d87ecbdcd8 tests: remove bundle2 activation from test-tags.t
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 29038
diff changeset
781 $ hg clone --pull tagsserver tagsclient
25402
0c2ded041d10 exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24806
diff changeset
782 requesting all changes
0c2ded041d10 exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24806
diff changeset
783 adding changesets
0c2ded041d10 exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24806
diff changeset
784 adding manifests
0c2ded041d10 exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24806
diff changeset
785 adding file changes
0c2ded041d10 exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24806
diff changeset
786 added 4 changesets with 4 changes to 2 files
34661
eb586ed5d8ce transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 34025
diff changeset
787 new changesets 96ee1d7354c4:40f0358cb314
25402
0c2ded041d10 exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24806
diff changeset
788 updating to branch default
0c2ded041d10 exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24806
diff changeset
789 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
0c2ded041d10 exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24806
diff changeset
790
0c2ded041d10 exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24806
diff changeset
791 Missing tags2* files means the cache wasn't written through the normal mechanism.
0c2ded041d10 exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24806
diff changeset
792
0c2ded041d10 exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24806
diff changeset
793 $ ls tagsclient/.hg/cache
32304
37bcb4665529 tests: fix up recent conditionalized output changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 32268
diff changeset
794 branch2-base
46314
95a615dd77bf clone: make sure we warm the cache after a clone
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45827
diff changeset
795 branch2-immutable
95a615dd77bf clone: make sure we warm the cache after a clone
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45827
diff changeset
796 branch2-served
95a615dd77bf clone: make sure we warm the cache after a clone
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45827
diff changeset
797 branch2-served.hidden
95a615dd77bf clone: make sure we warm the cache after a clone
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45827
diff changeset
798 branch2-visible
95a615dd77bf clone: make sure we warm the cache after a clone
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45827
diff changeset
799 branch2-visible-hidden
25402
0c2ded041d10 exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24806
diff changeset
800 hgtagsfnodes1
36968
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36965
diff changeset
801 rbc-names-v1
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36965
diff changeset
802 rbc-revs-v1
46314
95a615dd77bf clone: make sure we warm the cache after a clone
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45827
diff changeset
803 tags2
95a615dd77bf clone: make sure we warm the cache after a clone
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45827
diff changeset
804 tags2-served
25402
0c2ded041d10 exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24806
diff changeset
805
0c2ded041d10 exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24806
diff changeset
806 Cache should contain the head only, even though other nodes have tags data
0c2ded041d10 exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24806
diff changeset
807
0c2ded041d10 exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24806
diff changeset
808 $ f --size --hexdump tagsclient/.hg/cache/hgtagsfnodes1
0c2ded041d10 exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24806
diff changeset
809 tagsclient/.hg/cache/hgtagsfnodes1: size=96
47183
8be95673eb8a cache: avoid warming the fnodetags cache after clone
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46656
diff changeset
810 0000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
8be95673eb8a cache: avoid warming the fnodetags cache after clone
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46656
diff changeset
811 0010: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
8be95673eb8a cache: avoid warming the fnodetags cache after clone
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46656
diff changeset
812 0020: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
8be95673eb8a cache: avoid warming the fnodetags cache after clone
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46656
diff changeset
813 0030: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
8be95673eb8a cache: avoid warming the fnodetags cache after clone
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46656
diff changeset
814 0040: ff ff ff ff ff ff ff ff 40 f0 35 8c 19 e0 a7 d3 |........@.5.....|
25402
0c2ded041d10 exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24806
diff changeset
815 0050: 8a 5c 6a 82 4d cf fb a5 87 d0 2f a3 1e 4f 2f 8a |.\j.M...../..O/.|
0c2ded041d10 exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24806
diff changeset
816
0c2ded041d10 exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24806
diff changeset
817 Running hg tags should produce tags2* file and not change cache
0c2ded041d10 exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24806
diff changeset
818
0c2ded041d10 exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24806
diff changeset
819 $ hg -R tagsclient tags
0c2ded041d10 exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24806
diff changeset
820 tip 3:40f0358cb314
0c2ded041d10 exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24806
diff changeset
821 0.2 2:f63cc8fe54e4
0c2ded041d10 exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24806
diff changeset
822 0.1 0:96ee1d7354c4
0c2ded041d10 exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24806
diff changeset
823
0c2ded041d10 exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24806
diff changeset
824 $ ls tagsclient/.hg/cache
32304
37bcb4665529 tests: fix up recent conditionalized output changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 32268
diff changeset
825 branch2-base
46314
95a615dd77bf clone: make sure we warm the cache after a clone
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45827
diff changeset
826 branch2-immutable
95a615dd77bf clone: make sure we warm the cache after a clone
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45827
diff changeset
827 branch2-served
95a615dd77bf clone: make sure we warm the cache after a clone
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45827
diff changeset
828 branch2-served.hidden
95a615dd77bf clone: make sure we warm the cache after a clone
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45827
diff changeset
829 branch2-visible
95a615dd77bf clone: make sure we warm the cache after a clone
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45827
diff changeset
830 branch2-visible-hidden
25402
0c2ded041d10 exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24806
diff changeset
831 hgtagsfnodes1
36968
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36965
diff changeset
832 rbc-names-v1
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36965
diff changeset
833 rbc-revs-v1
46314
95a615dd77bf clone: make sure we warm the cache after a clone
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45827
diff changeset
834 tags2
95a615dd77bf clone: make sure we warm the cache after a clone
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45827
diff changeset
835 tags2-served
25402
0c2ded041d10 exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24806
diff changeset
836 tags2-visible
0c2ded041d10 exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24806
diff changeset
837
0c2ded041d10 exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24806
diff changeset
838 $ f --size --hexdump tagsclient/.hg/cache/hgtagsfnodes1
0c2ded041d10 exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24806
diff changeset
839 tagsclient/.hg/cache/hgtagsfnodes1: size=96
47183
8be95673eb8a cache: avoid warming the fnodetags cache after clone
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46656
diff changeset
840 0000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
8be95673eb8a cache: avoid warming the fnodetags cache after clone
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46656
diff changeset
841 0010: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
8be95673eb8a cache: avoid warming the fnodetags cache after clone
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46656
diff changeset
842 0020: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
8be95673eb8a cache: avoid warming the fnodetags cache after clone
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46656
diff changeset
843 0030: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
8be95673eb8a cache: avoid warming the fnodetags cache after clone
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46656
diff changeset
844 0040: ff ff ff ff ff ff ff ff 40 f0 35 8c 19 e0 a7 d3 |........@.5.....|
25402
0c2ded041d10 exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24806
diff changeset
845 0050: 8a 5c 6a 82 4d cf fb a5 87 d0 2f a3 1e 4f 2f 8a |.\j.M...../..O/.|
0c2ded041d10 exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24806
diff changeset
846
32223
d7f93ebbbbdf bundle: add optional 'tagsfnodecache' data to on disk bundle (issue5543)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 31830
diff changeset
847 Check that the bundle includes cache data
d7f93ebbbbdf bundle: add optional 'tagsfnodecache' data to on disk bundle (issue5543)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 31830
diff changeset
848
d7f93ebbbbdf bundle: add optional 'tagsfnodecache' data to on disk bundle (issue5543)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 31830
diff changeset
849 $ hg -R tagsclient bundle --all ./test-cache-in-bundle-all-rev.hg
d7f93ebbbbdf bundle: add optional 'tagsfnodecache' data to on disk bundle (issue5543)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 31830
diff changeset
850 4 changesets found
d7f93ebbbbdf bundle: add optional 'tagsfnodecache' data to on disk bundle (issue5543)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 31830
diff changeset
851 $ hg debugbundle ./test-cache-in-bundle-all-rev.hg
34025
626a28f30dbd debugcommands: stabilize output of debugbundle by having a custom repr
Augie Fackler <raf@durin42.com>
parents: 33752
diff changeset
852 Stream params: {Compression: BZ}
37841
d618558e4e8b debugbundle: also display if a part is mandatory or advisory
Boris Feld <boris.feld@octobus.net>
parents: 36968
diff changeset
853 changegroup -- {nbchanges: 4, version: 02} (mandatory: True)
32223
d7f93ebbbbdf bundle: add optional 'tagsfnodecache' data to on disk bundle (issue5543)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 31830
diff changeset
854 96ee1d7354c4ad7372047672c36a1f561e3a6a4c
d7f93ebbbbdf bundle: add optional 'tagsfnodecache' data to on disk bundle (issue5543)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 31830
diff changeset
855 c4dab0c2fd337eb9191f80c3024830a4889a8f34
d7f93ebbbbdf bundle: add optional 'tagsfnodecache' data to on disk bundle (issue5543)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 31830
diff changeset
856 f63cc8fe54e4d326f8d692805d70e092f851ddb1
d7f93ebbbbdf bundle: add optional 'tagsfnodecache' data to on disk bundle (issue5543)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 31830
diff changeset
857 40f0358cb314c824a5929ee527308d90e023bc10
37841
d618558e4e8b debugbundle: also display if a part is mandatory or advisory
Boris Feld <boris.feld@octobus.net>
parents: 36968
diff changeset
858 hgtagsfnodes -- {} (mandatory: True)
37842
326b174c6a47 bundle2: mark the bundle2 part as advisory (issue5872)
Boris Feld <boris.feld@octobus.net>
parents: 37841
diff changeset
859 cache:rev-branch-cache -- {} (mandatory: False)
32495
a25cc3ca874f local-clone: also copy tags related caches
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32304
diff changeset
860
a25cc3ca874f local-clone: also copy tags related caches
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32304
diff changeset
861 Check that local clone includes cache data
a25cc3ca874f local-clone: also copy tags related caches
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32304
diff changeset
862
a25cc3ca874f local-clone: also copy tags related caches
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32304
diff changeset
863 $ hg clone tagsclient tags-local-clone
a25cc3ca874f local-clone: also copy tags related caches
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32304
diff changeset
864 updating to branch default
a25cc3ca874f local-clone: also copy tags related caches
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32304
diff changeset
865 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
a25cc3ca874f local-clone: also copy tags related caches
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32304
diff changeset
866 $ (cd tags-local-clone/.hg/cache/; ls -1 tag*)
46314
95a615dd77bf clone: make sure we warm the cache after a clone
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45827
diff changeset
867 tags2
95a615dd77bf clone: make sure we warm the cache after a clone
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45827
diff changeset
868 tags2-served
32495
a25cc3ca874f local-clone: also copy tags related caches
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32304
diff changeset
869 tags2-visible
41490
09f1c17e24dd tags: avoid generating commit for an already deleted tag (issue5752)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 40992
diff changeset
870
09f1c17e24dd tags: avoid generating commit for an already deleted tag (issue5752)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 40992
diff changeset
871 Avoid writing logs on trying to delete an already deleted tag
09f1c17e24dd tags: avoid generating commit for an already deleted tag (issue5752)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 40992
diff changeset
872 $ hg init issue5752
09f1c17e24dd tags: avoid generating commit for an already deleted tag (issue5752)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 40992
diff changeset
873 $ cd issue5752
09f1c17e24dd tags: avoid generating commit for an already deleted tag (issue5752)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 40992
diff changeset
874 $ echo > a
09f1c17e24dd tags: avoid generating commit for an already deleted tag (issue5752)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 40992
diff changeset
875 $ hg commit -Am 'add a'
09f1c17e24dd tags: avoid generating commit for an already deleted tag (issue5752)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 40992
diff changeset
876 adding a
09f1c17e24dd tags: avoid generating commit for an already deleted tag (issue5752)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 40992
diff changeset
877 $ hg tag a
09f1c17e24dd tags: avoid generating commit for an already deleted tag (issue5752)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 40992
diff changeset
878 $ hg tags
09f1c17e24dd tags: avoid generating commit for an already deleted tag (issue5752)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 40992
diff changeset
879 tip 1:bd7ee4f3939b
09f1c17e24dd tags: avoid generating commit for an already deleted tag (issue5752)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 40992
diff changeset
880 a 0:a8a82d372bb3
09f1c17e24dd tags: avoid generating commit for an already deleted tag (issue5752)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 40992
diff changeset
881 $ hg log
09f1c17e24dd tags: avoid generating commit for an already deleted tag (issue5752)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 40992
diff changeset
882 changeset: 1:bd7ee4f3939b
09f1c17e24dd tags: avoid generating commit for an already deleted tag (issue5752)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 40992
diff changeset
883 tag: tip
09f1c17e24dd tags: avoid generating commit for an already deleted tag (issue5752)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 40992
diff changeset
884 user: test
09f1c17e24dd tags: avoid generating commit for an already deleted tag (issue5752)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 40992
diff changeset
885 date: Thu Jan 01 00:00:00 1970 +0000
09f1c17e24dd tags: avoid generating commit for an already deleted tag (issue5752)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 40992
diff changeset
886 summary: Added tag a for changeset a8a82d372bb3
09f1c17e24dd tags: avoid generating commit for an already deleted tag (issue5752)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 40992
diff changeset
887
09f1c17e24dd tags: avoid generating commit for an already deleted tag (issue5752)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 40992
diff changeset
888 changeset: 0:a8a82d372bb3
09f1c17e24dd tags: avoid generating commit for an already deleted tag (issue5752)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 40992
diff changeset
889 tag: a
09f1c17e24dd tags: avoid generating commit for an already deleted tag (issue5752)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 40992
diff changeset
890 user: test
09f1c17e24dd tags: avoid generating commit for an already deleted tag (issue5752)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 40992
diff changeset
891 date: Thu Jan 01 00:00:00 1970 +0000
09f1c17e24dd tags: avoid generating commit for an already deleted tag (issue5752)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 40992
diff changeset
892 summary: add a
09f1c17e24dd tags: avoid generating commit for an already deleted tag (issue5752)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 40992
diff changeset
893
09f1c17e24dd tags: avoid generating commit for an already deleted tag (issue5752)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 40992
diff changeset
894 $ hg tag --remove a
09f1c17e24dd tags: avoid generating commit for an already deleted tag (issue5752)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 40992
diff changeset
895 $ hg log
09f1c17e24dd tags: avoid generating commit for an already deleted tag (issue5752)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 40992
diff changeset
896 changeset: 2:e7feacc7ec9e
09f1c17e24dd tags: avoid generating commit for an already deleted tag (issue5752)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 40992
diff changeset
897 tag: tip
09f1c17e24dd tags: avoid generating commit for an already deleted tag (issue5752)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 40992
diff changeset
898 user: test
09f1c17e24dd tags: avoid generating commit for an already deleted tag (issue5752)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 40992
diff changeset
899 date: Thu Jan 01 00:00:00 1970 +0000
09f1c17e24dd tags: avoid generating commit for an already deleted tag (issue5752)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 40992
diff changeset
900 summary: Removed tag a
09f1c17e24dd tags: avoid generating commit for an already deleted tag (issue5752)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 40992
diff changeset
901
09f1c17e24dd tags: avoid generating commit for an already deleted tag (issue5752)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 40992
diff changeset
902 changeset: 1:bd7ee4f3939b
09f1c17e24dd tags: avoid generating commit for an already deleted tag (issue5752)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 40992
diff changeset
903 user: test
09f1c17e24dd tags: avoid generating commit for an already deleted tag (issue5752)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 40992
diff changeset
904 date: Thu Jan 01 00:00:00 1970 +0000
09f1c17e24dd tags: avoid generating commit for an already deleted tag (issue5752)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 40992
diff changeset
905 summary: Added tag a for changeset a8a82d372bb3
09f1c17e24dd tags: avoid generating commit for an already deleted tag (issue5752)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 40992
diff changeset
906
09f1c17e24dd tags: avoid generating commit for an already deleted tag (issue5752)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 40992
diff changeset
907 changeset: 0:a8a82d372bb3
09f1c17e24dd tags: avoid generating commit for an already deleted tag (issue5752)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 40992
diff changeset
908 user: test
09f1c17e24dd tags: avoid generating commit for an already deleted tag (issue5752)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 40992
diff changeset
909 date: Thu Jan 01 00:00:00 1970 +0000
09f1c17e24dd tags: avoid generating commit for an already deleted tag (issue5752)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 40992
diff changeset
910 summary: add a
09f1c17e24dd tags: avoid generating commit for an already deleted tag (issue5752)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 40992
diff changeset
911
09f1c17e24dd tags: avoid generating commit for an already deleted tag (issue5752)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 40992
diff changeset
912 $ hg tag --remove a
09f1c17e24dd tags: avoid generating commit for an already deleted tag (issue5752)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 40992
diff changeset
913 abort: tag 'a' is already removed
45827
8d72e29ad1e0 errors: introduce InputError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 45435
diff changeset
914 [10]
41490
09f1c17e24dd tags: avoid generating commit for an already deleted tag (issue5752)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 40992
diff changeset
915 $ hg log
09f1c17e24dd tags: avoid generating commit for an already deleted tag (issue5752)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 40992
diff changeset
916 changeset: 2:e7feacc7ec9e
09f1c17e24dd tags: avoid generating commit for an already deleted tag (issue5752)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 40992
diff changeset
917 tag: tip
09f1c17e24dd tags: avoid generating commit for an already deleted tag (issue5752)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 40992
diff changeset
918 user: test
09f1c17e24dd tags: avoid generating commit for an already deleted tag (issue5752)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 40992
diff changeset
919 date: Thu Jan 01 00:00:00 1970 +0000
09f1c17e24dd tags: avoid generating commit for an already deleted tag (issue5752)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 40992
diff changeset
920 summary: Removed tag a
09f1c17e24dd tags: avoid generating commit for an already deleted tag (issue5752)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 40992
diff changeset
921
09f1c17e24dd tags: avoid generating commit for an already deleted tag (issue5752)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 40992
diff changeset
922 changeset: 1:bd7ee4f3939b
09f1c17e24dd tags: avoid generating commit for an already deleted tag (issue5752)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 40992
diff changeset
923 user: test
09f1c17e24dd tags: avoid generating commit for an already deleted tag (issue5752)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 40992
diff changeset
924 date: Thu Jan 01 00:00:00 1970 +0000
09f1c17e24dd tags: avoid generating commit for an already deleted tag (issue5752)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 40992
diff changeset
925 summary: Added tag a for changeset a8a82d372bb3
09f1c17e24dd tags: avoid generating commit for an already deleted tag (issue5752)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 40992
diff changeset
926
09f1c17e24dd tags: avoid generating commit for an already deleted tag (issue5752)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 40992
diff changeset
927 changeset: 0:a8a82d372bb3
09f1c17e24dd tags: avoid generating commit for an already deleted tag (issue5752)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 40992
diff changeset
928 user: test
09f1c17e24dd tags: avoid generating commit for an already deleted tag (issue5752)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 40992
diff changeset
929 date: Thu Jan 01 00:00:00 1970 +0000
09f1c17e24dd tags: avoid generating commit for an already deleted tag (issue5752)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 40992
diff changeset
930 summary: add a
09f1c17e24dd tags: avoid generating commit for an already deleted tag (issue5752)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 40992
diff changeset
931
09f1c17e24dd tags: avoid generating commit for an already deleted tag (issue5752)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 40992
diff changeset
932 $ cat .hgtags
09f1c17e24dd tags: avoid generating commit for an already deleted tag (issue5752)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 40992
diff changeset
933 a8a82d372bb35b42ff736e74f07c23bcd99c371f a
09f1c17e24dd tags: avoid generating commit for an already deleted tag (issue5752)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 40992
diff changeset
934 a8a82d372bb35b42ff736e74f07c23bcd99c371f a
09f1c17e24dd tags: avoid generating commit for an already deleted tag (issue5752)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 40992
diff changeset
935 0000000000000000000000000000000000000000 a