Show More
@@ -307,7 +307,7 b' class localrepository(repo.repository):' | |||||
307 | if bn != an and an in bh and \ |
|
307 | if bn != an and an in bh and \ | |
308 | (bn not in ah or len(bh) > len(ah)): |
|
308 | (bn not in ah or len(bh) > len(ah)): | |
309 | an = bn |
|
309 | an = bn | |
310 |
ah. |
|
310 | ah.extend([n for n in bh if n not in ah]) | |
311 | globaltags[k] = an, ah |
|
311 | globaltags[k] = an, ah | |
312 |
|
312 | |||
313 | # read the tags file from each head, ending with the tip |
|
313 | # read the tags file from each head, ending with the tip |
@@ -104,4 +104,21 b" hg ci -m 'change foo' -d '1000000 0' " | |||||
104 | hg tags |
|
104 | hg tags | |
105 |
|
105 | |||
106 | hg tag -d '1000000 0' -r 3 bar # should complain |
|
106 | hg tag -d '1000000 0' -r 3 bar # should complain | |
107 | hg tags No newline at end of file |
|
107 | hg tags | |
|
108 | ||||
|
109 | # test tag rank with 3 heads | |||
|
110 | cd .. | |||
|
111 | hg init t4 | |||
|
112 | cd t4 | |||
|
113 | echo foo > foo | |||
|
114 | hg add | |||
|
115 | hg ci -m 'add foo' -d '0 0' # rev 0 | |||
|
116 | hg tag -d '0 0' bar # rev 1 bar -> 0 | |||
|
117 | hg tag -d '0 0' -f bar # rev 2 bar -> 1 | |||
|
118 | hg up -qC 0 | |||
|
119 | hg tag -d '0 0' -fr 2 bar # rev 3 bar -> 2 | |||
|
120 | hg tags | |||
|
121 | hg up -qC 0 | |||
|
122 | hg tag -d '0 0' -m 'retag rev 0' -fr 0 bar # rev 4 bar -> 0, but bar stays at 2 | |||
|
123 | echo % bar should still point to rev 2 | |||
|
124 | hg tags |
@@ -57,3 +57,9 b' bar 0:b40' | |||||
57 | abort: a tag named bar already exists (use -f to force) |
|
57 | abort: a tag named bar already exists (use -f to force) | |
58 | tip 6:b5ff9d142648 |
|
58 | tip 6:b5ff9d142648 | |
59 | bar 0:b409d9da318e |
|
59 | bar 0:b409d9da318e | |
|
60 | adding foo | |||
|
61 | tip 3:ca8479b4351c | |||
|
62 | bar 2:72b852876a42 | |||
|
63 | % bar should still point to rev 2 | |||
|
64 | tip 4:40af5d225513 | |||
|
65 | bar 2:72b852876a42 |
General Comments 0
You need to be logged in to leave comments.
Login now