Mercurial > public > mercurial-scm > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
20220:2888a412f0b0 | 20221:7401bb54fe76 |
---|---|
1850 bool(inc), newbm) | 1850 bool(inc), newbm) |
1851 | 1851 |
1852 # TODO: get bundlecaps from remote | 1852 # TODO: get bundlecaps from remote |
1853 bundlecaps = None | 1853 bundlecaps = None |
1854 # create a changegroup from local | 1854 # create a changegroup from local |
1855 if revs is None and not outgoing.excluded: | 1855 if revs is None and not (outgoing.excluded |
1856 or self.changelog.filteredrevs): | |
1856 # push everything, | 1857 # push everything, |
1857 # use the fast path, no race possible on push | 1858 # use the fast path, no race possible on push |
1858 bundler = changegroup.bundle10(self, bundlecaps) | 1859 bundler = changegroup.bundle10(self, bundlecaps) |
1859 cg = self._changegroupsubset(outgoing, | 1860 cg = self._changegroupsubset(outgoing, |
1860 bundler, | 1861 bundler, |