Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/localrepo.py @ 4266:fe7f38dda34b
tags: fix abababa case, with test case
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Thu, 22 Mar 2007 23:52:50 -0500 |
parents | 24c22a3f2ef8 |
children | f38f90a177dc cea5ba038a1d |
comparison
equal
deleted
inserted
replaced
4247:89075f106414 | 4266:fe7f38dda34b |
---|---|
286 continue | 286 continue |
287 if bin_n not in self.changelog.nodemap: | 287 if bin_n not in self.changelog.nodemap: |
288 warn(_("tag '%s' refers to unknown node") % key) | 288 warn(_("tag '%s' refers to unknown node") % key) |
289 continue | 289 continue |
290 | 290 |
291 h = {} | 291 h = [] |
292 if key in filetags: | 292 if key in filetags: |
293 n, h = filetags[key] | 293 n, h = filetags[key] |
294 h[n] = True | 294 h.append(n) |
295 filetags[key] = (bin_n, h) | 295 filetags[key] = (bin_n, h) |
296 | 296 |
297 for k,nh in filetags.items(): | 297 for k,nh in filetags.items(): |
298 if k not in globaltags: | 298 if k not in globaltags: |
299 globaltags[k] = nh | 299 globaltags[k] = nh |
305 an, ah = nh | 305 an, ah = nh |
306 bn, bh = globaltags[k] | 306 bn, bh = globaltags[k] |
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.update(bh) | 310 ah.append([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 |
314 f = None | 314 f = None |
315 for rev, node, fnode in self._hgtagsnodes(): | 315 for rev, node, fnode in self._hgtagsnodes(): |