##// END OF EJS Templates
bundle: don't use sets.Set
Matt Mackall -
r3631:770c4fc0 default
parent child Browse files
Show More
@@ -11,7 +11,7 b' from i18n import gettext as _'
11 11 demandload(globals(), "os re sys signal imp urllib pdb shlex")
12 12 demandload(globals(), "fancyopts ui hg util lock revlog templater bundlerepo")
13 13 demandload(globals(), "difflib patch tempfile time")
14 demandload(globals(), "traceback errno version atexit sets bz2")
14 demandload(globals(), "traceback errno version atexit bz2")
15 15 demandload(globals(), "archival changegroup cmdutil hgweb.server sshserver")
16 16
17 17 class UnknownCommand(Exception):
@@ -827,24 +827,23 b' def bundle(ui, repo, fname, dest=None, *'
827 827 # create the right base
828 828 # XXX: nodesbetween / changegroup* should be "fixed" instead
829 829 o = []
830 has_set = sets.Set(base)
830 has = {nullid: None}
831 831 for n in base:
832 has_set.update(repo.changelog.reachable(n))
832 has.update(repo.changelog.reachable(n))
833 833 if revs:
834 834 visit = list(revs)
835 835 else:
836 836 visit = repo.changelog.heads()
837 seen = sets.Set(visit)
837 seen = {}
838 838 while visit:
839 839 n = visit.pop(0)
840 parents = [p for p in repo.changelog.parents(n)
841 if p != nullid and p not in has_set]
840 parents = [p for p in repo.changelog.parents(n) if p not in has]
842 841 if len(parents) == 0:
843 842 o.insert(0, n)
844 843 else:
845 844 for p in parents:
846 845 if p not in seen:
847 seen.add(p)
846 seen[p] = 1
848 847 visit.append(p)
849 848 else:
850 849 setremoteconfig(ui, opts)
General Comments 0
You need to be logged in to leave comments. Login now