##// END OF EJS Templates
tests: update narrowspec when narrowspec, not dirstate, is accessed...
tests: update narrowspec when narrowspec, not dirstate, is accessed test-narrow-expanddirstate.t mimics a Google-internal extension that updates the narrowspec whenever the dirstate is accessed. Since 1d09ba0d2ed3 (narrow: move remaining narrow-limited dirstate walks to core, 2018-10-01) and a few commits before it, we no longer restrict repo.dirstate.walk() to the narrowspec. It is instead done at a higher level (e.g. context.status()). We were running into problems with the Google-internal extension when importing those commits. The issue was that the narrowspec was read before the first dirstate access. I believe the right fix is to instead update the narrowspec when trying to read it (not when reading the dirstate), so that's what this patch does. Differential Revision: https://phab.mercurial-scm.org/D5275

File last commit:

r40955:a0886a4d default
r41069:92fde288 default
Show More
test-narrow-clone-stream.t
94 lines | 2.1 KiB | text/troff | Tads3Lexer
/ tests / test-narrow-clone-stream.t
Yuya Nishihara
test-narrow-clone-stream: include no usefncache case which is broken...
r40619 #testcases tree flat-fncache flat-nofncache
Pulkit Goyal
store: introduce _matchtrackedpath() and use it to filter store files...
r40529
Pulkit Goyal
streamclone: new server config and some API changes for narrow stream clones...
r40374 Tests narrow stream clones
$ . "$TESTDIR/narrow-library.sh"
Pulkit Goyal
store: introduce _matchtrackedpath() and use it to filter store files...
r40529 #if tree
$ cat << EOF >> $HGRCPATH
> [experimental]
> treemanifest = 1
> EOF
#endif
Yuya Nishihara
test-narrow-clone-stream: include no usefncache case which is broken...
r40619 #if flat-nofncache
$ cat << EOF >> $HGRCPATH
> [format]
> usefncache = 0
> EOF
#endif
Pulkit Goyal
streamclone: new server config and some API changes for narrow stream clones...
r40374 Server setup
$ hg init master
$ cd master
$ mkdir dir
$ mkdir dir/src
$ cd dir/src
Yuya Nishihara
test-narrow-clone-stream: include uppercase letter in filename...
r40618 $ for x in `$TESTDIR/seq.py 20`; do echo $x > "F$x"; hg add "F$x"; hg commit -m "Commit src $x"; done
Pulkit Goyal
streamclone: new server config and some API changes for narrow stream clones...
r40374
$ cd ..
$ mkdir tests
$ cd tests
Yuya Nishihara
test-narrow-clone-stream: include uppercase letter in filename...
r40618 $ for x in `$TESTDIR/seq.py 20`; do echo $x > "F$x"; hg add "F$x"; hg commit -m "Commit src $x"; done
Pulkit Goyal
streamclone: new server config and some API changes for narrow stream clones...
r40374 $ cd ../../..
Trying to stream clone when the server does not support it
Yuya Nishihara
test-narrow-clone-stream: include uppercase letter in filename...
r40618 $ hg clone --narrow ssh://user@dummy/master narrow --noupdate --include "dir/src/F10" --stream
Pulkit Goyal
streamclone: new server config and some API changes for narrow stream clones...
r40374 streaming all changes
remote: abort: server does not support narrow stream clones
abort: pull failed on remote
[255]
Enable stream clone on the server
Augie Fackler
tests: fix config knob in test-narrow-clone-stream.t...
r40582 $ echo "[experimental]" >> master/.hg/hgrc
$ echo "server.stream-narrow-clones=True" >> master/.hg/hgrc
Pulkit Goyal
streamclone: new server config and some API changes for narrow stream clones...
r40374
Cloning a specific file when stream clone is supported
Yuya Nishihara
test-narrow-clone-stream: include uppercase letter in filename...
r40618 $ hg clone --narrow ssh://user@dummy/master narrow --noupdate --include "dir/src/F10" --stream
Pulkit Goyal
streamclone: new server config and some API changes for narrow stream clones...
r40374 streaming all changes
Pulkit Goyal
store: introduce _matchtrackedpath() and use it to filter store files...
r40529 * files to transfer, * KB of data (glob)
transferred * KB in * seconds (* */sec) (glob)
$ cd narrow
$ ls
$ hg tracked
Yuya Nishihara
test-narrow-clone-stream: include uppercase letter in filename...
r40618 I path:dir/src/F10
Pulkit Goyal
store: introduce _matchtrackedpath() and use it to filter store files...
r40529
Making sure we have the correct set of requirements
$ cat .hg/requires
Yuya Nishihara
test-narrow-clone-stream: include no usefncache case which is broken...
r40619 dotencode (tree flat-fncache !)
fncache (tree flat-fncache !)
Pulkit Goyal
store: introduce _matchtrackedpath() and use it to filter store files...
r40529 generaldelta
narrowhg-experimental
revlogv1
Boris Feld
test: enable sparse-revlog for test-narrow-clone-stream.t...
r40935 sparserevlog
Pulkit Goyal
store: introduce _matchtrackedpath() and use it to filter store files...
r40529 store
treemanifest (tree !)
Making sure store has the required files
$ ls .hg/store/
00changelog.i
00manifest.i
Yuya Nishihara
test-narrow-clone-stream: include no usefncache case which is broken...
r40619 data (tree flat-fncache !)
fncache (tree flat-fncache !)
Pulkit Goyal
store: introduce _matchtrackedpath() and use it to filter store files...
r40529 meta (tree !)
narrowspec
undo
undo.backupfiles
undo.phaseroots
Checking that repository has all the required data and not broken
$ hg verify
checking changesets
checking manifests
checking directory manifests (tree !)
crosschecking files in changesets and manifests
checking files
checked 40 changesets with 1 changes to 1 files