Mercurial > hg
changeset 8481:a9dab5a0f85b
localrepo: use set.update for bulk updates
author | Martin Geisler <mg@lazybytes.net> |
---|---|
date | Sun, 17 May 2009 16:56:53 +0200 |
parents | 0e91bcaaa92c |
children | fc27c91fff2c |
files | mercurial/localrepo.py |
diffstat | 1 files changed, 3 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/localrepo.py Sun May 17 16:56:20 2009 +0200 +++ b/mercurial/localrepo.py Sun May 17 16:56:53 2009 +0200 @@ -1578,9 +1578,8 @@ knownheads = set() # We assume that all parents of bases are known heads. for n in bases: - for p in cl.parents(n): - if p != nullid: - knownheads.add(p) + knownheads.update(cl.parents(n)) + knownheads.discard(nullid) knownheads = list(knownheads) if knownheads: # Now that we know what heads are known, we can compute which @@ -1866,8 +1865,7 @@ def changed_file_collector(changedfileset): def collect_changed_files(clnode): c = cl.read(clnode) - for fname in c[3]: - changedfileset.add(fname) + changedfileset.update(c[3]) return collect_changed_files def lookuprevlink_func(revlog):