Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/revlog.py @ 8163:62d7287fe6b0
rebase, revlog: use set(x) instead of set(x.keys())
The latter is both unnecessary and slower.
author | Martin Geisler <mg@lazybytes.net> |
---|---|
date | Sat, 25 Apr 2009 22:25:49 +0200 |
parents | 616f20e1004a |
children | 46293a0c7e9f |
comparison
equal
deleted
inserted
replaced
8162:6f14253416bd | 8163:62d7287fe6b0 |
---|---|
676 # Turn heads into a dictionary so we can remove 'fake' heads. | 676 # Turn heads into a dictionary so we can remove 'fake' heads. |
677 # Also, later we will be using it to filter out the heads we can't | 677 # Also, later we will be using it to filter out the heads we can't |
678 # find from roots. | 678 # find from roots. |
679 heads = dict.fromkeys(heads, 0) | 679 heads = dict.fromkeys(heads, 0) |
680 # Start at the top and keep marking parents until we're done. | 680 # Start at the top and keep marking parents until we're done. |
681 nodestotag = set(heads.keys()) | 681 nodestotag = set(heads) |
682 # Remember where the top was so we can use it as a limit later. | 682 # Remember where the top was so we can use it as a limit later. |
683 highestrev = max([self.rev(n) for n in nodestotag]) | 683 highestrev = max([self.rev(n) for n in nodestotag]) |
684 while nodestotag: | 684 while nodestotag: |
685 # grab a node to tag | 685 # grab a node to tag |
686 n = nodestotag.pop() | 686 n = nodestotag.pop() |