mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 08:18:15 +03:00
scmstore: update additional test
Summary: Only four tests remaining after this. Reviewed By: kulshrax Differential Revision: D29229656 fbshipit-source-id: 56c0a17f6585263e983ce8bc3c345b1f266422e0
This commit is contained in:
parent
88ab7198bc
commit
43a75431bb
@ -43,12 +43,12 @@ setup repo-push and repo-pull
|
||||
$ cd "$TESTTMP"
|
||||
$ hgclone_treemanifest ssh://user@dummy/repo-hg repo-push --noupdate
|
||||
$ cd "${TESTTMP}/repo-push"
|
||||
$ setup_hg_lfs "$lfs_uri" 10B "$TESTTMP/lfs-cache"
|
||||
$ setup_hg_modern_lfs "$lfs_uri" 10B "$TESTTMP/lfs-cache"
|
||||
|
||||
$ cd "$TESTTMP"
|
||||
$ hgclone_treemanifest ssh://user@dummy/repo-hg repo-pull --noupdate
|
||||
$ cd "${TESTTMP}/repo-pull"
|
||||
$ setup_hg_lfs "$lfs_uri" 10B "$TESTTMP/lfs-cache"
|
||||
$ setup_hg_modern_lfs "$lfs_uri" 10B "$TESTTMP/lfs-cache"
|
||||
|
||||
Do infinitepush (aka commit cloud) push
|
||||
$ cd "${TESTTMP}/repo-push"
|
||||
@ -76,10 +76,6 @@ Do infinitepush (aka commit cloud) push
|
||||
preparing listkeys for "bookmarks"
|
||||
sending listkeys command
|
||||
received listkey for "bookmarks": 57 bytes
|
||||
lfs: computing set of blobs to upload
|
||||
lfs: uploading f9f7889fcedc8580403673810e2be90e35980f10234f80d08a6497bbda16a245 (200 bytes)
|
||||
lfs: processed: f9f7889fcedc8580403673810e2be90e35980f10234f80d08a6497bbda16a245
|
||||
lfs: computing set of blobs to upload
|
||||
1 changesets found
|
||||
list of changesets:
|
||||
68394cf51f7e96952fe832a3c05d17a9b49e8b4b
|
||||
|
@ -34,11 +34,11 @@ Setup Mononoke
|
||||
Setup LFS server
|
||||
$ lfs_uri="$(lfs_server)/repo"
|
||||
|
||||
Clone the repository, then enable HG LFS
|
||||
Clone the repository, then enable LFS
|
||||
$ hgclone_treemanifest ssh://user@dummy/repo-hg-nolfs repo-hg-lfs --noupdate --config extensions.remotenames=
|
||||
$ cd repo-hg-lfs
|
||||
$ setup_hg_client
|
||||
$ setup_hg_lfs "$lfs_uri" 1000B "$TESTTMP/lfs-cache1"
|
||||
$ setup_hg_modern_lfs "$lfs_uri" 1000B "$TESTTMP/lfs-cache1"
|
||||
|
||||
$ cat >> .hg/hgrc <<EOF
|
||||
> [extensions]
|
||||
@ -62,7 +62,7 @@ Create a new repository, enable LFS there as well
|
||||
$ hgclone_treemanifest ssh://user@dummy/repo-hg-nolfs repo-hg-lfs2 --noupdate --config extensions.remotenames=
|
||||
$ cd repo-hg-lfs2
|
||||
$ setup_hg_client
|
||||
$ setup_hg_lfs "$lfs_uri" 1000B "$TESTTMP/lfs-cache2"
|
||||
$ setup_hg_modern_lfs "$lfs_uri" 1000B "$TESTTMP/lfs-cache2"
|
||||
|
||||
$ cat >> .hg/hgrc <<EOF
|
||||
> [extensions]
|
||||
@ -87,5 +87,5 @@ Pull changes from Mononoke
|
||||
|
||||
$ hg debugfilerevision
|
||||
ee97b40ee584: copy and move large
|
||||
largeCopy: bin=1 lnk=0 flag=2000 size=2000 copied='large' chain=ca253e07b280
|
||||
largeNew: bin=1 lnk=0 flag=2000 size=2000 copied='large' chain=ca253e07b280
|
||||
largeCopy: bin=1 lnk=0 flag=0 size=2000 copied='large' chain=ca253e07b280
|
||||
largeNew: bin=1 lnk=0 flag=0 size=2000 copied='large' chain=ca253e07b280
|
||||
|
@ -46,7 +46,7 @@
|
||||
$ hgclone_treemanifest ssh://user@dummy/repo-hg-nolfs repo-hg-lfs --noupdate --config extensions.remotenames=
|
||||
$ cd repo-hg-lfs
|
||||
$ setup_hg_client
|
||||
$ setup_hg_lfs "$lfs_uri" 1000B "$TESTTMP/lfs-cache1"
|
||||
$ setup_hg_modern_lfs "$lfs_uri" 1000B "$TESTTMP/lfs-cache1"
|
||||
|
||||
$ cat >> .hg/hgrc <<EOF
|
||||
> [extensions]
|
||||
@ -66,8 +66,6 @@
|
||||
$ hgmn push -r . --to master_bookmark -v
|
||||
pushing rev 0db8825b9792 to destination ssh://user@dummy/repo bookmark master_bookmark
|
||||
searching for changes
|
||||
lfs: uploading f11e77c257047a398492d8d6cb9f6acf3aa7c4384bb23080b43546053e183e4b (1.47 KB)
|
||||
lfs: processed: f11e77c257047a398492d8d6cb9f6acf3aa7c4384bb23080b43546053e183e4b
|
||||
validated revset for rebase
|
||||
1 changesets found
|
||||
uncompressed size of bundle content:
|
||||
@ -93,7 +91,7 @@
|
||||
$ hgclone_treemanifest ssh://user@dummy/repo-hg-nolfs repo-hg-lfs2 --noupdate --config extensions.remotenames=
|
||||
$ cd repo-hg-lfs2
|
||||
$ setup_hg_client
|
||||
$ setup_hg_lfs "$lfs_uri" 1000B $TESTTMP/lfs-cache2
|
||||
$ setup_hg_modern_lfs "$lfs_uri" 1000B $TESTTMP/lfs-cache2
|
||||
|
||||
$ cat >> .hg/hgrc <<EOF
|
||||
> [extensions]
|
||||
@ -116,8 +114,6 @@
|
||||
|
||||
$ hgmn update -r master_bookmark -v
|
||||
resolving manifests
|
||||
lfs: downloading f11e77c257047a398492d8d6cb9f6acf3aa7c4384bb23080b43546053e183e4b (1.47 KB)
|
||||
lfs: processed: f11e77c257047a398492d8d6cb9f6acf3aa7c4384bb23080b43546053e183e4b
|
||||
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
||||
|
||||
# Check that alias.sha1.hgfilenode -> sha256.file_content is generated
|
||||
|
@ -103,12 +103,7 @@ Create a new client repository, using getpack (with its own cachepath).
|
||||
> [remotefilelog]
|
||||
> fetchpacks = True
|
||||
> getpackversion = 2
|
||||
> write-hgcache-to-indexedlog = True
|
||||
> write-local-to-indexedlog = True
|
||||
> indexedlogdatastore = True
|
||||
> indexedloghistorystore = True
|
||||
> lfs = True
|
||||
> useruststore = True
|
||||
> cachepath=$TESTTMP/cachepath-alt2
|
||||
> EOF
|
||||
|
||||
|
@ -52,7 +52,7 @@ Make client repo
|
||||
$ cd client-push
|
||||
|
||||
$ setup_hg_client
|
||||
$ setup_hg_lfs "$lfs_uri" 10B "$TESTTMP/lfs-cache1"
|
||||
$ setup_hg_modern_lfs "$lfs_uri" 10B "$TESTTMP/lfs-cache1"
|
||||
$ cat >> .hg/hgrc <<EOF
|
||||
> [extensions]
|
||||
> pushrebase =
|
||||
@ -66,11 +66,6 @@ Make client repo
|
||||
$ hgmn push -r . --to master_bookmark -v
|
||||
pushing rev 2b6ce7b50f34 to destination ssh://user@dummy/repo bookmark master_bookmark
|
||||
searching for changes
|
||||
lfs: need to transfer 2 objects (80 bytes)
|
||||
lfs: uploading c12949887b7d8c46e9fcc5d9cd4bd884de33c1d00e24d7ac56ed9200e07f31a1 (40 bytes)
|
||||
lfs: processed: c12949887b7d8c46e9fcc5d9cd4bd884de33c1d00e24d7ac56ed9200e07f31a1
|
||||
lfs: uploading aac24ec70120b177274d359073212777a40780e2874b120a0f210096e55cfa5f (40 bytes)
|
||||
lfs: processed: aac24ec70120b177274d359073212777a40780e2874b120a0f210096e55cfa5f
|
||||
validated revset for rebase
|
||||
1 changesets found
|
||||
uncompressed size of bundle content:
|
||||
|
@ -56,7 +56,7 @@ Make client repo
|
||||
$ hgclone_treemanifest ssh://user@dummy/repo-hg client-push --noupdate --config extensions.remotenames= -q
|
||||
$ cd client-push
|
||||
$ setup_hg_client
|
||||
$ setup_hg_lfs "$lfs_uri" 1000B "$TESTTMP/lfs-cache1"
|
||||
$ setup_hg_modern_lfs "$lfs_uri" 1000B "$TESTTMP/lfs-cache1"
|
||||
|
||||
Push to Mononoke
|
||||
$ cd "$TESTTMP/client-push"
|
||||
@ -158,7 +158,7 @@ Setup another client and update to latest commit from mercurial
|
||||
$ hgclone_treemanifest ssh://user@dummy/repo-hg client-pull --noupdate --config extensions.remotenames= -q
|
||||
$ cd client-pull
|
||||
$ setup_hg_client
|
||||
$ setup_hg_lfs "$lfs_uri" 1000B "$TESTTMP/lfs-cache1"
|
||||
$ setup_hg_modern_lfs "$lfs_uri" 1000B "$TESTTMP/lfs-cache1"
|
||||
|
||||
$ cat >> .hg/hgrc <<EOF
|
||||
> [remotefilelog]
|
||||
@ -167,15 +167,11 @@ Setup another client and update to latest commit from mercurial
|
||||
|
||||
$ hg up 2 -v
|
||||
resolving manifests
|
||||
lfs: downloading c12949887b7d8c46e9fcc5d9cd4bd884de33c1d00e24d7ac56ed9200e07f31a1 (40 bytes)
|
||||
lfs: processed: c12949887b7d8c46e9fcc5d9cd4bd884de33c1d00e24d7ac56ed9200e07f31a1
|
||||
3 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
||||
$ wc -c lfs-largefile
|
||||
40 lfs-largefile
|
||||
$ hg up 3 -v
|
||||
resolving manifests
|
||||
lfs: downloading 3c8bc2369a8a90ce1bd6ceb9883cfada7169dde4abe28d70034edea01c0c9a80 (30 bytes)
|
||||
lfs: processed: 3c8bc2369a8a90ce1bd6ceb9883cfada7169dde4abe28d70034edea01c0c9a80
|
||||
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
||||
$ wc -c lfs-largefile
|
||||
30 lfs-largefile
|
||||
|
@ -50,7 +50,7 @@ Create a new client repository. Enable LFS there.
|
||||
> pushrebase =
|
||||
> remotenames =
|
||||
> EOF
|
||||
$ setup_hg_lfs "$lfs_uri" 1000B "$TESTTMP/lfs-cache1"
|
||||
$ setup_hg_modern_lfs "$lfs_uri" 1000B "$TESTTMP/lfs-cache1"
|
||||
|
||||
|
||||
Update in the client repo
|
||||
@ -65,8 +65,6 @@ Perform LFS push
|
||||
$ hgmn push -r . --to master_bookmark -v
|
||||
pushing rev 99262937f158 to destination ssh://user@dummy/orig bookmark master_bookmark
|
||||
searching for changes
|
||||
lfs: uploading e2fff2ce58d585b4b0572e0a323f9e7e5f98cc641489e12c03c401d05d0e350d (1.95 KB)
|
||||
lfs: processed: e2fff2ce58d585b4b0572e0a323f9e7e5f98cc641489e12c03c401d05d0e350d
|
||||
validated revset for rebase
|
||||
1 changesets found
|
||||
uncompressed size of bundle content:
|
||||
|
@ -32,7 +32,7 @@ Setup client repo
|
||||
|
||||
$ hgclone_treemanifest ssh://user@dummy/repo-hg hg-client
|
||||
$ cd hg-client
|
||||
$ setup_hg_lfs "$lfs_uri" 10B "$TESTTMP/lfs-cache"
|
||||
$ setup_hg_modern_lfs "$lfs_uri" 10B "$TESTTMP/lfs-cache"
|
||||
|
||||
Create new commits
|
||||
|
||||
@ -61,12 +61,6 @@ Create new commits
|
||||
preparing listkeys for "bookmarks"
|
||||
sending listkeys command
|
||||
received listkey for "bookmarks": 57 bytes
|
||||
lfs: computing set of blobs to upload
|
||||
lfs: need to transfer 2 objects (213 bytes)
|
||||
lfs: uploading f9f7889fcedc8580403673810e2be90e35980f10234f80d08a6497bbda16a245 (200 bytes)
|
||||
lfs: processed: f9f7889fcedc8580403673810e2be90e35980f10234f80d08a6497bbda16a245
|
||||
lfs: uploading 177507a4ee8737f0930661b3261e9e50edcec96d5cca59b7a4ef3b260936ce09 (13 bytes)
|
||||
lfs: processed: 177507a4ee8737f0930661b3261e9e50edcec96d5cca59b7a4ef3b260936ce09
|
||||
1 changesets found
|
||||
list of changesets:
|
||||
48d4d2fa17e54179e24de7fcb4a8ced38738ca4e
|
||||
@ -86,7 +80,7 @@ Clone the repository, and pull
|
||||
|
||||
$ hgclone_treemanifest ssh://user@dummy/repo-hg hg-client
|
||||
$ cd hg-client
|
||||
$ setup_hg_lfs "$lfs_uri" 10B "$TESTTMP/lfs-cache"
|
||||
$ setup_hg_modern_lfs "$lfs_uri" 10B "$TESTTMP/lfs-cache"
|
||||
$ hgmn pull
|
||||
pulling from ssh://user@dummy/repo
|
||||
searching for changes
|
||||
|
@ -1,7 +1,6 @@
|
||||
#chg-compatible
|
||||
|
||||
$ disable treemanifest
|
||||
$ setconfig remotenames.selectivepull=1
|
||||
$ setconfig remotenames.selectivepull=1 remotefilelog.lfs=True
|
||||
|
||||
$ . "$TESTDIR/library.sh"
|
||||
|
||||
@ -33,7 +32,6 @@
|
||||
$ cat >> .hg/hgrc <<EOF
|
||||
> [remotefilelog]
|
||||
> fetchpacks=True
|
||||
> backgroundrepack=True
|
||||
> getpackversion=1
|
||||
> [lfs]
|
||||
> url=file:$TESTTMP/dummy-remote/
|
||||
@ -105,8 +103,8 @@
|
||||
|
||||
$ hg debugfilerev -v
|
||||
0d2948821b2b: x-lfs
|
||||
x: bin=0 lnk=0 flag=2000 size=17 copied='' chain=1ff4e6c9b276
|
||||
rawdata: 'version https://git-lfs.github.com/spec/v1\noid sha256:802935f5411aa569948cd326115b3521107250019b5dbadf0f6ab2aa2d1e4639\nsize 17\nx-is-binary 0\n'
|
||||
x: bin=0 lnk=0 flag=0 size=17 copied='' chain=1ff4e6c9b276
|
||||
rawdata: 'THIS-IS-LFS-FILE\n'
|
||||
|
||||
$ hg show
|
||||
commit: 0d2948821b2b
|
||||
@ -123,3 +121,5 @@
|
||||
@@ -0,0 +1,1 @@
|
||||
+THIS-IS-LFS-FILE
|
||||
|
||||
|
||||
# trailing whitespace
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
$ disable treemanifest
|
||||
$ enable remotenames
|
||||
$ setconfig remotenames.selectivepull=1
|
||||
$ setconfig remotenames.selectivepull=1 remotefilelog.lfs=True
|
||||
|
||||
$ . "$TESTDIR/library.sh"
|
||||
|
||||
@ -152,16 +152,17 @@
|
||||
$ hg commit -m shallow.lfs.commit
|
||||
|
||||
$ hg debugdata y f3e0509ec09891552c970794f82de8d6805701c7
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a2fcdb080e9838f6e1476a494c1d553e6ffefb68b0d146a06f34b535b5198442
|
||||
size 35
|
||||
x-hg-copy x
|
||||
x-hg-copyrev d33b2f7888d4f6f9112256d0f1c625af6d188fde
|
||||
x-is-binary 0
|
||||
|
||||
copy: x
|
||||
copyrev: d33b2f7888d4f6f9112256d0f1c625af6d188fde
|
||||
|
||||
NOTLFS
|
||||
BECOME-LFS-AGAIN
|
||||
ADD-A-LINE
|
||||
|
||||
$ hg debugfilerevision -r . y
|
||||
515a4dfd2e0c: shallow.lfs.commit
|
||||
y: bin=0 lnk=0 flag=2000 size=35 copied='x' chain=f3e0509ec098
|
||||
y: bin=0 lnk=0 flag=0 size=35 copied='x' chain=f3e0509ec098
|
||||
|
||||
$ hg log -r . -T '{file_copies}\n'
|
||||
y (x)
|
||||
@ -348,7 +349,7 @@
|
||||
$ cd ../shallow
|
||||
$ hg pull -q
|
||||
5 files fetched over 5 fetches - (5 misses, 0.00% hit ratio) over *s (glob) (?)
|
||||
$ hg log --removed a.bin --config diff.nobinary=1 --git -p -T '{desc}\n' -r '::tip' --config lfs.url=null://
|
||||
$ hg log --removed a.bin --config diff.nobinary=1 --git -p -T '{desc}\n' -r '::tip'
|
||||
binary
|
||||
diff --git a/a.bin b/a.bin
|
||||
new file mode 100644
|
||||
|
@ -1,11 +1,11 @@
|
||||
#chg-compatible
|
||||
|
||||
$ newserver master
|
||||
$ setconfig extensions.lfs= lfs.url=file:$TESTTMP/lfs-server
|
||||
$ setconfig extensions.lfs= lfs.url=file:$TESTTMP/lfs-server remotefilelog.lfs=True
|
||||
|
||||
$ clone master shallow --noupdate
|
||||
$ switchrepo shallow
|
||||
$ setconfig extensions.lfs= lfs.url=file:$TESTTMP/lfs-server lfs.threshold=10B
|
||||
$ setconfig extensions.lfs= lfs.url=file:$TESTTMP/lfs-server lfs.threshold=10B remotefilelog.lfs=True
|
||||
|
||||
$ echo "THIS IS AN LFS BLOB" > x
|
||||
$ hg commit -qAm x
|
||||
|
@ -1,7 +1,7 @@
|
||||
#chg-compatible
|
||||
|
||||
$ enable lfs remotefilelog
|
||||
$ setconfig lfs.url=file://$TESTTMP/cache lfs.threshold=1 remotefilelog.cachepath=$TESTTMP/rflcache
|
||||
$ setconfig lfs.url=file://$TESTTMP/cache lfs.threshold=1 remotefilelog.cachepath=$TESTTMP/rflcache scmstore.enableshim=False
|
||||
|
||||
Write a LFS file to the repo
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user