pushbookmark: stop unrolling ancestors
Now that ancestors has the same boolean property as a list, we can stop unrolling
the set of ancestors. This should provide a significant speedup to this step as
ancestor objects are smart and lazy.
--- a/mercurial/exchange.py Fri Aug 15 15:57:50 2014 -0700
+++ b/mercurial/exchange.py Fri Aug 15 16:31:06 2014 -0700
@@ -618,7 +618,7 @@
remote = pushop.remote
ui.debug("checking for updated bookmarks\n")
revnums = map(repo.changelog.rev, pushop.revs or [])
- ancestors = [a for a in repo.changelog.ancestors(revnums, inclusive=True)]
+ ancestors = repo.changelog.ancestors(revnums, inclusive=True)
(addsrc, adddst, advsrc, advdst, diverge, differ, invalid
) = bookmarks.compare(repo, repo._bookmarks, remote.listkeys('bookmarks'),
srchex=hex)