Mercurial > hg
changeset 22226:827bce9e24fb
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.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Fri, 15 Aug 2014 16:31:06 -0700 |
parents | baecf4e1b7d0 |
children | 98cbd41cb532 |
files | mercurial/exchange.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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)