sapling/eden/scm/tests/test-lfs-checksum.t
Michael Bolin ba00990cdc rename update to goto in hints/messages/etc.
Summary:
Created this diff by running:

```
find eden/scm/edenscm -name \*.py | xargs sed -i -e 's#update --clean#goto --clean#g'
find eden/scm/tests -name \*.t | xargs sed -i -e 's#update --clean#goto --clean#g'
find eden/scm/tests -name \*.t | xargs sed -i -e 's#update --continue#goto --continue#g'
find eden/scm/edenscm -name \*.py | xargs sed -i -e 's#update --continue#goto --continue#g'
find eden/scm/edenscm -name \*.py | xargs sed -i -e 's#prog@ update#prog@ goto#g'
find eden/scm/tests -name \*.t | xargs sed -i -e 's# hg update # hg goto #g'
find eden/scm/tests -name \*.t | xargs sed -i -e 's#hg update -C#hg goto -C#g'
find eden/scm/tests -name \*.t | xargs sed -i -e 's# hg update$# hg goto#g'
find eden/scm/tests -name \*.t | xargs sed -i -e 's# update HASH# goto HASH#g'
find eden/scm/tests -name \*.t | xargs sed -i -e 's#hg update 1#hg goto 1#g'
find eden/scm/tests -name \*.t | xargs sed -i -e "s#'hg update'#'hg goto'#g"
find eden/scm/edenscm -name \*.py | xargs sed -i -e 's#:prog:`update`#:prog:`goto`#g'
find eden/scm/edenscm -name \*.py | xargs sed -i -e 's#:prog:`update .::`#:prog:`goto .::`#g'
sed -i -e 's#commit or update#commit or goto#' eden/integration/hg/update_test.py
arc f
```

Though then I had to manually update `eden/integration/hg/update_test.py`
to use `assertRegex()` instead of `assertEqual()`, but as noted,
that is a temporary issue due to how we run that
test for EdenFS for Windows internally.

Fixes https://github.com/facebook/sapling/issues/149
Fixes https://github.com/facebook/sapling/issues/293

Reviewed By: zzl0, yancouto

Differential Revision: D41859668

fbshipit-source-id: 3bdf4e342fc1a751335960a3216651a5ce35225f
2022-12-09 13:16:27 -08:00

40 lines
1023 B
Perl

#chg-compatible
$ setconfig experimental.allowfilepeer=True
$ enable lfs remotefilelog
$ setconfig lfs.url=file://$TESTTMP/cache lfs.threshold=1 remotefilelog.cachepath=$TESTTMP/rflcache scmstore.enableshim=False
Write a LFS file to the repo
$ newrepo source
$ drawdag << 'EOS'
> A # A/A=LFS
> EOS
Upload it to the dummy remote store
$ hg debuglfsupload -r tip
Download it from another repo
$ newrepo
$ hg pull ../source -q
$ hg goto tip -q
Corrupt the remote store
$ echo corrupted > $TESTTMP/cache/2f/7548e627a92d9ce3f912eb71226f692ec83deed2e72298270b198540d7c70b
Download it again in a fresh new repo - should fail
(using remotefilelog to bypass integrity check at revlog level)
$ newrepo
$ echo remotefilelog >> .hg/requires
$ hg pull ../source -q
$ hg goto tip -q
abort: blobstore: sha256 mismatch (oid: 2f7548e627a92d9ce3f912eb71226f692ec83deed2e72298270b198540d7c70b, content: 3dff7d61038895144c0eca9d06ac8d067919785a5ba2604db7aef154899a494d)
[255]
$ [ -f A ]
[1]