Mercurial > hg-stable
annotate tests/test-tags.t @ 28054:8515b813976b
debugignore: normalize the file before testing dirstate._ignore()
With an ignore pattern containing a '/' and a Windows style path containing '\',
status was properly ignoring the file, but debugignore was stating that it
wasn't ignored.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Mon, 08 Feb 2016 12:33:00 -0500 |
parents | ab6468270b83 |
children | e8ad56d95fbb |
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 | 9 Helper functions: |
10 | |
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 | 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 | |
25683
3b1fc40626d8
identify: avoid a crash when given '-r wdir()'
Matt Harbison <matt_harbison@yahoo.com>
parents:
25402
diff
changeset
|
50 $ hg identify -r 'wdir()' |
3b1fc40626d8
identify: avoid a crash when given '-r wdir()'
Matt Harbison <matt_harbison@yahoo.com>
parents:
25402
diff
changeset
|
51 acb14030fe0a tip |
11744 | 52 $ cacheexists |
53 tag cache exists | |
24735
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
54 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
|
55 (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
|
56 $ fnodescacheexists |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
57 no fnodes cache |
11744 | 58 |
12758
2d754eae430c
tags: do not fail if tags.cache is corrupted (issue2444)
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12640
diff
changeset
|
59 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
|
60 |
24762
1062663808ce
tags: write a separate tags cache file for unfiltered repos
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24760
diff
changeset
|
61 $ 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
|
62 $ hg identify |
2d754eae430c
tags: do not fail if tags.cache is corrupted (issue2444)
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12640
diff
changeset
|
63 acb14030fe0a tip |
2d754eae430c
tags: do not fail if tags.cache is corrupted (issue2444)
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12640
diff
changeset
|
64 $ cacheexists |
2d754eae430c
tags: do not fail if tags.cache is corrupted (issue2444)
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12640
diff
changeset
|
65 tag cache exists |
24735
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
66 $ fnodescacheexists |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
67 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
|
68 $ hg identify |
2d754eae430c
tags: do not fail if tags.cache is corrupted (issue2444)
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12640
diff
changeset
|
69 acb14030fe0a tip |
2d754eae430c
tags: do not fail if tags.cache is corrupted (issue2444)
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12640
diff
changeset
|
70 |
11744 | 71 Create local tag with long name: |
72 | |
73 $ T=`hg identify --debug --id` | |
74 $ hg tag -l "This is a local tag with a really long name!" | |
75 $ hg tags | |
76 tip 0:acb14030fe0a | |
77 This is a local tag with a really long name! 0:acb14030fe0a | |
78 $ rm .hg/localtags | |
79 | |
80 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
|
81 |
11744 | 82 $ echo "$T first" > .hgtags |
83 $ cat .hgtags | |
84 acb14030fe0a21b60322c440ad2d20cf7685a376 first | |
85 $ hg add .hgtags | |
86 $ hg commit -m "add tags" | |
87 $ hg tags | |
88 tip 1:b9154636be93 | |
89 first 0:acb14030fe0a | |
90 $ hg identify | |
91 b9154636be93 tip | |
92 | |
24735
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
93 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
|
94 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
|
95 |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
96 |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
97 $ fnodescacheexists |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
98 fnodes cache exists |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
99 $ 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
|
100 .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
|
101 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
|
102 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
|
103 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
|
104 |
11744 | 105 Repeat with cold tag cache: |
106 | |
24762
1062663808ce
tags: write a separate tags cache file for unfiltered repos
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24760
diff
changeset
|
107 $ rm -f .hg/cache/tags2-visible .hg/cache/hgtagsfnodes1 |
11744 | 108 $ hg identify |
109 b9154636be93 tip | |
110 | |
24735
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
111 $ fnodescacheexists |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
112 fnodes cache exists |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
113 $ 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
|
114 .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
|
115 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
|
116 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
|
117 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
|
118 |
24806
61aea11fb83d
tags: do not abort if failed to write lock file to save cache
Yuya Nishihara <yuya@tcha.org>
parents:
24802
diff
changeset
|
119 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
|
120 |
16857
1415edd88c56
test-tags: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
15443
diff
changeset
|
121 #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
|
122 $ 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
|
123 $ chmod 555 .hg/cache |
11744 | 124 $ hg identify |
125 b9154636be93 tip | |
24735
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
126 $ 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
|
127 |
61aea11fb83d
tags: do not abort if failed to write lock file to save cache
Yuya Nishihara <yuya@tcha.org>
parents:
24802
diff
changeset
|
128 $ 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
|
129 $ 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
|
130 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
|
131 $ chmod 755 .hg |
16857
1415edd88c56
test-tags: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
15443
diff
changeset
|
132 #endif |
11744 | 133 |
24706
5150b2b5b345
tests: move blackbox testing of tags to test-tags.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24532
diff
changeset
|
134 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
|
135 |
24762
1062663808ce
tags: write a separate tags cache file for unfiltered repos
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24760
diff
changeset
|
136 $ 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
|
137 $ hg identify |
5150b2b5b345
tests: move blackbox testing of tags to test-tags.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24532
diff
changeset
|
138 b9154636be93 tip |
28025
ab6468270b83
blackbox: flush output file descriptor
timeless <timeless@mozdev.org>
parents:
26185
diff
changeset
|
139 $ hg blackbox -l 6 |
26185 | 140 1970/01/01 00:00:00 bob (*)> identify (glob) |
141 1970/01/01 00:00:00 bob (*)> writing 48 bytes to cache/hgtagsfnodes1 (glob) | |
142 1970/01/01 00:00:00 bob (*)> 0/1 cache hits/lookups in * seconds (glob) | |
143 1970/01/01 00:00:00 bob (*)> writing .hg/cache/tags2-visible with 1 tags (glob) | |
28025
ab6468270b83
blackbox: flush output file descriptor
timeless <timeless@mozdev.org>
parents:
26185
diff
changeset
|
144 1970/01/01 00:00:00 bob (*)> identify exited 0 after * seconds (glob) |
ab6468270b83
blackbox: flush output file descriptor
timeless <timeless@mozdev.org>
parents:
26185
diff
changeset
|
145 1970/01/01 00:00:00 bob (*)> blackbox -l 6 (glob) |
24706
5150b2b5b345
tests: move blackbox testing of tags to test-tags.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24532
diff
changeset
|
146 |
24735
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
147 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
|
148 |
24762
1062663808ce
tags: write a separate tags cache file for unfiltered repos
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24760
diff
changeset
|
149 $ 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
|
150 $ 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
|
151 $ hg identify |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
152 b9154636be93 tip |
28025
ab6468270b83
blackbox: flush output file descriptor
timeless <timeless@mozdev.org>
parents:
26185
diff
changeset
|
153 $ hg blackbox -l 6 |
26185 | 154 1970/01/01 00:00:00 bob (*)> identify (glob) |
155 1970/01/01 00:00:00 bob (*)> not writing .hg/cache/hgtagsfnodes1 because lock cannot be acquired (glob) | |
156 1970/01/01 00:00:00 bob (*)> 0/1 cache hits/lookups in * seconds (glob) | |
157 1970/01/01 00:00:00 bob (*)> writing .hg/cache/tags2-visible with 1 tags (glob) | |
158 1970/01/01 00:00:00 bob (*)> identify exited 0 after * seconds (glob) | |
28025
ab6468270b83
blackbox: flush output file descriptor
timeless <timeless@mozdev.org>
parents:
26185
diff
changeset
|
159 1970/01/01 00:00:00 bob (*)> blackbox -l 6 (glob) |
24735
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
160 |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
161 $ fnodescacheexists |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
162 no fnodes cache |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
163 |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
164 $ rm .hg/wlock |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
165 |
24762
1062663808ce
tags: write a separate tags cache file for unfiltered repos
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24760
diff
changeset
|
166 $ 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
|
167 $ hg identify |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
168 b9154636be93 tip |
24706
5150b2b5b345
tests: move blackbox testing of tags to test-tags.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24532
diff
changeset
|
169 |
11744 | 170 Create a branch: |
9151
f528d1a93491
tags: implement persistent tag caching (issue548).
Greg Ward <greg-hg@gerg.ca>
parents:
9144
diff
changeset
|
171 |
11744 | 172 $ echo bb > a |
173 $ hg status | |
174 M a | |
175 $ hg identify | |
176 b9154636be93+ tip | |
177 $ hg co first | |
178 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
179 $ hg id | |
180 acb14030fe0a+ first | |
25683
3b1fc40626d8
identify: avoid a crash when given '-r wdir()'
Matt Harbison <matt_harbison@yahoo.com>
parents:
25402
diff
changeset
|
181 $ hg id -r 'wdir()' |
3b1fc40626d8
identify: avoid a crash when given '-r wdir()'
Matt Harbison <matt_harbison@yahoo.com>
parents:
25402
diff
changeset
|
182 acb14030fe0a+ first |
11744 | 183 $ hg -v id |
184 acb14030fe0a+ first | |
185 $ hg status | |
186 M a | |
187 $ echo 1 > b | |
188 $ hg add b | |
189 $ hg commit -m "branch" | |
190 created new head | |
24735
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
191 |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
192 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
|
193 tags info is accessed |
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=48 |
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 |
11744 | 201 $ hg id |
202 c8edf04160c7 tip | |
203 | |
24735
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
204 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
|
205 |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
206 $ 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
|
207 .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
|
208 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
|
209 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
|
210 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
|
211 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
|
212 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
|
213 |
11744 | 214 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
|
215 |
11744 | 216 $ hg merge 1 |
217 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
218 (branch merge, don't forget to commit) | |
219 $ hg id | |
220 c8edf04160c7+b9154636be93+ tip | |
221 $ hg status | |
222 M .hgtags | |
223 $ hg commit -m "merge" | |
224 | |
225 Create a fake head, make sure tag not visible afterwards: | |
226 | |
227 $ cp .hgtags tags | |
228 $ hg tag last | |
229 $ hg rm .hgtags | |
230 $ 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
|
231 |
11744 | 232 $ mv tags .hgtags |
233 $ hg add .hgtags | |
234 $ hg commit -m "readd" | |
235 $ | |
236 $ hg tags | |
237 tip 6:35ff301afafe | |
238 first 0:acb14030fe0a | |
239 | |
240 Add invalid tags: | |
345 | 241 |
11744 | 242 $ echo "spam" >> .hgtags |
243 $ echo >> .hgtags | |
244 $ 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
|
245 $ 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
|
246 $ cat .hgtags |
11744 | 247 acb14030fe0a21b60322c440ad2d20cf7685a376 first |
248 spam | |
249 | |
250 foo bar | |
251 $ hg commit -m "tags" | |
252 | |
253 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
|
254 |
11744 | 255 $ hg up 3 |
256 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
257 $ echo 'x y' >> .hgtags | |
258 $ hg commit -m "head" | |
259 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
|
260 |
11744 | 261 $ hg tags |
262 .hgtags@75d9f02dfe28, line 2: cannot parse entry | |
263 .hgtags@75d9f02dfe28, line 4: node 'foo' is not well formed | |
264 .hgtags@c4be69a18c11, line 2: node 'x' is not well formed | |
265 tip 8:c4be69a18c11 | |
266 first 0:acb14030fe0a | |
267 $ hg tip | |
268 changeset: 8:c4be69a18c11 | |
269 tag: tip | |
270 parent: 3:ac5e980c4dc0 | |
271 user: test | |
272 date: Thu Jan 01 00:00:00 1970 +0000 | |
273 summary: head | |
274 | |
2320
dbdce3b99988
fix parsing of tags. make parse errors useful. add new tag tests.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2283
diff
changeset
|
275 |
11744 | 276 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
|
277 |
11744 | 278 $ cd .. |
279 $ hg init t2 | |
280 $ cd t2 | |
281 $ echo foo > foo | |
282 $ hg add foo | |
283 $ hg ci -m 'add foo' # rev 0 | |
284 $ hg tag bar # rev 1 | |
285 $ echo >> foo | |
286 $ hg ci -m 'change foo 1' # rev 2 | |
287 $ hg up -C 1 | |
288 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
289 $ hg tag -r 1 -f bar # rev 3 | |
290 $ hg up -C 1 | |
291 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
292 $ echo >> foo | |
293 $ hg ci -m 'change foo 2' # rev 4 | |
294 created new head | |
295 $ hg tags | |
296 tip 4:0c192d7d5e6b | |
297 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
|
298 |
11744 | 299 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
|
300 |
11744 | 301 $ hg tags |
302 tip 4:0c192d7d5e6b | |
303 bar 1:78391a272241 | |
304 | |
305 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
|
306 |
11744 | 307 $ hg heads -q # expect 4, 3, 2 |
308 4:0c192d7d5e6b | |
309 3:6fa450212aeb | |
310 2:7a94127795a3 | |
311 $ dumptags 2 | |
312 rev 2: .hgtags: | |
313 bbd179dfa0a71671c253b3ae0aa1513b60d199fa bar | |
314 $ dumptags 3 | |
315 rev 3: .hgtags: | |
316 bbd179dfa0a71671c253b3ae0aa1513b60d199fa bar | |
317 bbd179dfa0a71671c253b3ae0aa1513b60d199fa bar | |
318 78391a272241d70354aa14c874552cad6b51bb42 bar | |
319 $ dumptags 4 | |
320 rev 4: .hgtags: | |
321 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
|
322 |
11744 | 323 Dump cache: |
324 | |
24762
1062663808ce
tags: write a separate tags cache file for unfiltered repos
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24760
diff
changeset
|
325 $ cat .hg/cache/tags2-visible |
24760
410f3856196f
tags: change format of tags cache files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24759
diff
changeset
|
326 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
|
327 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
|
328 bbd179dfa0a71671c253b3ae0aa1513b60d199fa bar |
11744 | 329 78391a272241d70354aa14c874552cad6b51bb42 bar |
330 | |
24735
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
331 $ 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
|
332 .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
|
333 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
|
334 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
|
335 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
|
336 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
|
337 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
|
338 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
|
339 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
|
340 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
|
341 |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
342 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
|
343 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
|
344 |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
345 $ 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
|
346 $ echo dummy1 > foo |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
347 $ hg commit -m throwaway1 |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
348 |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
349 $ hg tags |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
350 tip 5:8dbfe60eff30 |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
351 bar 1:78391a272241 |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
352 |
28025
ab6468270b83
blackbox: flush output file descriptor
timeless <timeless@mozdev.org>
parents:
26185
diff
changeset
|
353 $ hg blackbox -l 6 |
26185 | 354 1970/01/01 00:00:00 bob (*)> tags (glob) |
355 1970/01/01 00:00:00 bob (*)> writing 24 bytes to cache/hgtagsfnodes1 (glob) | |
356 1970/01/01 00:00:00 bob (*)> 2/3 cache hits/lookups in * seconds (glob) | |
357 1970/01/01 00:00:00 bob (*)> writing .hg/cache/tags2-visible with 1 tags (glob) | |
358 1970/01/01 00:00:00 bob (*)> tags exited 0 after * seconds (glob) | |
28025
ab6468270b83
blackbox: flush output file descriptor
timeless <timeless@mozdev.org>
parents:
26185
diff
changeset
|
359 1970/01/01 00:00:00 bob (*)> blackbox -l 6 (glob) |
24735
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 #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
|
362 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
|
363 |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
364 $ echo dummy2 > foo |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
365 $ hg commit -m throwaway2 |
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 $ 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
|
368 $ 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
|
369 |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
370 $ hg tags |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
371 tip 6:b968051b5cf3 |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
372 bar 1:78391a272241 |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
373 |
28025
ab6468270b83
blackbox: flush output file descriptor
timeless <timeless@mozdev.org>
parents:
26185
diff
changeset
|
374 $ hg blackbox -l 6 |
26185 | 375 1970/01/01 00:00:00 bob (*)> tags (glob) |
376 1970/01/01 00:00:00 bob (*)> couldn't write cache/hgtagsfnodes1: [Errno 13] Permission denied: '$TESTTMP/t2/.hg/cache/hgtagsfnodes1' (glob) | |
377 1970/01/01 00:00:00 bob (*)> 2/3 cache hits/lookups in * seconds (glob) | |
378 1970/01/01 00:00:00 bob (*)> writing .hg/cache/tags2-visible with 1 tags (glob) | |
379 1970/01/01 00:00:00 bob (*)> tags exited 0 after * seconds (glob) | |
28025
ab6468270b83
blackbox: flush output file descriptor
timeless <timeless@mozdev.org>
parents:
26185
diff
changeset
|
380 1970/01/01 00:00:00 bob (*)> blackbox -l 6 (glob) |
24735
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
381 |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
382 $ 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
|
383 |
24762
1062663808ce
tags: write a separate tags cache file for unfiltered repos
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24760
diff
changeset
|
384 $ 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
|
385 $ hg tags |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
386 tip 6:b968051b5cf3 |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
387 bar 1:78391a272241 |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
388 |
28025
ab6468270b83
blackbox: flush output file descriptor
timeless <timeless@mozdev.org>
parents:
26185
diff
changeset
|
389 $ hg blackbox -l 6 |
26185 | 390 1970/01/01 00:00:00 bob (*)> tags (glob) |
391 1970/01/01 00:00:00 bob (*)> writing 24 bytes to cache/hgtagsfnodes1 (glob) | |
392 1970/01/01 00:00:00 bob (*)> 2/3 cache hits/lookups in * seconds (glob) | |
393 1970/01/01 00:00:00 bob (*)> writing .hg/cache/tags2-visible with 1 tags (glob) | |
394 1970/01/01 00:00:00 bob (*)> tags exited 0 after * seconds (glob) | |
28025
ab6468270b83
blackbox: flush output file descriptor
timeless <timeless@mozdev.org>
parents:
26185
diff
changeset
|
395 1970/01/01 00:00:00 bob (*)> blackbox -l 6 (glob) |
24735
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 $ 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
|
398 .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
|
399 |
24801
f379428a0754
tests: fix test-tags on vfat
Matt Mackall <mpm@selenic.com>
parents:
24763
diff
changeset
|
400 $ 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
|
401 #endif |
f379428a0754
tests: fix test-tags on vfat
Matt Mackall <mpm@selenic.com>
parents:
24763
diff
changeset
|
402 |
24735
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
403 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
|
404 |
24801
f379428a0754
tests: fix test-tags on vfat
Matt Mackall <mpm@selenic.com>
parents:
24763
diff
changeset
|
405 $ 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
|
406 $ hg tags |
24801
f379428a0754
tests: fix test-tags on vfat
Matt Mackall <mpm@selenic.com>
parents:
24763
diff
changeset
|
407 tip 5:8dbfe60eff30 |
f379428a0754
tests: fix test-tags on vfat
Matt Mackall <mpm@selenic.com>
parents:
24763
diff
changeset
|
408 bar 1:78391a272241 |
f379428a0754
tests: fix test-tags on vfat
Matt Mackall <mpm@selenic.com>
parents:
24763
diff
changeset
|
409 |
f379428a0754
tests: fix test-tags on vfat
Matt Mackall <mpm@selenic.com>
parents:
24763
diff
changeset
|
410 $ f --size .hg/cache/hgtagsfnodes1 |
f379428a0754
tests: fix test-tags on vfat
Matt Mackall <mpm@selenic.com>
parents:
24763
diff
changeset
|
411 .hg/cache/hgtagsfnodes1: size=144 |
f379428a0754
tests: fix test-tags on vfat
Matt Mackall <mpm@selenic.com>
parents:
24763
diff
changeset
|
412 |
24735
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
413 $ 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
|
414 $ hg tags |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
415 tip 4:0c192d7d5e6b |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
416 bar 1:78391a272241 |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
417 |
28025
ab6468270b83
blackbox: flush output file descriptor
timeless <timeless@mozdev.org>
parents:
26185
diff
changeset
|
418 $ hg blackbox -l 5 |
26185 | 419 1970/01/01 00:00:00 bob (*)> writing 24 bytes to cache/hgtagsfnodes1 (glob) |
420 1970/01/01 00:00:00 bob (*)> 2/3 cache hits/lookups in * seconds (glob) | |
421 1970/01/01 00:00:00 bob (*)> writing .hg/cache/tags2-visible with 1 tags (glob) | |
422 1970/01/01 00:00:00 bob (*)> tags exited 0 after * seconds (glob) | |
28025
ab6468270b83
blackbox: flush output file descriptor
timeless <timeless@mozdev.org>
parents:
26185
diff
changeset
|
423 1970/01/01 00:00:00 bob (*)> blackbox -l 5 (glob) |
24735
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 $ f --size .hg/cache/hgtagsfnodes1 |
24801
f379428a0754
tests: fix test-tags on vfat
Matt Mackall <mpm@selenic.com>
parents:
24763
diff
changeset
|
426 .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
|
427 |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
428 $ echo dummy > foo |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
429 $ hg commit -m throwaway3 |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
430 |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
431 $ hg tags |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
432 tip 5:035f65efb448 |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
433 bar 1:78391a272241 |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
434 |
28025
ab6468270b83
blackbox: flush output file descriptor
timeless <timeless@mozdev.org>
parents:
26185
diff
changeset
|
435 $ hg blackbox -l 6 |
26185 | 436 1970/01/01 00:00:00 bob (*)> tags (glob) |
437 1970/01/01 00:00:00 bob (*)> writing 24 bytes to cache/hgtagsfnodes1 (glob) | |
438 1970/01/01 00:00:00 bob (*)> 2/3 cache hits/lookups in * seconds (glob) | |
439 1970/01/01 00:00:00 bob (*)> writing .hg/cache/tags2-visible with 1 tags (glob) | |
440 1970/01/01 00:00:00 bob (*)> tags exited 0 after * seconds (glob) | |
28025
ab6468270b83
blackbox: flush output file descriptor
timeless <timeless@mozdev.org>
parents:
26185
diff
changeset
|
441 1970/01/01 00:00:00 bob (*)> blackbox -l 6 (glob) |
24735
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
442 $ 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
|
443 .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
|
444 |
07200e3332a1
tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24706
diff
changeset
|
445 $ 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
|
446 |
11744 | 447 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
|
448 |
11744 | 449 $ hg tag --remove bar # rev 5 |
450 $ hg tip -vp | |
451 changeset: 5:5f6e8655b1c7 | |
452 tag: tip | |
453 user: test | |
454 date: Thu Jan 01 00:00:00 1970 +0000 | |
455 files: .hgtags | |
456 description: | |
457 Removed tag bar | |
458 | |
459 | |
460 diff -r 0c192d7d5e6b -r 5f6e8655b1c7 .hgtags | |
461 --- a/.hgtags Thu Jan 01 00:00:00 1970 +0000 | |
462 +++ b/.hgtags Thu Jan 01 00:00:00 1970 +0000 | |
463 @@ -1,1 +1,3 @@ | |
464 bbd179dfa0a71671c253b3ae0aa1513b60d199fa bar | |
465 +78391a272241d70354aa14c874552cad6b51bb42 bar | |
466 +0000000000000000000000000000000000000000 bar | |
467 | |
468 $ hg tags | |
469 tip 5:5f6e8655b1c7 | |
470 $ hg tags # again, try to expose cache bugs | |
471 tip 5:5f6e8655b1c7 | |
4213 | 472 |
11744 | 473 Remove nonexistent tag: |
474 | |
475 $ hg tag --remove foobar | |
476 abort: tag 'foobar' does not exist | |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
11744
diff
changeset
|
477 [255] |
11744 | 478 $ hg tip |
479 changeset: 5:5f6e8655b1c7 | |
480 tag: tip | |
481 user: test | |
482 date: Thu Jan 01 00:00:00 1970 +0000 | |
483 summary: Removed tag bar | |
484 | |
4266
fe7f38dda34b
tags: fix abababa case, with test case
Matt Mackall <mpm@selenic.com>
parents:
4213
diff
changeset
|
485 |
11744 | 486 Undo a tag with rollback: |
4651
7176f278d6f9
Test attempt to remove nonexistent tag
Brendan Cully <brendan@kublai.com>
parents:
4482
diff
changeset
|
487 |
11744 | 488 $ 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
|
489 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
|
490 working directory now based on revision 4 |
11744 | 491 $ hg tags |
492 tip 4:0c192d7d5e6b | |
493 bar 1:78391a272241 | |
494 $ hg tags | |
495 tip 4:0c192d7d5e6b | |
496 bar 1:78391a272241 | |
497 | |
498 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
|
499 |
11744 | 500 $ cd .. |
501 $ hg init t3 | |
502 $ cd t3 | |
503 $ echo foo > foo | |
504 $ hg add foo | |
505 $ hg ci -m 'add foo' # rev 0 | |
506 $ hg tag -f bar # rev 1 bar -> 0 | |
507 $ hg tag -f bar # rev 2 bar -> 1 | |
508 $ hg tag -fr 0 bar # rev 3 bar -> 0 | |
509 $ hg tag -fr 1 bar # rev 4 bar -> 1 | |
510 $ hg tag -fr 0 bar # rev 5 bar -> 0 | |
511 $ hg tags | |
512 tip 5:85f05169d91d | |
513 bar 0:bbd179dfa0a7 | |
514 $ hg co 3 | |
515 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
516 $ echo barbar > foo | |
517 $ hg ci -m 'change foo' # rev 6 | |
518 created new head | |
519 $ hg tags | |
520 tip 6:735c3ca72986 | |
521 bar 0:bbd179dfa0a7 | |
4267
8185a1ca8628
tags: require -f to replace an existing tag
Matt Mackall <mpm@selenic.com>
parents:
4266
diff
changeset
|
522 |
11744 | 523 Don't allow moving tag without -f: |
524 | |
525 $ hg tag -r 3 bar | |
526 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
|
527 [255] |
11744 | 528 $ hg tags |
529 tip 6:735c3ca72986 | |
530 bar 0:bbd179dfa0a7 | |
531 | |
532 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
|
533 |
11744 | 534 $ hg --config extensions.mq= strip 5 |
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 | 536 $ hg tags # partly stale cache |
537 tip 5:735c3ca72986 | |
538 bar 1:78391a272241 | |
539 $ hg tags # up-to-date cache | |
540 tip 5:735c3ca72986 | |
541 bar 1:78391a272241 | |
542 | |
543 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
|
544 |
11744 | 545 $ hg --config extensions.mq= strip 4 |
12640
6cc4b14fb76b
tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents:
12376
diff
changeset
|
546 saved backup bundle to $TESTTMP/t3/.hg/strip-backup/*-backup.hg (glob) |
11744 | 547 $ hg tags # partly stale |
548 tip 4:735c3ca72986 | |
549 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
|
550 $ rm -f .hg/cache/tags2-visible |
11744 | 551 $ hg tags # cold cache |
552 tip 4:735c3ca72986 | |
553 bar 0:bbd179dfa0a7 | |
554 | |
555 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
|
556 |
11744 | 557 $ cd .. |
558 $ hg init t4 | |
559 $ cd t4 | |
560 $ echo foo > foo | |
561 $ hg add | |
562 adding foo | |
563 $ hg ci -m 'add foo' # rev 0 | |
564 $ hg tag bar # rev 1 bar -> 0 | |
565 $ hg tag -f bar # rev 2 bar -> 1 | |
566 $ hg up -qC 0 | |
567 $ hg tag -fr 2 bar # rev 3 bar -> 2 | |
568 $ hg tags | |
569 tip 3:197c21bbbf2c | |
570 bar 2:6fa450212aeb | |
571 $ hg up -qC 0 | |
572 $ 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
|
573 |
11744 | 574 Bar should still point to rev 2: |
575 | |
576 $ hg tags | |
577 tip 4:3b4b14ed0202 | |
578 bar 2:6fa450212aeb | |
579 | |
580 Test that removing global/local tags does not get confused when trying | |
581 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
|
582 |
11744 | 583 $ cd .. |
584 $ hg init t5 | |
585 $ cd t5 | |
586 $ echo foo > foo | |
587 $ hg add | |
588 adding foo | |
589 $ 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
|
590 |
11744 | 591 $ hg tag -r 0 -l localtag |
592 $ hg tag --remove localtag | |
593 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
|
594 [255] |
11744 | 595 $ |
596 $ hg tag -r 0 globaltag | |
597 $ hg tag --remove -l globaltag | |
598 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
|
599 [255] |
11744 | 600 $ hg tags -v |
601 tip 1:a0b6fe111088 | |
602 localtag 0:bbd179dfa0a7 local | |
603 globaltag 0:bbd179dfa0a7 | |
16913
f2719b387380
tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents:
16857
diff
changeset
|
604 |
19108
cb95716da5fe
tags: update tag type only if tag node is updated (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
17345
diff
changeset
|
605 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
|
606 |
cb95716da5fe
tags: update tag type only if tag node is updated (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
17345
diff
changeset
|
607 $ 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
|
608 $ 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
|
609 $ 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
|
610 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
|
611 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
|
612 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
|
613 |
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 -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
|
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 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
|
617 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
|
618 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
|
619 |
19646
335a558f81dc
tags: write tag overwriting history also into tag cache file (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19108
diff
changeset
|
620 $ 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
|
621 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
|
622 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
|
623 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
|
624 |
19108
cb95716da5fe
tags: update tag type only if tag node is updated (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
17345
diff
changeset
|
625 $ 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
|
626 $ 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
|
627 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
|
628 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
|
629 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
|
630 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
|
631 |
19646
335a558f81dc
tags: write tag overwriting history also into tag cache file (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19108
diff
changeset
|
632 $ 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
|
633 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
|
634 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
|
635 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
|
636 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
|
637 |
16913
f2719b387380
tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents:
16857
diff
changeset
|
638 $ cd .. |
25402
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
639 |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
640 Create a repository with tags data to test .hgtags fnodes transfer |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
641 |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
642 $ hg init tagsserver |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
643 $ cd tagsserver |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
644 $ cat > .hg/hgrc << EOF |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
645 > [experimental] |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
646 > bundle2-exp=True |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
647 > EOF |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
648 $ touch foo |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
649 $ hg -q commit -A -m initial |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
650 $ hg tag -m 'tag 0.1' 0.1 |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
651 $ echo second > foo |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
652 $ hg commit -m second |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
653 $ hg tag -m 'tag 0.2' 0.2 |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
654 $ hg tags |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
655 tip 3:40f0358cb314 |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
656 0.2 2:f63cc8fe54e4 |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
657 0.1 0:96ee1d7354c4 |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
658 $ cd .. |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
659 |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
660 Cloning should pull down hgtags fnodes mappings and write the cache file |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
661 |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
662 $ hg --config experimental.bundle2-exp=True clone --pull tagsserver tagsclient |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
663 requesting all changes |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
664 adding changesets |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
665 adding manifests |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
666 adding file changes |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
667 added 4 changesets with 4 changes to 2 files |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
668 updating to branch default |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
669 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
670 |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
671 Missing tags2* files means the cache wasn't written through the normal mechanism. |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
672 |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
673 $ ls tagsclient/.hg/cache |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
674 branch2-served |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
675 hgtagsfnodes1 |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
676 rbc-names-v1 |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
677 rbc-revs-v1 |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
678 |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
679 Cache should contain the head only, even though other nodes have tags data |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
680 |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
681 $ f --size --hexdump tagsclient/.hg/cache/hgtagsfnodes1 |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
682 tagsclient/.hg/cache/hgtagsfnodes1: size=96 |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
683 0000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
684 0010: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
685 0020: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
686 0030: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
687 0040: ff ff ff ff ff ff ff ff 40 f0 35 8c 19 e0 a7 d3 |........@.5.....| |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
688 0050: 8a 5c 6a 82 4d cf fb a5 87 d0 2f a3 1e 4f 2f 8a |.\j.M...../..O/.| |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
689 |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
690 Running hg tags should produce tags2* file and not change cache |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
691 |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
692 $ hg -R tagsclient tags |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
693 tip 3:40f0358cb314 |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
694 0.2 2:f63cc8fe54e4 |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
695 0.1 0:96ee1d7354c4 |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
696 |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
697 $ ls tagsclient/.hg/cache |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
698 branch2-served |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
699 hgtagsfnodes1 |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
700 rbc-names-v1 |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
701 rbc-revs-v1 |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
702 tags2-visible |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
703 |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
704 $ f --size --hexdump tagsclient/.hg/cache/hgtagsfnodes1 |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
705 tagsclient/.hg/cache/hgtagsfnodes1: size=96 |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
706 0000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
707 0010: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
708 0020: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
709 0030: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
710 0040: ff ff ff ff ff ff ff ff 40 f0 35 8c 19 e0 a7 d3 |........@.5.....| |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
711 0050: 8a 5c 6a 82 4d cf fb a5 87 d0 2f a3 1e 4f 2f 8a |.\j.M...../..O/.| |
0c2ded041d10
exchange: support transferring .hgtags fnodes mapping
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24806
diff
changeset
|
712 |