# HG changeset patch # User Pierre-Yves David # Date 1383673064 -3600 # Node ID 7401bb54fe7635422c11658bba40e639ca767792 # Parent 2888a412f0b0933e608d2472e08607f4209dddb4 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. diff -r 2888a412f0b0 -r 7401bb54fe76 mercurial/localrepo.py --- 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)