Show More
@@ -288,10 +288,10 b' class localrepository(repo.repository):' | |||
|
288 | 288 | warn(_("tag '%s' refers to unknown node") % key) |
|
289 | 289 | continue |
|
290 | 290 | |
|
291 |
h = |
|
|
291 | h = [] | |
|
292 | 292 | if key in filetags: |
|
293 | 293 | n, h = filetags[key] |
|
294 |
h |
|
|
294 | h.append(n) | |
|
295 | 295 | filetags[key] = (bin_n, h) |
|
296 | 296 | |
|
297 | 297 | for k,nh in filetags.items(): |
@@ -307,7 +307,7 b' class localrepository(repo.repository):' | |||
|
307 | 307 | if bn != an and an in bh and \ |
|
308 | 308 | (bn not in ah or len(bh) > len(ah)): |
|
309 | 309 | an = bn |
|
310 | ah.update(bh) | |
|
310 | ah.append([n for n in bh if n not in ah]) | |
|
311 | 311 | globaltags[k] = an, ah |
|
312 | 312 | |
|
313 | 313 | # read the tags file from each head, ending with the tip |
@@ -80,6 +80,25 b' echo >> foo' | |||
|
80 | 80 | hg ci -m 'change foo 2' -d '1000000 0' # rev 4 |
|
81 | 81 | hg tags |
|
82 | 82 | |
|
83 | # test tag removal | |
|
83 | 84 | hg tag --remove -d '1000000 0' bar |
|
84 | 85 | hg tip |
|
85 | 86 | hg tags |
|
87 | ||
|
88 | # test tag rank | |
|
89 | cd .. | |
|
90 | hg init t3 | |
|
91 | cd t3 | |
|
92 | echo foo > foo | |
|
93 | hg add foo | |
|
94 | hg ci -m 'add foo' -d '1000000 0' # rev 0 | |
|
95 | hg tag -d '1000000 0' bar # rev 1 bar -> 0 | |
|
96 | hg tag -d '1000000 0' bar # rev 2 bar -> 1 | |
|
97 | hg tag -d '1000000 0' -r 0 bar # rev 3 bar -> 0 | |
|
98 | hg tag -d '1000000 0' -r 1 bar # rev 3 bar -> 1 | |
|
99 | hg tag -d '1000000 0' -r 0 bar # rev 4 bar -> 0 | |
|
100 | hg tags | |
|
101 | hg co 3 | |
|
102 | echo barbar > foo | |
|
103 | hg ci -m 'change foo' -d '1000000 0' # rev 0 | |
|
104 | hg tags |
General Comments 0
You need to be logged in to leave comments.
Login now