Mercurial > hg
diff mercurial/localrepo.py @ 20221:7401bb54fe76
push: more robust check for bundle fast path
When all changesets in the local repo are either being pushed or remotly known,
we can take a fast path when bundling changeset because we are certain all local
deltas are computed againts base known remotely.
So we have a check to detect this situation, when we did a bare push and nothing
was excluded.
In a coming refactoring, the discovery will run on filtered view and the content
of `outgoing.excluded` will just include unserved (secret) changeset not filtered by the
repoview used to call push (usually "visible"). So we need to check if there is
both no excluded changeset and nothing filtered by the current repoview.
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Tue, 05 Nov 2013 18:37:44 +0100 |
parents | 2888a412f0b0 |
children | 228ae760942f |
line wrap: on
line diff
--- a/mercurial/localrepo.py Sat Nov 16 15:36:50 2013 -0500 +++ b/mercurial/localrepo.py Tue Nov 05 18:37:44 2013 +0100 @@ -1852,7 +1852,8 @@ # TODO: get bundlecaps from remote bundlecaps = None # create a changegroup from local - if revs is None and not outgoing.excluded: + if revs is None and not (outgoing.excluded + or self.changelog.filteredrevs): # push everything, # use the fast path, no race possible on push bundler = changegroup.bundle10(self, bundlecaps)