mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 00:14:35 +03:00
98d9269874
Summary: Create a fork of the Mercurial code that we can use to build server rpms. The hg servers will continue to exist for a few more months while we move the darkstorm and ediscovery use cases off them. In the mean time, we want to start making breaking changes to the client, so let's create a stable copy of the hg code to produce rpms for the hg servers. The fork is based off c7770c78d, the latest hg release. This copies the files as is, then adds some minor tweaks to get it to build: - Disables some lint checks that appear to be bypassed by path - sed replace eden/scm with eden/hg-server - Removed a dependency on scm/telemetry from the edenfs-client tests since scm/telemetry pulls in the original eden/scm/lib/configparser which conflicts with the hg-server conflict parser. allow-large-files Reviewed By: quark-zju Differential Revision: D27632557 fbshipit-source-id: b2f442f4ec000ea08e4d62de068750832198e1f4
109 lines
3.5 KiB
Perl
109 lines
3.5 KiB
Perl
#chg-compatible
|
|
|
|
$ . "$TESTDIR/library.sh"
|
|
$ setconfig remotefilelog.useruststore=True remotefilelog.write-hgcache-to-indexedlog=True
|
|
$ setconfig remotefilelog.debug=False
|
|
|
|
$ newserver master
|
|
|
|
$ clone master shallow --noupdate
|
|
$ cd shallow
|
|
|
|
$ echo uuuuuuuuuuu > u
|
|
$ hg commit -qAm u
|
|
$ echo vvvvvvvvvvv > v
|
|
$ hg commit -qAm v
|
|
$ echo wwwwwwwwwww > w
|
|
$ hg commit -qAm w
|
|
$ echo xxxxxxxxxxx > x
|
|
$ hg commit -qAm x
|
|
$ echo yyyyyyyyyyy > y
|
|
$ hg commit -qAm y
|
|
$ echo zzzzzzzzzzz > z
|
|
$ hg commit -qAm z
|
|
$ hg push -q -r tip --to master --create
|
|
$ cd ..
|
|
|
|
|
|
Test max-bytes-per-log
|
|
$ clone master shallow2 --noupdate
|
|
$ ls_l $(findfilessorted $CACHEDIR/master/ | grep -v 'manifest' | grep 'datastore.*log')
|
|
* 12 *0* (glob)
|
|
$ cd shallow2
|
|
|
|
$ cp .hg/hgrc .hg/hgrc.bak
|
|
$ setconfig indexedlog.data.max-bytes-per-log=10
|
|
$ hg up -q 'desc(u)'
|
|
$ ls_l $(findfilessorted $CACHEDIR/master/ | grep -v 'manifest' | grep 'datastore.*log')
|
|
* 70 *0* (glob)
|
|
* 12 *1* (glob)
|
|
$ hg up -q 'desc(v)'
|
|
$ ls_l $(findfilessorted $CACHEDIR/master/ | grep -v 'manifest' | grep 'datastore.*log')
|
|
* 70 *0* (glob)
|
|
* 70 *1* (glob)
|
|
* 12 *2* (glob)
|
|
$ hg up -q 'desc(w)'
|
|
$ ls_l $(findfilessorted $CACHEDIR/master/ | grep -v 'manifest' | grep 'datastore.*log')
|
|
* 70 *0* (glob)
|
|
* 70 *1* (glob)
|
|
* 70 *2* (glob)
|
|
* 12 *3* (glob)
|
|
|
|
$ setconfig indexedlog.data.max-bytes-per-log=100
|
|
$ hg up -q null
|
|
$ rm -rf $CACHEDIR/master
|
|
|
|
$ hg up -q 'desc(u)'
|
|
$ ls_l $(findfilessorted $CACHEDIR/master/ | grep -v 'manifest' | grep 'datastore.*log')
|
|
* * *0* (glob)
|
|
$ hg up -q 'desc(v)'
|
|
$ ls_l $(findfilessorted $CACHEDIR/master/ | grep -v 'manifest' | grep 'datastore.*log')
|
|
* 128 *0* (glob)
|
|
* 12 *1* (glob)
|
|
$ hg up -q 'desc(w)'
|
|
$ ls_l $(findfilessorted $CACHEDIR/master/ | grep -v 'manifest' | grep 'datastore.*log')
|
|
* 128 *0* (glob)
|
|
* 70 *1* (glob)
|
|
|
|
Test max-log-count
|
|
$ hg up -q null
|
|
$ rm -rf $CACHEDIR/master
|
|
$ setconfig indexedlog.data.max-bytes-per-log=10 indexedlog.data.max-log-count=3
|
|
$ hg up -q 'desc(u)'
|
|
$ findfilessorted $CACHEDIR/master/ | grep -v 'manifest' | grep 'datastore.*log' | wc -l | sed -e 's/ //g'
|
|
2
|
|
$ hg up -q 'desc(v)'
|
|
$ findfilessorted $CACHEDIR/master/ | grep -v 'manifest' | grep 'datastore.*log' | wc -l | sed -e 's/ //g'
|
|
3
|
|
$ hg up -q 'desc(w)'
|
|
$ findfilessorted $CACHEDIR/master/ | grep -v 'manifest' | grep 'datastore.*log' | wc -l | sed -e 's/ //g'
|
|
3
|
|
$ hg up -q 'desc(x)'
|
|
$ findfilessorted $CACHEDIR/master/ | grep -v 'manifest' | grep 'datastore.*log' | wc -l | sed -e 's/ //g'
|
|
3
|
|
- Verify the log shrinks at the next rotation when the max-log-count is reduced.
|
|
$ setconfig indexedlog.data.max-log-count=2
|
|
$ hg up -q 'desc(y)'
|
|
$ findfilessorted $CACHEDIR/master/ | grep -v 'manifest' | grep 'datastore.*log' | wc -l | sed -e 's/ //g'
|
|
2
|
|
$ hg up -q 'desc(z)'
|
|
$ findfilessorted $CACHEDIR/master/ | grep -v 'manifest' | grep 'datastore.*log' | wc -l | sed -e 's/ //g'
|
|
2
|
|
|
|
Test remotefilelog.cachelimit
|
|
$ cp .hg/hgrc.bak .hg/hgrc
|
|
$ hg up -q null
|
|
$ rm -rf $CACHEDIR/master
|
|
$ setconfig remotefilelog.cachelimit=300B
|
|
$ hg up -q 'desc(u)'
|
|
$ ls_l $(findfilessorted $CACHEDIR/master/ | grep -v 'manifest' | grep 'datastore.*log')
|
|
* 70 *0* (glob)
|
|
$ hg up -q 'desc(v)'
|
|
$ ls_l $(findfilessorted $CACHEDIR/master/ | grep -v 'manifest' | grep 'datastore.*log')
|
|
* 128 *0* (glob)
|
|
* 12 *1* (glob)
|
|
$ hg up -q 'desc(w)'
|
|
$ ls_l $(findfilessorted $CACHEDIR/master/ | grep -v 'manifest' | grep 'datastore.*log')
|
|
* 128 *0* (glob)
|
|
* 70 *1* (glob)
|