annotate tests/test-tags.t @ 25305:884ef09cf658 stable

convert: properly pass null ids through .hgtags (issue4678) Mercurial uses tags of null to mark deletions, but convert was silently discarding these because it had no mapping for them. Thus, it was resurrecting deleted tags.
author Matt Mackall <mpm@selenic.com>
date Wed, 27 May 2015 14:28:29 -0500
parents 61aea11fb83d
children 0c2ded041d10
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
5150b2b5b345 tests: move blackbox testing of tags to test-tags.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24532
diff changeset
7 > EOF
5150b2b5b345 tests: move blackbox testing of tags to test-tags.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24532
diff changeset
8
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
9 Helper functions:
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
10
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
11 $ cacheexists() {
24762
1062663808ce tags: write a separate tags cache file for unfiltered repos
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24760
diff changeset
12 > [ -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
13 > }
345
9d8d9207c0b3 Add a tags/identify test group
mpm@selenic.com
parents:
diff changeset
14
24735
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
15 $ fnodescacheexists() {
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
16 > [ -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
17 > }
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
18
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
19 $ dumptags() {
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
20 > rev=$1
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
21 > echo "rev $rev: .hgtags:"
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
22 > hg cat -r$rev .hgtags
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
23 > }
9151
f528d1a93491 tags: implement persistent tag caching (issue548).
Greg Ward <greg-hg@gerg.ca>
parents: 9144
diff changeset
24
9152
4017291c4c48 tags: support 'instant' tag retrieval (issue548)
Greg Ward <greg-hg@gerg.ca>
parents: 9151
diff changeset
25 # 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
26 # 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
27 # same, but stuff has changed behind tip.
4017291c4c48 tags: support 'instant' tag retrieval (issue548)
Greg Ward <greg-hg@gerg.ca>
parents: 9151
diff changeset
28
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
29 Setup:
9143
a604c98dbf62 test-tags: clarify test output; simplify test script a bit (issue548).
Greg Ward <greg-hg@gerg.ca>
parents: 5658
diff changeset
30
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
31 $ hg init t
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
32 $ cd t
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
33 $ cacheexists
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
34 no tag cache
24735
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
35 $ fnodescacheexists
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
36 no fnodes cache
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
37 $ hg id
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
38 000000000000 tip
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
39 $ cacheexists
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
40 no tag cache
24735
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
41 $ fnodescacheexists
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
42 no fnodes cache
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
43 $ echo a > a
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
44 $ hg add a
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
45 $ hg commit -m "test"
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
46 $ hg co
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
47 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
48 $ hg identify
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
49 acb14030fe0a tip
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
50 $ cacheexists
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
51 tag cache exists
24735
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
52 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
53 (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
54 $ fnodescacheexists
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
55 no fnodes cache
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
56
12758
2d754eae430c tags: do not fail if tags.cache is corrupted (issue2444)
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12640
diff changeset
57 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
58
24762
1062663808ce tags: write a separate tags cache file for unfiltered repos
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24760
diff changeset
59 $ 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
60 $ hg identify
2d754eae430c tags: do not fail if tags.cache is corrupted (issue2444)
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12640
diff changeset
61 acb14030fe0a tip
2d754eae430c tags: do not fail if tags.cache is corrupted (issue2444)
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12640
diff changeset
62 $ cacheexists
2d754eae430c tags: do not fail if tags.cache is corrupted (issue2444)
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12640
diff changeset
63 tag cache exists
24735
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
64 $ fnodescacheexists
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
65 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
66 $ hg identify
2d754eae430c tags: do not fail if tags.cache is corrupted (issue2444)
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12640
diff changeset
67 acb14030fe0a tip
2d754eae430c tags: do not fail if tags.cache is corrupted (issue2444)
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12640
diff changeset
68
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
69 Create local tag with long name:
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
70
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
71 $ T=`hg identify --debug --id`
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
72 $ 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
73 $ hg tags
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
74 tip 0:acb14030fe0a
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
75 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
76 $ rm .hg/localtags
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
77
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
78 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
79
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
80 $ echo "$T first" > .hgtags
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
81 $ cat .hgtags
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
82 acb14030fe0a21b60322c440ad2d20cf7685a376 first
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
83 $ hg add .hgtags
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
84 $ hg commit -m "add tags"
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
85 $ hg tags
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
86 tip 1:b9154636be93
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
87 first 0:acb14030fe0a
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
88 $ hg identify
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
89 b9154636be93 tip
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
90
24735
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
91 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
92 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
93
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
94
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
95 $ fnodescacheexists
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
96 fnodes cache exists
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
97 $ 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
98 .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
99 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
100 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
101 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
102
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
103 Repeat with cold tag cache:
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
104
24762
1062663808ce tags: write a separate tags cache file for unfiltered repos
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24760
diff changeset
105 $ rm -f .hg/cache/tags2-visible .hg/cache/hgtagsfnodes1
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
106 $ hg identify
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
107 b9154636be93 tip
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
108
24735
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
109 $ fnodescacheexists
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
110 fnodes cache exists
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
111 $ 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
112 .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
113 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
114 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
115 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
116
24806
61aea11fb83d tags: do not abort if failed to write lock file to save cache
Yuya Nishihara <yuya@tcha.org>
parents: 24802
diff changeset
117 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
118
16857
1415edd88c56 test-tags: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents: 15443
diff changeset
119 #if unix-permissions
24762
1062663808ce tags: write a separate tags cache file for unfiltered repos
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24760
diff changeset
120 $ 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
121 $ chmod 555 .hg/cache
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
122 $ hg identify
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
123 b9154636be93 tip
24735
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
124 $ 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
125
61aea11fb83d tags: do not abort if failed to write lock file to save cache
Yuya Nishihara <yuya@tcha.org>
parents: 24802
diff changeset
126 $ 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
127 $ 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
128 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
129 $ chmod 755 .hg
16857
1415edd88c56 test-tags: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents: 15443
diff changeset
130 #endif
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
131
24706
5150b2b5b345 tests: move blackbox testing of tags to test-tags.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24532
diff changeset
132 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
133
24762
1062663808ce tags: write a separate tags cache file for unfiltered repos
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24760
diff changeset
134 $ 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
135 $ hg identify
5150b2b5b345 tests: move blackbox testing of tags to test-tags.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24532
diff changeset
136 b9154636be93 tip
24735
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
137 $ hg blackbox -l 5
24706
5150b2b5b345 tests: move blackbox testing of tags to test-tags.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24532
diff changeset
138 1970/01/01 00:00:00 bob> identify
24735
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
139 1970/01/01 00:00:00 bob> writing 48 bytes to cache/hgtagsfnodes1
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
140 1970/01/01 00:00:00 bob> 0/1 cache hits/lookups in * seconds (glob)
24763
a698e088ad29 tags: explicitly log which tags cache file is being written
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24762
diff changeset
141 1970/01/01 00:00:00 bob> writing .hg/cache/tags2-visible with 1 tags
24706
5150b2b5b345 tests: move blackbox testing of tags to test-tags.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24532
diff changeset
142 1970/01/01 00:00:00 bob> identify exited 0 after ?.?? seconds (glob)
5150b2b5b345 tests: move blackbox testing of tags to test-tags.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24532
diff changeset
143
24735
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
144 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
145
24762
1062663808ce tags: write a separate tags cache file for unfiltered repos
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24760
diff changeset
146 $ 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
147 $ echo 'foo:1' > .hg/wlock
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
148 $ hg identify
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
149 b9154636be93 tip
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
150 $ hg blackbox -l 5
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
151 1970/01/01 00:00:00 bob> identify
24806
61aea11fb83d tags: do not abort if failed to write lock file to save cache
Yuya Nishihara <yuya@tcha.org>
parents: 24802
diff changeset
152 1970/01/01 00:00:00 bob> not writing .hg/cache/hgtagsfnodes1 because lock cannot be acquired
24735
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
153 1970/01/01 00:00:00 bob> 0/1 cache hits/lookups in * seconds (glob)
24763
a698e088ad29 tags: explicitly log which tags cache file is being written
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24762
diff changeset
154 1970/01/01 00:00:00 bob> writing .hg/cache/tags2-visible with 1 tags
24735
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
155 1970/01/01 00:00:00 bob> identify exited 0 after * seconds (glob)
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
156
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
157 $ fnodescacheexists
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
158 no fnodes cache
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
159
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
160 $ rm .hg/wlock
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
161
24762
1062663808ce tags: write a separate tags cache file for unfiltered repos
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24760
diff changeset
162 $ 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
163 $ hg identify
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
164 b9154636be93 tip
24706
5150b2b5b345 tests: move blackbox testing of tags to test-tags.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24532
diff changeset
165
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
166 Create a branch:
9151
f528d1a93491 tags: implement persistent tag caching (issue548).
Greg Ward <greg-hg@gerg.ca>
parents: 9144
diff changeset
167
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
168 $ echo bb > a
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
169 $ hg status
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
170 M a
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
171 $ hg identify
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
172 b9154636be93+ tip
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
173 $ hg co first
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
174 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
175 $ hg id
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
176 acb14030fe0a+ first
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
177 $ hg -v id
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
178 acb14030fe0a+ first
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
179 $ hg status
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
180 M a
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
181 $ echo 1 > b
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
182 $ hg add b
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
183 $ hg commit -m "branch"
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
184 created new head
24735
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
185
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
186 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
187 tags info is accessed
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
188
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
189 $ 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
190 .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
191 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
192 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
193 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
194
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
195 $ hg id
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
196 c8edf04160c7 tip
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
197
24735
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
198 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
199
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
200 $ 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
201 .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
202 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
203 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
204 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
205 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
206 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
207
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
208 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
209
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
210 $ hg merge 1
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
211 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
212 (branch merge, don't forget to commit)
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
213 $ hg id
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
214 c8edf04160c7+b9154636be93+ tip
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
215 $ hg status
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
216 M .hgtags
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
217 $ hg commit -m "merge"
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
218
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
219 Create a fake head, make sure tag not visible afterwards:
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
220
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
221 $ cp .hgtags tags
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
222 $ hg tag last
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
223 $ hg rm .hgtags
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
224 $ 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
225
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
226 $ mv tags .hgtags
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
227 $ hg add .hgtags
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
228 $ hg commit -m "readd"
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
229 $
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
230 $ hg tags
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
231 tip 6:35ff301afafe
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
232 first 0:acb14030fe0a
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
233
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
234 Add invalid tags:
345
9d8d9207c0b3 Add a tags/identify test group
mpm@selenic.com
parents:
diff changeset
235
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
236 $ echo "spam" >> .hgtags
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
237 $ echo >> .hgtags
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
238 $ 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
239 $ 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
240 $ cat .hgtags
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
241 acb14030fe0a21b60322c440ad2d20cf7685a376 first
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
242 spam
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
243
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
244 foo bar
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
245 $ hg commit -m "tags"
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
246
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
247 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
248
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
249 $ hg up 3
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
250 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
251 $ echo 'x y' >> .hgtags
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
252 $ hg commit -m "head"
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
253 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
254
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
255 $ hg tags
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
256 .hgtags@75d9f02dfe28, line 2: cannot parse entry
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
257 .hgtags@75d9f02dfe28, line 4: node 'foo' is not well formed
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
258 .hgtags@c4be69a18c11, line 2: node 'x' is not well formed
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
259 tip 8:c4be69a18c11
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
260 first 0:acb14030fe0a
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
261 $ hg tip
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
262 changeset: 8:c4be69a18c11
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
263 tag: tip
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
264 parent: 3:ac5e980c4dc0
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
265 user: test
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
266 date: Thu Jan 01 00:00:00 1970 +0000
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
267 summary: head
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
268
2320
dbdce3b99988 fix parsing of tags. make parse errors useful. add new tag tests.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2283
diff changeset
269
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
270 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
271
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
272 $ cd ..
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
273 $ hg init t2
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
274 $ cd t2
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
275 $ echo foo > foo
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
276 $ hg add foo
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
277 $ hg ci -m 'add foo' # rev 0
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
278 $ hg tag bar # rev 1
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
279 $ echo >> foo
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
280 $ hg ci -m 'change foo 1' # rev 2
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
281 $ hg up -C 1
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
282 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
283 $ hg tag -r 1 -f bar # rev 3
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
284 $ hg up -C 1
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
285 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
286 $ echo >> foo
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
287 $ hg ci -m 'change foo 2' # rev 4
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
288 created new head
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
289 $ hg tags
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
290 tip 4:0c192d7d5e6b
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
291 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
292
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
293 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
294
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
295 $ hg tags
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
296 tip 4:0c192d7d5e6b
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
297 bar 1:78391a272241
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
298
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
299 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
300
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
301 $ hg heads -q # expect 4, 3, 2
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
302 4:0c192d7d5e6b
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
303 3:6fa450212aeb
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
304 2:7a94127795a3
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
305 $ dumptags 2
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
306 rev 2: .hgtags:
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
307 bbd179dfa0a71671c253b3ae0aa1513b60d199fa bar
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
308 $ dumptags 3
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
309 rev 3: .hgtags:
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
310 bbd179dfa0a71671c253b3ae0aa1513b60d199fa bar
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
311 bbd179dfa0a71671c253b3ae0aa1513b60d199fa bar
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
312 78391a272241d70354aa14c874552cad6b51bb42 bar
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
313 $ dumptags 4
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
314 rev 4: .hgtags:
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
315 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
316
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
317 Dump cache:
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
318
24762
1062663808ce tags: write a separate tags cache file for unfiltered repos
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24760
diff changeset
319 $ cat .hg/cache/tags2-visible
24760
410f3856196f tags: change format of tags cache files
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24759
diff changeset
320 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
321 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
322 bbd179dfa0a71671c253b3ae0aa1513b60d199fa bar
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
323 78391a272241d70354aa14c874552cad6b51bb42 bar
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
324
24735
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
325 $ 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
326 .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
327 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
328 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
329 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
330 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
331 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
332 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
333 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
334 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
335
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
336 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
337 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
338
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
339 $ 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
340 $ echo dummy1 > foo
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
341 $ hg commit -m throwaway1
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
342
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
343 $ hg tags
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
344 tip 5:8dbfe60eff30
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
345 bar 1:78391a272241
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
346
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
347 $ hg blackbox -l 5
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
348 1970/01/01 00:00:00 bob> tags
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
349 1970/01/01 00:00:00 bob> writing 24 bytes to cache/hgtagsfnodes1
24759
d082c6ef9ec3 tags: don't read .hgtags fnodes from tags cache files
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24737
diff changeset
350 1970/01/01 00:00:00 bob> 2/3 cache hits/lookups in * seconds (glob)
24763
a698e088ad29 tags: explicitly log which tags cache file is being written
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24762
diff changeset
351 1970/01/01 00:00:00 bob> writing .hg/cache/tags2-visible with 1 tags
24735
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
352 1970/01/01 00:00:00 bob> tags exited 0 after * seconds (glob)
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
353
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
354 #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
355 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
356
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
357 $ echo dummy2 > foo
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
358 $ hg commit -m throwaway2
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
359
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
360 $ 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
361 $ 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
362
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
363 $ hg tags
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
364 tip 6:b968051b5cf3
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
365 bar 1:78391a272241
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
366
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
367 $ hg blackbox -l 5
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
368 1970/01/01 00:00:00 bob> tags
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
369 1970/01/01 00:00:00 bob> couldn't write cache/hgtagsfnodes1: [Errno 13] Permission denied: '$TESTTMP/t2/.hg/cache/hgtagsfnodes1'
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
370 1970/01/01 00:00:00 bob> 2/3 cache hits/lookups in * seconds (glob)
24763
a698e088ad29 tags: explicitly log which tags cache file is being written
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24762
diff changeset
371 1970/01/01 00:00:00 bob> writing .hg/cache/tags2-visible with 1 tags
24735
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
372 1970/01/01 00:00:00 bob> tags exited 0 after * seconds (glob)
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
373
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
374 $ 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
375
24762
1062663808ce tags: write a separate tags cache file for unfiltered repos
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24760
diff changeset
376 $ 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
377 $ hg tags
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
378 tip 6:b968051b5cf3
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
379 bar 1:78391a272241
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
380
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
381 $ hg blackbox -l 5
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
382 1970/01/01 00:00:00 bob> tags
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
383 1970/01/01 00:00:00 bob> writing 24 bytes to cache/hgtagsfnodes1
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
384 1970/01/01 00:00:00 bob> 2/3 cache hits/lookups in * seconds (glob)
24763
a698e088ad29 tags: explicitly log which tags cache file is being written
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24762
diff changeset
385 1970/01/01 00:00:00 bob> writing .hg/cache/tags2-visible with 1 tags
24735
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
386 1970/01/01 00:00:00 bob> tags exited 0 after * seconds (glob)
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
387
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
388 $ 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
389 .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
390
24801
f379428a0754 tests: fix test-tags on vfat
Matt Mackall <mpm@selenic.com>
parents: 24763
diff changeset
391 $ 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
392 #endif
f379428a0754 tests: fix test-tags on vfat
Matt Mackall <mpm@selenic.com>
parents: 24763
diff changeset
393
24735
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
394 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
395
24801
f379428a0754 tests: fix test-tags on vfat
Matt Mackall <mpm@selenic.com>
parents: 24763
diff changeset
396 $ 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
397 $ hg tags
24801
f379428a0754 tests: fix test-tags on vfat
Matt Mackall <mpm@selenic.com>
parents: 24763
diff changeset
398 tip 5:8dbfe60eff30
f379428a0754 tests: fix test-tags on vfat
Matt Mackall <mpm@selenic.com>
parents: 24763
diff changeset
399 bar 1:78391a272241
f379428a0754 tests: fix test-tags on vfat
Matt Mackall <mpm@selenic.com>
parents: 24763
diff changeset
400
f379428a0754 tests: fix test-tags on vfat
Matt Mackall <mpm@selenic.com>
parents: 24763
diff changeset
401 $ f --size .hg/cache/hgtagsfnodes1
f379428a0754 tests: fix test-tags on vfat
Matt Mackall <mpm@selenic.com>
parents: 24763
diff changeset
402 .hg/cache/hgtagsfnodes1: size=144
f379428a0754 tests: fix test-tags on vfat
Matt Mackall <mpm@selenic.com>
parents: 24763
diff changeset
403
24735
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
404 $ 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
405 $ hg tags
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
406 tip 4:0c192d7d5e6b
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
407 bar 1:78391a272241
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
408
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
409 $ hg blackbox -l 4
24801
f379428a0754 tests: fix test-tags on vfat
Matt Mackall <mpm@selenic.com>
parents: 24763
diff changeset
410 1970/01/01 00:00:00 bob> writing 24 bytes to cache/hgtagsfnodes1
f379428a0754 tests: fix test-tags on vfat
Matt Mackall <mpm@selenic.com>
parents: 24763
diff changeset
411 1970/01/01 00:00:00 bob> 2/3 cache hits/lookups in * seconds (glob)
24763
a698e088ad29 tags: explicitly log which tags cache file is being written
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24762
diff changeset
412 1970/01/01 00:00:00 bob> writing .hg/cache/tags2-visible with 1 tags
24735
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
413 1970/01/01 00:00:00 bob> tags exited 0 after * seconds (glob)
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
414
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
415 $ f --size .hg/cache/hgtagsfnodes1
24801
f379428a0754 tests: fix test-tags on vfat
Matt Mackall <mpm@selenic.com>
parents: 24763
diff changeset
416 .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
417
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
418 $ echo dummy > foo
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
419 $ hg commit -m throwaway3
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
420
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
421 $ hg tags
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
422 tip 5:035f65efb448
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
423 bar 1:78391a272241
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
424
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
425 $ hg blackbox -l 5
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
426 1970/01/01 00:00:00 bob> tags
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
427 1970/01/01 00:00:00 bob> writing 24 bytes to cache/hgtagsfnodes1
24759
d082c6ef9ec3 tags: don't read .hgtags fnodes from tags cache files
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24737
diff changeset
428 1970/01/01 00:00:00 bob> 2/3 cache hits/lookups in * seconds (glob)
24763
a698e088ad29 tags: explicitly log which tags cache file is being written
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24762
diff changeset
429 1970/01/01 00:00:00 bob> writing .hg/cache/tags2-visible with 1 tags
24735
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
430 1970/01/01 00:00:00 bob> tags exited 0 after * seconds (glob)
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
431 $ 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
432 .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
433
07200e3332a1 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24706
diff changeset
434 $ 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
435
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
436 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
437
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
438 $ hg tag --remove bar # rev 5
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
439 $ hg tip -vp
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
440 changeset: 5:5f6e8655b1c7
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
441 tag: tip
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
442 user: test
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
443 date: Thu Jan 01 00:00:00 1970 +0000
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
444 files: .hgtags
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
445 description:
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
446 Removed tag bar
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
447
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
448
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
449 diff -r 0c192d7d5e6b -r 5f6e8655b1c7 .hgtags
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
450 --- a/.hgtags Thu Jan 01 00:00:00 1970 +0000
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
451 +++ b/.hgtags Thu Jan 01 00:00:00 1970 +0000
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
452 @@ -1,1 +1,3 @@
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
453 bbd179dfa0a71671c253b3ae0aa1513b60d199fa bar
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
454 +78391a272241d70354aa14c874552cad6b51bb42 bar
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
455 +0000000000000000000000000000000000000000 bar
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
456
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
457 $ hg tags
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
458 tip 5:5f6e8655b1c7
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
459 $ hg tags # again, try to expose cache bugs
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
460 tip 5:5f6e8655b1c7
4213
3be4785f8994 tags: add --remove
Matt Mackall <mpm@selenic.com>
parents: 4211
diff changeset
461
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
462 Remove nonexistent tag:
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
463
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
464 $ hg tag --remove foobar
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
465 abort: tag 'foobar' does not exist
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 11744
diff changeset
466 [255]
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
467 $ hg tip
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
468 changeset: 5:5f6e8655b1c7
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
469 tag: tip
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
470 user: test
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
471 date: Thu Jan 01 00:00:00 1970 +0000
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
472 summary: Removed tag bar
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
473
4266
fe7f38dda34b tags: fix abababa case, with test case
Matt Mackall <mpm@selenic.com>
parents: 4213
diff changeset
474
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
475 Undo a tag with rollback:
4651
7176f278d6f9 Test attempt to remove nonexistent tag
Brendan Cully <brendan@kublai.com>
parents: 4482
diff changeset
476
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
477 $ 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
478 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
479 working directory now based on revision 4
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
480 $ hg tags
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
481 tip 4:0c192d7d5e6b
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
482 bar 1:78391a272241
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
483 $ hg tags
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
484 tip 4:0c192d7d5e6b
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
485 bar 1:78391a272241
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
486
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
487 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
488
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
489 $ cd ..
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
490 $ hg init t3
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
491 $ cd t3
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
492 $ echo foo > foo
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
493 $ hg add foo
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
494 $ hg ci -m 'add foo' # rev 0
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
495 $ hg tag -f bar # rev 1 bar -> 0
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
496 $ hg tag -f bar # rev 2 bar -> 1
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
497 $ hg tag -fr 0 bar # rev 3 bar -> 0
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
498 $ hg tag -fr 1 bar # rev 4 bar -> 1
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
499 $ hg tag -fr 0 bar # rev 5 bar -> 0
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
500 $ hg tags
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
501 tip 5:85f05169d91d
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
502 bar 0:bbd179dfa0a7
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
503 $ hg co 3
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
504 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
505 $ echo barbar > foo
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
506 $ hg ci -m 'change foo' # rev 6
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
507 created new head
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
508 $ hg tags
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
509 tip 6:735c3ca72986
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
510 bar 0:bbd179dfa0a7
4267
8185a1ca8628 tags: require -f to replace an existing tag
Matt Mackall <mpm@selenic.com>
parents: 4266
diff changeset
511
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
512 Don't allow moving tag without -f:
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
513
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
514 $ hg tag -r 3 bar
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
515 abort: tag 'bar' already exists (use -f to force)
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 11744
diff changeset
516 [255]
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
517 $ hg tags
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
518 tip 6:735c3ca72986
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
519 bar 0:bbd179dfa0a7
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
520
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
521 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
522
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
523 $ hg --config extensions.mq= strip 5
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12376
diff changeset
524 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
525 $ hg tags # partly stale cache
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
526 tip 5:735c3ca72986
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
527 bar 1:78391a272241
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
528 $ hg tags # up-to-date cache
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
529 tip 5:735c3ca72986
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
530 bar 1:78391a272241
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
531
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
532 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
533
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
534 $ hg --config extensions.mq= strip 4
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12376
diff changeset
535 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
536 $ hg tags # partly stale
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
537 tip 4:735c3ca72986
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
538 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
539 $ rm -f .hg/cache/tags2-visible
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
540 $ hg tags # cold cache
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
541 tip 4:735c3ca72986
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
542 bar 0:bbd179dfa0a7
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
543
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
544 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
545
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
546 $ cd ..
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
547 $ hg init t4
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
548 $ cd t4
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
549 $ echo foo > foo
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
550 $ hg add
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
551 adding foo
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
552 $ hg ci -m 'add foo' # rev 0
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
553 $ hg tag bar # rev 1 bar -> 0
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
554 $ hg tag -f bar # rev 2 bar -> 1
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
555 $ hg up -qC 0
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
556 $ hg tag -fr 2 bar # rev 3 bar -> 2
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
557 $ hg tags
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
558 tip 3:197c21bbbf2c
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
559 bar 2:6fa450212aeb
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
560 $ hg up -qC 0
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
561 $ 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
562
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
563 Bar should still point to rev 2:
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
564
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
565 $ hg tags
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
566 tip 4:3b4b14ed0202
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
567 bar 2:6fa450212aeb
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
568
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
569 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
570 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
571
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
572 $ cd ..
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
573 $ hg init t5
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
574 $ cd t5
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
575 $ echo foo > foo
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
576 $ hg add
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
577 adding foo
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
578 $ 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
579
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
580 $ hg tag -r 0 -l localtag
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
581 $ hg tag --remove localtag
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
582 abort: tag 'localtag' is not a global tag
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 11744
diff changeset
583 [255]
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
584 $
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
585 $ hg tag -r 0 globaltag
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
586 $ hg tag --remove -l globaltag
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
587 abort: tag 'globaltag' is not a local tag
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 11744
diff changeset
588 [255]
11744
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
589 $ hg tags -v
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
590 tip 1:a0b6fe111088
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
591 localtag 0:bbd179dfa0a7 local
5b53aa2d4b99 tests: unify test-tags
Matt Mackall <mpm@selenic.com>
parents: 9366
diff changeset
592 globaltag 0:bbd179dfa0a7
16913
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 16857
diff changeset
593
19108
cb95716da5fe tags: update tag type only if tag node is updated (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17345
diff changeset
594 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
595
cb95716da5fe tags: update tag type only if tag node is updated (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17345
diff changeset
596 $ 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
597 $ 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
598 $ 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
599 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
600 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
601 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
602
cb95716da5fe tags: update tag type only if tag node is updated (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17345
diff changeset
603 $ 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
604 $ 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
605 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
606 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
607 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
608
19646
335a558f81dc tags: write tag overwriting history also into tag cache file (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19108
diff changeset
609 $ 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
610 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
611 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
612 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
613
19108
cb95716da5fe tags: update tag type only if tag node is updated (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17345
diff changeset
614 $ 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
615 $ 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
616 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
617 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
618 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
619 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
620
19646
335a558f81dc tags: write tag overwriting history also into tag cache file (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19108
diff changeset
621 $ 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
622 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
623 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
624 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
625 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
626
16913
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 16857
diff changeset
627 $ cd ..