Mercurial > hg > gitweb
comparison mercurial/hg.py @ 919:1458d20df2a8
whitespace cleanup
author | mpm@selenic.com |
---|---|
date | Tue, 16 Aug 2005 15:30:26 -0800 |
parents | d46af8e6b858 |
children | c7a3b88505cd |
comparison
equal
deleted
inserted
replaced
918:fe69ecd3437c | 919:1458d20df2a8 |
---|---|
451 return self.map.copy() | 451 return self.map.copy() |
452 if x not in self.map: | 452 if x not in self.map: |
453 unknown.append(x) | 453 unknown.append(x) |
454 else: | 454 else: |
455 ret[x] = self.map[x] | 455 ret[x] = self.map[x] |
456 | 456 |
457 if not unknown: | 457 if not unknown: |
458 return ret | 458 return ret |
459 | 459 |
460 b = self.map.keys() | 460 b = self.map.keys() |
461 b.sort() | 461 b.sort() |
462 blen = len(b) | 462 blen = len(b) |
463 | 463 |
464 for x in unknown: | 464 for x in unknown: |
465 bs = bisect.bisect(b, x) | 465 bs = bisect.bisect(b, x) |
466 if bs != 0 and b[bs-1] == x: | 466 if bs != 0 and b[bs-1] == x: |
467 ret[x] = self.map[x] | 467 ret[x] = self.map[x] |
468 continue | 468 continue |
469 while bs < blen: | 469 while bs < blen: |
470 s = b[bs] | 470 s = b[bs] |
471 if len(s) > len(x) and s.startswith(x) and s[len(x)] == '/': | 471 if len(s) > len(x) and s.startswith(x) and s[len(x)] == '/': |
483 files = [self.root] | 483 files = [self.root] |
484 if not dc: | 484 if not dc: |
485 dc = self.map.copy() | 485 dc = self.map.copy() |
486 elif not dc: | 486 elif not dc: |
487 dc = self.filterfiles(files) | 487 dc = self.filterfiles(files) |
488 | 488 |
489 known = {'.hg': 1} | 489 known = {'.hg': 1} |
490 def seen(fn): | 490 def seen(fn): |
491 if fn in known: return True | 491 if fn in known: return True |
492 known[fn] = 1 | 492 known[fn] = 1 |
493 def traverse(): | 493 def traverse(): |
1079 # branch tags. | 1079 # branch tags. |
1080 # | 1080 # |
1081 # So, for this graph: a->b->c->d->e | 1081 # So, for this graph: a->b->c->d->e |
1082 # \ / | 1082 # \ / |
1083 # aa -----/ | 1083 # aa -----/ |
1084 # a has tag 2.6.12 | 1084 # a has tag 2.6.12 |
1085 # d has tag 2.6.13 | 1085 # d has tag 2.6.13 |
1086 # e would have branch tags for 2.6.12 and 2.6.13. Because the node | 1086 # e would have branch tags for 2.6.12 and 2.6.13. Because the node |
1087 # for 2.6.12 can be reached from the node 2.6.13, that is eliminated | 1087 # for 2.6.12 can be reached from the node 2.6.13, that is eliminated |
1088 # from the list. | 1088 # from the list. |
1089 # | 1089 # |