Mercurial > hg
annotate tests/test-remotefilelog-share.t @ 42415:c767e655ffda
narrow: use narrow_widen wireproto command to widen in case of ellipses
Few releases ago, we introduce narrow_widen wireproto command to be used to widen
narrow repositories. Before this patch, that was used in non-ellipses cases
only. In ellipses cases, we still do exchange.pull() which can pull more data
than required.
After this patch, the client will first check whether server supports doing
ellipses widening using wireproto command or not by checking server's wireproto
capability. If the server is upto date and support latest ellipses capability,
we call the wireproto command. Otherwise we fallback to exchange.pull() like
before.
The compat code make sure that things works even if one of the client or server
is old. The initial version of this patch does not had this compat code. It's
added to help Google release things smoothly internally. I plan to drop the
compat code before the upcoming major release.
Due to change to wireproto command, the code looks a bit dirty, next patches
will clean that up.
Differential Revision: https://phab.mercurial-scm.org/D6436
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Wed, 22 May 2019 02:59:48 +0530 |
parents | 0800d9e6e216 |
children | d252f51ab032 |
rev | line source |
---|---|
40722
0800d9e6e216
tests: disable remotefilelog on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
40577
diff
changeset
|
1 #require no-windows |
0800d9e6e216
tests: disable remotefilelog on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
40577
diff
changeset
|
2 |
40575
fb490d798be0
share: reload repo after adjusting it in postshare()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
3 $ . "$TESTDIR/remotefilelog-library.sh" |
fb490d798be0
share: reload repo after adjusting it in postshare()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
4 |
fb490d798be0
share: reload repo after adjusting it in postshare()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
5 $ cat >> $HGRCPATH <<EOF |
fb490d798be0
share: reload repo after adjusting it in postshare()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
6 > [extensions] |
fb490d798be0
share: reload repo after adjusting it in postshare()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
7 > remotefilelog= |
fb490d798be0
share: reload repo after adjusting it in postshare()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
8 > share= |
fb490d798be0
share: reload repo after adjusting it in postshare()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
9 > EOF |
fb490d798be0
share: reload repo after adjusting it in postshare()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
10 |
fb490d798be0
share: reload repo after adjusting it in postshare()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
11 $ hg init master |
fb490d798be0
share: reload repo after adjusting it in postshare()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
12 $ cd master |
fb490d798be0
share: reload repo after adjusting it in postshare()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
13 $ cat >> .hg/hgrc <<EOF |
fb490d798be0
share: reload repo after adjusting it in postshare()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
14 > [remotefilelog] |
fb490d798be0
share: reload repo after adjusting it in postshare()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
15 > server=True |
fb490d798be0
share: reload repo after adjusting it in postshare()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
16 > EOF |
fb490d798be0
share: reload repo after adjusting it in postshare()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
17 $ echo x > x |
fb490d798be0
share: reload repo after adjusting it in postshare()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
18 $ hg commit -qAm x |
fb490d798be0
share: reload repo after adjusting it in postshare()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
19 |
fb490d798be0
share: reload repo after adjusting it in postshare()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
20 $ cd .. |
fb490d798be0
share: reload repo after adjusting it in postshare()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
21 |
fb490d798be0
share: reload repo after adjusting it in postshare()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
22 |
fb490d798be0
share: reload repo after adjusting it in postshare()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
23 $ hgcloneshallow ssh://user@dummy/master source --noupdate -q |
fb490d798be0
share: reload repo after adjusting it in postshare()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
24 $ hg share source dest |
fb490d798be0
share: reload repo after adjusting it in postshare()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
25 updating working directory |
fb490d798be0
share: reload repo after adjusting it in postshare()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
26 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
40577
157f0e29eaa3
remotefilelog: avoid accessing repo instance after dispatch
Martin von Zweigbergk <martinvonz@google.com>
parents:
40575
diff
changeset
|
27 $ hg -R dest unshare |