author | Gregory Szorc <gregory.szorc@gmail.com> |
Wed, 15 Apr 2015 17:42:38 -0400 | |
changeset 24735 | 07200e3332a1 |
parent 24706 | 5150b2b5b345 |
child 24737 | b061a2049662 |
permissions | -rw-r--r-- |
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 | 9 |
Helper functions: |
10 |
||
11 |
$ cacheexists() { |
|
13272
5ccdca7df211
move tags.cache and branchheads.cache to a collected cache folder .hg/cache/
jfh <jason@jasonfharris.com>
parents:
12763
diff
changeset
|
12 |
> [ -f .hg/cache/tags ] && echo "tag cache exists" || echo "no tag cache" |
11744 | 13 |
> } |
345 | 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 | 19 |
$ dumptags() { |
20 |
> rev=$1 |
|
21 |
> echo "rev $rev: .hgtags:" |
|
22 |
> hg cat -r$rev .hgtags |
|
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 | 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 | 31 |
$ hg init t |
32 |
$ cd t |
|
33 |
$ cacheexists |
|
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 | 37 |
$ hg id |
38 |
000000000000 tip |
|
39 |
$ cacheexists |
|
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 | 43 |
$ echo a > a |
44 |
$ hg add a |
|
45 |
$ hg commit -m "test" |
|
46 |
$ hg co |
|
47 |
0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
48 |
$ hg identify |
|
49 |
acb14030fe0a tip |
|
50 |
$ cacheexists |
|
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 | 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 |
|
13272
5ccdca7df211
move tags.cache and branchheads.cache to a collected cache folder .hg/cache/
jfh <jason@jasonfharris.com>
parents:
12763
diff
changeset
|
59 |
$ printf 'a b' > .hg/cache/tags |
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 | 69 |
Create local tag with long name: |
70 |
||
71 |
$ T=`hg identify --debug --id` |
|
72 |
$ hg tag -l "This is a local tag with a really long name!" |
|
73 |
$ hg tags |
|
74 |
tip 0:acb14030fe0a |
|
75 |
This is a local tag with a really long name! 0:acb14030fe0a |
|
76 |
$ rm .hg/localtags |
|
77 |
||
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 | 80 |
$ echo "$T first" > .hgtags |
81 |
$ cat .hgtags |
|
82 |
acb14030fe0a21b60322c440ad2d20cf7685a376 first |
|
83 |
$ hg add .hgtags |
|
84 |
$ hg commit -m "add tags" |
|
85 |
$ hg tags |
|
86 |
tip 1:b9154636be93 |
|
87 |
first 0:acb14030fe0a |
|
88 |
$ hg identify |
|
89 |
b9154636be93 tip |
|
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 | 103 |
Repeat with cold tag cache: |
104 |
||
24735
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
105 |
$ rm -f .hg/cache/tags .hg/cache/hgtagsfnodes1 |
11744 | 106 |
$ hg identify |
107 |
b9154636be93 tip |
|
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 |
|
11744 | 117 |
And again, but now unable to write tag cache: |
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 |
24735
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
120 |
$ rm -f .hg/cache/tags .hg/cache/hgtagsfnodes1 |
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 | 122 |
$ hg identify |
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 |
16857
1415edd88c56
test-tags: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
15443
diff
changeset
|
125 |
#endif |
11744 | 126 |
|
24706
5150b2b5b345
tests: move blackbox testing of tags to test-tags.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24532
diff
changeset
|
127 |
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
|
128 |
|
24735
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
129 |
$ rm -f .hg/cache/tags .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
|
130 |
$ hg identify |
5150b2b5b345
tests: move blackbox testing of tags to test-tags.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24532
diff
changeset
|
131 |
b9154636be93 tip |
24735
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
132 |
$ 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
|
133 |
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
|
134 |
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
|
135 |
1970/01/01 00:00:00 bob> 0/1 cache hits/lookups in * seconds (glob) |
24706
5150b2b5b345
tests: move blackbox testing of tags to test-tags.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24532
diff
changeset
|
136 |
1970/01/01 00:00:00 bob> writing tags cache file with 1 heads and 1 tags |
5150b2b5b345
tests: move blackbox testing of tags to test-tags.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24532
diff
changeset
|
137 |
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
|
138 |
|
24735
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
139 |
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
|
140 |
|
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
141 |
$ rm -f .hg/cache/tags .hg/cache/hgtagsfnodes1 |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
142 |
$ 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
|
143 |
$ hg identify |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
144 |
b9154636be93 tip |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
145 |
$ hg blackbox -l 5 |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
146 |
1970/01/01 00:00:00 bob> identify |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
147 |
1970/01/01 00:00:00 bob> not writing .hg/cache/hgtagsfnodes1 because lock held |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
148 |
1970/01/01 00:00:00 bob> 0/1 cache hits/lookups in * seconds (glob) |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
149 |
1970/01/01 00:00:00 bob> writing tags cache file with 1 heads and 1 tags |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
150 |
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
|
151 |
|
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
152 |
$ fnodescacheexists |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
153 |
no fnodes cache |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
154 |
|
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
155 |
$ rm .hg/wlock |
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 |
$ rm -f .hg/cache/tags .hg/cache/hgtagsfnodes1 |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
158 |
$ hg identify |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
159 |
b9154636be93 tip |
24706
5150b2b5b345
tests: move blackbox testing of tags to test-tags.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24532
diff
changeset
|
160 |
|
11744 | 161 |
Create a branch: |
9151
f528d1a93491
tags: implement persistent tag caching (issue548).
Greg Ward <greg-hg@gerg.ca>
parents:
9144
diff
changeset
|
162 |
|
11744 | 163 |
$ echo bb > a |
164 |
$ hg status |
|
165 |
M a |
|
166 |
$ hg identify |
|
167 |
b9154636be93+ tip |
|
168 |
$ hg co first |
|
169 |
0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
170 |
$ hg id |
|
171 |
acb14030fe0a+ first |
|
172 |
$ hg -v id |
|
173 |
acb14030fe0a+ first |
|
174 |
$ hg status |
|
175 |
M a |
|
176 |
$ echo 1 > b |
|
177 |
$ hg add b |
|
178 |
$ hg commit -m "branch" |
|
179 |
created new head |
|
24735
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
180 |
|
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
181 |
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
|
182 |
tags info is accessed |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
183 |
|
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
184 |
$ 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
|
185 |
.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
|
186 |
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
|
187 |
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
|
188 |
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
|
189 |
|
11744 | 190 |
$ hg id |
191 |
c8edf04160c7 tip |
|
192 |
||
24735
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
193 |
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
|
194 |
|
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
195 |
$ 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
|
196 |
.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
|
197 |
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
|
198 |
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
|
199 |
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
|
200 |
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
|
201 |
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
|
202 |
|
11744 | 203 |
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
|
204 |
|
11744 | 205 |
$ hg merge 1 |
206 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
207 |
(branch merge, don't forget to commit) |
|
208 |
$ hg id |
|
209 |
c8edf04160c7+b9154636be93+ tip |
|
210 |
$ hg status |
|
211 |
M .hgtags |
|
212 |
$ hg commit -m "merge" |
|
213 |
||
214 |
Create a fake head, make sure tag not visible afterwards: |
|
215 |
||
216 |
$ cp .hgtags tags |
|
217 |
$ hg tag last |
|
218 |
$ hg rm .hgtags |
|
219 |
$ 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
|
220 |
|
11744 | 221 |
$ mv tags .hgtags |
222 |
$ hg add .hgtags |
|
223 |
$ hg commit -m "readd" |
|
224 |
$ |
|
225 |
$ hg tags |
|
226 |
tip 6:35ff301afafe |
|
227 |
first 0:acb14030fe0a |
|
228 |
||
229 |
Add invalid tags: |
|
345 | 230 |
|
11744 | 231 |
$ echo "spam" >> .hgtags |
232 |
$ echo >> .hgtags |
|
233 |
$ 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
|
234 |
$ 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
|
235 |
$ cat .hgtags |
11744 | 236 |
acb14030fe0a21b60322c440ad2d20cf7685a376 first |
237 |
spam |
|
238 |
||
239 |
foo bar |
|
240 |
$ hg commit -m "tags" |
|
241 |
||
242 |
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
|
243 |
|
11744 | 244 |
$ hg up 3 |
245 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
246 |
$ echo 'x y' >> .hgtags |
|
247 |
$ hg commit -m "head" |
|
248 |
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
|
249 |
|
11744 | 250 |
$ hg tags |
251 |
.hgtags@75d9f02dfe28, line 2: cannot parse entry |
|
252 |
.hgtags@75d9f02dfe28, line 4: node 'foo' is not well formed |
|
253 |
.hgtags@c4be69a18c11, line 2: node 'x' is not well formed |
|
254 |
tip 8:c4be69a18c11 |
|
255 |
first 0:acb14030fe0a |
|
256 |
$ hg tip |
|
257 |
changeset: 8:c4be69a18c11 |
|
258 |
tag: tip |
|
259 |
parent: 3:ac5e980c4dc0 |
|
260 |
user: test |
|
261 |
date: Thu Jan 01 00:00:00 1970 +0000 |
|
262 |
summary: head |
|
263 |
||
2320
dbdce3b99988
fix parsing of tags. make parse errors useful. add new tag tests.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2283
diff
changeset
|
264 |
|
11744 | 265 |
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
|
266 |
|
11744 | 267 |
$ cd .. |
268 |
$ hg init t2 |
|
269 |
$ cd t2 |
|
270 |
$ echo foo > foo |
|
271 |
$ hg add foo |
|
272 |
$ hg ci -m 'add foo' # rev 0 |
|
273 |
$ hg tag bar # rev 1 |
|
274 |
$ echo >> foo |
|
275 |
$ hg ci -m 'change foo 1' # rev 2 |
|
276 |
$ hg up -C 1 |
|
277 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
278 |
$ hg tag -r 1 -f bar # rev 3 |
|
279 |
$ hg up -C 1 |
|
280 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
281 |
$ echo >> foo |
|
282 |
$ hg ci -m 'change foo 2' # rev 4 |
|
283 |
created new head |
|
284 |
$ hg tags |
|
285 |
tip 4:0c192d7d5e6b |
|
286 |
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
|
287 |
|
11744 | 288 |
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
|
289 |
|
11744 | 290 |
$ hg tags |
291 |
tip 4:0c192d7d5e6b |
|
292 |
bar 1:78391a272241 |
|
293 |
||
294 |
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
|
295 |
|
11744 | 296 |
$ hg heads -q # expect 4, 3, 2 |
297 |
4:0c192d7d5e6b |
|
298 |
3:6fa450212aeb |
|
299 |
2:7a94127795a3 |
|
300 |
$ dumptags 2 |
|
301 |
rev 2: .hgtags: |
|
302 |
bbd179dfa0a71671c253b3ae0aa1513b60d199fa bar |
|
303 |
$ dumptags 3 |
|
304 |
rev 3: .hgtags: |
|
305 |
bbd179dfa0a71671c253b3ae0aa1513b60d199fa bar |
|
306 |
bbd179dfa0a71671c253b3ae0aa1513b60d199fa bar |
|
307 |
78391a272241d70354aa14c874552cad6b51bb42 bar |
|
308 |
$ dumptags 4 |
|
309 |
rev 4: .hgtags: |
|
310 |
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
|
311 |
|
11744 | 312 |
Dump cache: |
313 |
||
13272
5ccdca7df211
move tags.cache and branchheads.cache to a collected cache folder .hg/cache/
jfh <jason@jasonfharris.com>
parents:
12763
diff
changeset
|
314 |
$ cat .hg/cache/tags |
11744 | 315 |
4 0c192d7d5e6b78a714de54a2e9627952a877e25a 0c04f2a8af31de17fab7422878ee5a2dadbc943d |
316 |
3 6fa450212aeb2a21ed616a54aea39a4a27894cd7 7d3b718c964ef37b89e550ebdafd5789e76ce1b0 |
|
317 |
2 7a94127795a33c10a370c93f731fd9fea0b79af6 0c04f2a8af31de17fab7422878ee5a2dadbc943d |
|
318 |
||
19646
335a558f81dc
tags: write tag overwriting history also into tag cache file (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19108
diff
changeset
|
319 |
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
|
320 |
bbd179dfa0a71671c253b3ae0aa1513b60d199fa bar |
11744 | 321 |
78391a272241d70354aa14c874552cad6b51bb42 bar |
322 |
||
24735
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
323 |
$ 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
|
324 |
.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
|
325 |
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
|
326 |
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
|
327 |
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
|
328 |
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
|
329 |
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
|
330 |
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
|
331 |
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
|
332 |
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
|
333 |
|
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
334 |
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
|
335 |
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
|
336 |
|
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
337 |
$ 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
|
338 |
$ echo dummy1 > foo |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
339 |
$ hg commit -m throwaway1 |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
340 |
|
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
341 |
$ hg tags |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
342 |
tip 5:8dbfe60eff30 |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
343 |
bar 1:78391a272241 |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
344 |
|
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
345 |
$ hg blackbox -l 5 |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
346 |
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
|
347 |
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
|
348 |
1970/01/01 00:00:00 bob> 0/1 cache hits/lookups in * seconds (glob) |
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 tags cache file with 3 heads and 1 tags |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
350 |
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
|
351 |
|
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
352 |
#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
|
353 |
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
|
354 |
|
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
355 |
$ echo dummy2 > foo |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
356 |
$ hg commit -m throwaway2 |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
357 |
|
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
358 |
$ 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
|
359 |
$ rm -f .hg/cache/tags |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
360 |
|
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
361 |
$ hg tags |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
362 |
tip 6:b968051b5cf3 |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
363 |
bar 1:78391a272241 |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
364 |
|
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
365 |
$ hg blackbox -l 5 |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
366 |
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
|
367 |
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
|
368 |
1970/01/01 00:00:00 bob> 2/3 cache hits/lookups in * seconds (glob) |
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> writing tags cache file with 3 heads and 1 tags |
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> 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
|
371 |
|
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
372 |
$ 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
|
373 |
#endif |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
374 |
|
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
375 |
$ rm -f .hg/cache/tags |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
376 |
$ hg tags |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
377 |
tip 6:b968051b5cf3 |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
378 |
bar 1:78391a272241 |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
379 |
|
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
380 |
$ hg blackbox -l 5 |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
381 |
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
|
382 |
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
|
383 |
1970/01/01 00:00:00 bob> 2/3 cache hits/lookups in * seconds (glob) |
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> writing tags cache file with 3 heads and 1 tags |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
385 |
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
|
386 |
|
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
387 |
$ 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
|
388 |
.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
|
389 |
|
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
390 |
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
|
391 |
|
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
392 |
$ 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
|
393 |
$ hg tags |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
394 |
tip 4:0c192d7d5e6b |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
395 |
bar 1:78391a272241 |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
396 |
|
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
397 |
$ hg blackbox -l 4 |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
398 |
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
|
399 |
1970/01/01 00:00:00 bob> 1/1 cache hits/lookups in * seconds (glob) |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
400 |
1970/01/01 00:00:00 bob> writing tags cache file with 3 heads and 1 tags |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
401 |
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
|
402 |
|
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
403 |
$ 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
|
404 |
.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
|
405 |
|
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
406 |
$ echo dummy > foo |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
407 |
$ hg commit -m throwaway3 |
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 tags |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
410 |
tip 5:035f65efb448 |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
411 |
bar 1:78391a272241 |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
412 |
|
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
413 |
$ hg blackbox -l 5 |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
414 |
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
|
415 |
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
|
416 |
1970/01/01 00:00:00 bob> 0/1 cache hits/lookups in * seconds (glob) |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
417 |
1970/01/01 00:00:00 bob> writing tags cache file with 3 heads and 1 tags |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
418 |
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
|
419 |
$ 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
|
420 |
.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
|
421 |
|
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
422 |
$ 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
|
423 |
|
11744 | 424 |
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
|
425 |
|
11744 | 426 |
$ hg tag --remove bar # rev 5 |
427 |
$ hg tip -vp |
|
428 |
changeset: 5:5f6e8655b1c7 |
|
429 |
tag: tip |
|
430 |
user: test |
|
431 |
date: Thu Jan 01 00:00:00 1970 +0000 |
|
432 |
files: .hgtags |
|
433 |
description: |
|
434 |
Removed tag bar |
|
435 |
||
436 |
||
437 |
diff -r 0c192d7d5e6b -r 5f6e8655b1c7 .hgtags |
|
438 |
--- a/.hgtags Thu Jan 01 00:00:00 1970 +0000 |
|
439 |
+++ b/.hgtags Thu Jan 01 00:00:00 1970 +0000 |
|
440 |
@@ -1,1 +1,3 @@ |
|
441 |
bbd179dfa0a71671c253b3ae0aa1513b60d199fa bar |
|
442 |
+78391a272241d70354aa14c874552cad6b51bb42 bar |
|
443 |
+0000000000000000000000000000000000000000 bar |
|
444 |
||
445 |
$ hg tags |
|
446 |
tip 5:5f6e8655b1c7 |
|
447 |
$ hg tags # again, try to expose cache bugs |
|
448 |
tip 5:5f6e8655b1c7 |
|
4213 | 449 |
|
11744 | 450 |
Remove nonexistent tag: |
451 |
||
452 |
$ hg tag --remove foobar |
|
453 |
abort: tag 'foobar' does not exist |
|
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
11744
diff
changeset
|
454 |
[255] |
11744 | 455 |
$ hg tip |
456 |
changeset: 5:5f6e8655b1c7 |
|
457 |
tag: tip |
|
458 |
user: test |
|
459 |
date: Thu Jan 01 00:00:00 1970 +0000 |
|
460 |
summary: Removed tag bar |
|
461 |
||
4266
fe7f38dda34b
tags: fix abababa case, with test case
Matt Mackall <mpm@selenic.com>
parents:
4213
diff
changeset
|
462 |
|
11744 | 463 |
Undo a tag with rollback: |
4651
7176f278d6f9
Test attempt to remove nonexistent tag
Brendan Cully <brendan@kublai.com>
parents:
4482
diff
changeset
|
464 |
|
11744 | 465 |
$ 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
|
466 |
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
|
467 |
working directory now based on revision 4 |
11744 | 468 |
$ hg tags |
469 |
tip 4:0c192d7d5e6b |
|
470 |
bar 1:78391a272241 |
|
471 |
$ hg tags |
|
472 |
tip 4:0c192d7d5e6b |
|
473 |
bar 1:78391a272241 |
|
474 |
||
475 |
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
|
476 |
|
11744 | 477 |
$ cd .. |
478 |
$ hg init t3 |
|
479 |
$ cd t3 |
|
480 |
$ echo foo > foo |
|
481 |
$ hg add foo |
|
482 |
$ hg ci -m 'add foo' # rev 0 |
|
483 |
$ hg tag -f bar # rev 1 bar -> 0 |
|
484 |
$ hg tag -f bar # rev 2 bar -> 1 |
|
485 |
$ hg tag -fr 0 bar # rev 3 bar -> 0 |
|
486 |
$ hg tag -fr 1 bar # rev 4 bar -> 1 |
|
487 |
$ hg tag -fr 0 bar # rev 5 bar -> 0 |
|
488 |
$ hg tags |
|
489 |
tip 5:85f05169d91d |
|
490 |
bar 0:bbd179dfa0a7 |
|
491 |
$ hg co 3 |
|
492 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
493 |
$ echo barbar > foo |
|
494 |
$ hg ci -m 'change foo' # rev 6 |
|
495 |
created new head |
|
496 |
$ hg tags |
|
497 |
tip 6:735c3ca72986 |
|
498 |
bar 0:bbd179dfa0a7 |
|
4267
8185a1ca8628
tags: require -f to replace an existing tag
Matt Mackall <mpm@selenic.com>
parents:
4266
diff
changeset
|
499 |
|
11744 | 500 |
Don't allow moving tag without -f: |
501 |
||
502 |
$ hg tag -r 3 bar |
|
503 |
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
|
504 |
[255] |
11744 | 505 |
$ hg tags |
506 |
tip 6:735c3ca72986 |
|
507 |
bar 0:bbd179dfa0a7 |
|
508 |
||
509 |
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
|
510 |
|
11744 | 511 |
$ hg --config extensions.mq= strip 5 |
12640
6cc4b14fb76b
tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents:
12376
diff
changeset
|
512 |
saved backup bundle to $TESTTMP/t3/.hg/strip-backup/*-backup.hg (glob) |
11744 | 513 |
$ hg tags # partly stale cache |
514 |
tip 5:735c3ca72986 |
|
515 |
bar 1:78391a272241 |
|
516 |
$ hg tags # up-to-date cache |
|
517 |
tip 5:735c3ca72986 |
|
518 |
bar 1:78391a272241 |
|
519 |
||
520 |
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
|
521 |
|
11744 | 522 |
$ hg --config extensions.mq= strip 4 |
12640
6cc4b14fb76b
tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents:
12376
diff
changeset
|
523 |
saved backup bundle to $TESTTMP/t3/.hg/strip-backup/*-backup.hg (glob) |
11744 | 524 |
$ hg tags # partly stale |
525 |
tip 4:735c3ca72986 |
|
526 |
bar 0:bbd179dfa0a7 |
|
13272
5ccdca7df211
move tags.cache and branchheads.cache to a collected cache folder .hg/cache/
jfh <jason@jasonfharris.com>
parents:
12763
diff
changeset
|
527 |
$ rm -f .hg/cache/tags |
11744 | 528 |
$ hg tags # cold cache |
529 |
tip 4:735c3ca72986 |
|
530 |
bar 0:bbd179dfa0a7 |
|
531 |
||
532 |
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
|
533 |
|
11744 | 534 |
$ cd .. |
535 |
$ hg init t4 |
|
536 |
$ cd t4 |
|
537 |
$ echo foo > foo |
|
538 |
$ hg add |
|
539 |
adding foo |
|
540 |
$ hg ci -m 'add foo' # rev 0 |
|
541 |
$ hg tag bar # rev 1 bar -> 0 |
|
542 |
$ hg tag -f bar # rev 2 bar -> 1 |
|
543 |
$ hg up -qC 0 |
|
544 |
$ hg tag -fr 2 bar # rev 3 bar -> 2 |
|
545 |
$ hg tags |
|
546 |
tip 3:197c21bbbf2c |
|
547 |
bar 2:6fa450212aeb |
|
548 |
$ hg up -qC 0 |
|
549 |
$ 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
|
550 |
|
11744 | 551 |
Bar should still point to rev 2: |
552 |
||
553 |
$ hg tags |
|
554 |
tip 4:3b4b14ed0202 |
|
555 |
bar 2:6fa450212aeb |
|
556 |
||
557 |
Test that removing global/local tags does not get confused when trying |
|
558 |
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
|
559 |
|
11744 | 560 |
$ cd .. |
561 |
$ hg init t5 |
|
562 |
$ cd t5 |
|
563 |
$ echo foo > foo |
|
564 |
$ hg add |
|
565 |
adding foo |
|
566 |
$ 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
|
567 |
|
11744 | 568 |
$ hg tag -r 0 -l localtag |
569 |
$ hg tag --remove localtag |
|
570 |
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
|
571 |
[255] |
11744 | 572 |
$ |
573 |
$ hg tag -r 0 globaltag |
|
574 |
$ hg tag --remove -l globaltag |
|
575 |
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
|
576 |
[255] |
11744 | 577 |
$ hg tags -v |
578 |
tip 1:a0b6fe111088 |
|
579 |
localtag 0:bbd179dfa0a7 local |
|
580 |
globaltag 0:bbd179dfa0a7 |
|
16913
f2719b387380
tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents:
16857
diff
changeset
|
581 |
|
19108
cb95716da5fe
tags: update tag type only if tag node is updated (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
17345
diff
changeset
|
582 |
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
|
583 |
|
cb95716da5fe
tags: update tag type only if tag node is updated (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
17345
diff
changeset
|
584 |
$ 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
|
585 |
$ 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
|
586 |
$ 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
|
587 |
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
|
588 |
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
|
589 |
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
|
590 |
|
cb95716da5fe
tags: update tag type only if tag node is updated (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
17345
diff
changeset
|
591 |
$ 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
|
592 |
$ 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
|
593 |
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
|
594 |
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
|
595 |
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
|
596 |
|
19646
335a558f81dc
tags: write tag overwriting history also into tag cache file (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19108
diff
changeset
|
597 |
$ 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
|
598 |
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
|
599 |
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
|
600 |
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
|
601 |
|
19108
cb95716da5fe
tags: update tag type only if tag node is updated (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
17345
diff
changeset
|
602 |
$ 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
|
603 |
$ 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
|
604 |
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
|
605 |
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
|
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 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
|
611 |
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
|
612 |
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
|
613 |
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
|
614 |
|
16913
f2719b387380
tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents:
16857
diff
changeset
|
615 |
$ cd .. |