mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 07:17:55 +03:00
hg: don't send tree packs as part of pushrebase pushes
Summary: Previously pushrebase pushes would send a tree pack part as well as a rebase pack part. The tree pack part was ignored. Let's make receiving tree pack parts on the server an error, and instead make the client not send them if it's doing a pushrebase push. A future diff will come back and add support for non-pushrebase push of tree packs. This diff just makes use sure that the new logic won't run during pushrebase. Reviewed By: ryanmce Differential Revision: D7267802 fbshipit-source-id: cabff989c178afb3706b77a03a299bcf3195f289
This commit is contained in:
parent
161a6ddc0d
commit
ae52f1bd3c
@ -478,6 +478,7 @@ def rebasepartgen(pushop, bundler):
|
||||
return
|
||||
|
||||
pushop.stepsdone.add('changesets')
|
||||
pushop.stepsdone.add('treepack')
|
||||
if not pushop.outgoing.missing:
|
||||
# It's important that this text match the text found in upstream
|
||||
# Mercurial, since some tools rely on this string to know if a push
|
||||
|
@ -1500,7 +1500,8 @@ def _registerbundle2parts():
|
||||
# Treemanifest servers don't accept tree directly. They must go through
|
||||
# pushrebase, which uses it's own part type and handler.
|
||||
if repo.svfs.treemanifestserver:
|
||||
return
|
||||
raise error.ProgrammingError("treemanifest servers can't receive "
|
||||
"normal tree packs (use pushrebase)")
|
||||
|
||||
if part.params.get('cache', 'False') == 'True':
|
||||
packpath = shallowutil.getcachepackpath(repo, PACK_CATEGORY)
|
||||
|
@ -96,5 +96,5 @@ Test bundling/unbundling
|
||||
c0196aba344d 000000000000 49 (missing)
|
||||
|
||||
Test pushing
|
||||
$ hg push -r tip --to master --debug | grep treegroup
|
||||
bundle2-output-part: "b2x:treegroup2" (params: 3 mandatory) streamed payload
|
||||
$ hg push -r tip --to master --debug | grep rebasepackpart
|
||||
bundle2-output-part: "b2x:rebasepackpart" (params: 3 mandatory) streamed payload
|
||||
|
@ -75,8 +75,8 @@ Test committing auto-downloads server trees and produces local trees
|
||||
54cbf534b62b 000000000000 99 (missing)
|
||||
|
||||
|
||||
Test pushing without pushrebase creates trees
|
||||
$ hg push
|
||||
Test pushing flat manifests only without pushrebase creates trees
|
||||
$ hg push --config treemanifest.sendtrees=False
|
||||
pushing to ssh://user@dummy/master
|
||||
searching for changes
|
||||
remote: adding changesets
|
||||
|
Loading…
Reference in New Issue
Block a user