# HG changeset patch # User Pierre-Yves David # Date 1408145466 25200 # Node ID 827bce9e24fba5ed39043a35e842a07b8479a83f # Parent baecf4e1b7d02f62b368515bf07f5239b10ab9b9 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. diff -r baecf4e1b7d0 -r 827bce9e24fb mercurial/exchange.py --- 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)