2013-09-26 21:46:06 +04:00
|
|
|
$ . "$TESTDIR/library.sh"
|
|
|
|
|
|
|
|
$ hginit master
|
|
|
|
$ cd master
|
|
|
|
$ cat >> .hg/hgrc <<EOF
|
|
|
|
> [remotefilelog]
|
|
|
|
> server=True
|
|
|
|
> EOF
|
|
|
|
$ echo x > foo
|
|
|
|
$ echo y > bar
|
|
|
|
$ hg commit -qAm one
|
|
|
|
|
|
|
|
$ cd ..
|
|
|
|
|
|
|
|
# partial shallow clone
|
|
|
|
|
2013-11-23 01:39:35 +04:00
|
|
|
$ hg clone --shallow ssh://user@dummy/master shallow --noupdate --config remotefilelog.includepattern=foo
|
2013-09-26 21:46:06 +04:00
|
|
|
streaming all changes
|
|
|
|
3 files to transfer, 336 bytes of data
|
2016-03-08 14:47:33 +03:00
|
|
|
transferred 336 bytes in * seconds (*/sec) (glob)
|
2014-11-08 05:17:39 +03:00
|
|
|
searching for changes
|
|
|
|
no changes found
|
2013-09-26 21:46:06 +04:00
|
|
|
$ cat >> shallow/.hg/hgrc <<EOF
|
|
|
|
> [remotefilelog]
|
|
|
|
> cachepath=$PWD/hgcache
|
|
|
|
> debug=True
|
|
|
|
> includepattern=foo
|
2013-08-15 22:00:51 +04:00
|
|
|
> reponame = master
|
2013-09-26 21:46:06 +04:00
|
|
|
> [extensions]
|
|
|
|
> remotefilelog=$TESTDIR/../remotefilelog
|
|
|
|
> EOF
|
|
|
|
$ ls shallow/.hg/store/data
|
|
|
|
bar.i
|
|
|
|
|
|
|
|
# update partial clone
|
|
|
|
|
|
|
|
$ cd shallow
|
|
|
|
$ hg update
|
|
|
|
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
|
|
|
1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over *s (glob)
|
|
|
|
$ cat foo
|
|
|
|
x
|
|
|
|
$ cat bar
|
|
|
|
y
|
|
|
|
$ cd ..
|
|
|
|
|
|
|
|
# pull partial clone
|
|
|
|
|
|
|
|
$ cd master
|
|
|
|
$ echo a >> foo
|
|
|
|
$ echo b >> bar
|
|
|
|
$ hg commit -qm two
|
|
|
|
$ cd ../shallow
|
|
|
|
$ hg pull
|
2013-11-23 01:39:35 +04:00
|
|
|
pulling from ssh://user@dummy/master
|
2013-09-26 21:46:06 +04:00
|
|
|
searching for changes
|
|
|
|
adding changesets
|
|
|
|
adding manifests
|
|
|
|
adding file changes
|
|
|
|
added 1 changesets with 0 changes to 0 files
|
|
|
|
(run 'hg update' to get a working copy)
|
|
|
|
$ hg update
|
|
|
|
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
|
|
|
1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over *s (glob)
|
|
|
|
$ cat foo
|
|
|
|
x
|
|
|
|
a
|
|
|
|
$ cat bar
|
|
|
|
y
|
|
|
|
b
|
|
|
|
|
|
|
|
$ cd ..
|