mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 16:31:02 +03:00
requires: don't add hgsql to supportedformats
Summary: That breaks streaming clones. Test Plan: New tests Reviewers: #sourcecontrol, mitrandir, simonfar, durham Reviewed By: mitrandir, simonfar, durham Differential Revision: https://phabricator.intern.facebook.com/D5022742 Tasks: 18032444 Signature: t1:5022742:1494274692:989c9a1235b3d5e173a09a48c3007abddcaac8ce
This commit is contained in:
parent
ac652573bc
commit
4c9891bc6d
4
hgsql.py
4
hgsql.py
@ -34,7 +34,9 @@ INITIAL_SYNC_FORCE = 'force'
|
||||
initialsync = INITIAL_SYNC_NORMAL
|
||||
|
||||
cls = localrepo.localrepository
|
||||
for reqs in ['supportedformats', 'openerreqs', '_basesupported']:
|
||||
# Do NOT add hgsql to localrepository.supportedformats. Doing that breaks
|
||||
# streaming clones.
|
||||
for reqs in ['openerreqs', '_basesupported']:
|
||||
getattr(cls, reqs).add('hgsql')
|
||||
|
||||
def newreporequirements(orig, repo):
|
||||
|
@ -14,6 +14,8 @@
|
||||
$ hg pull -q ../client
|
||||
|
||||
Test that hgsql is a requirement
|
||||
$ grep hgsql .hg/requires
|
||||
hgsql
|
||||
$ hg log -r tip --config extensions.hgsql=!
|
||||
abort: repository requires features unknown to this Mercurial: hgsql!
|
||||
(see https://mercurial-scm.org/wiki/MissingRequirement for more information)
|
||||
@ -25,3 +27,9 @@ Test that hgsql is a requirement
|
||||
date: Thu Jan 01 00:00:00 1970 +0000
|
||||
summary: x
|
||||
|
||||
|
||||
Ensure streaming clones to non-hgsql repos work
|
||||
$ cd ..
|
||||
$ hg clone --config extensions.hgsql=! --config ui.ssh='python "$TESTDIR/dummyssh"' --uncompressed ssh://user@dummy/master client2 | grep "streaming all changes"
|
||||
streaming all changes
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user