Mercurial > hg
view tests/test-remotefilelog-bad-configs.t @ 40924:08cfa77d7288
wireprotov2: unify file revision collection and linknode derivation
The old mechanism for choosing which file revisions to send in the
haveparents=True case was buggy in multiple ways - the most severe
of which being that file revisions were excluded when they shouldn't
have been.
This commit unifies the logic for deriving the filenodes that will
be sent by the "filesdata" command. We now consistently read files
data from manifests. The "haveparents" argument now controls whether
we iterate ctx.files() or use the full manifest to derive relevant
files.
The logic here is still woefully lacking to fully support shallow
clones. It will require an API break to fully address. This commit
should at least make the server APIs emit proper data, which is
strictly better than before.
Differential Revision: https://phab.mercurial-scm.org/D5406
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Mon, 10 Dec 2018 18:55:08 +0000 |
parents | 0800d9e6e216 |
children |
line wrap: on
line source
#require no-windows $ . "$TESTDIR/remotefilelog-library.sh" $ hg init master $ cd master $ cat >> .hg/hgrc <<EOF > [remotefilelog] > server=True > EOF $ echo x > x $ echo y > y $ echo z > z $ hg commit -qAm xy $ cd .. $ hgcloneshallow ssh://user@dummy/master shallow -q 3 files fetched over 1 fetches - (3 misses, 0.00% hit ratio) over *s (glob) $ cd shallow Verify error message when noc achepath specified $ hg up -q null $ cp $HGRCPATH $HGRCPATH.bak $ grep -v cachepath < $HGRCPATH.bak > tmp $ mv tmp $HGRCPATH $ hg up tip abort: could not find config option remotefilelog.cachepath [255] $ mv $HGRCPATH.bak $HGRCPATH Verify error message when no fallback specified $ hg up -q null $ rm .hg/hgrc $ clearcache $ hg up tip 3 files fetched over 1 fetches - (3 misses, 0.00% hit ratio) over *s (glob) abort: no remotefilelog server configured - is your .hg/hgrc trusted? [255]