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
95 lines
3.0 KiB
Raku
95 lines
3.0 KiB
Raku
#chg-compatible
|
|
|
|
$ CACHEDIR=`pwd`/hgcache
|
|
$ setconfig treemanifest.treeonly=False
|
|
|
|
$ hg init master
|
|
$ cd master
|
|
$ echo x > x
|
|
$ hg commit -qAm 'add x'
|
|
$ mkdir subdir
|
|
$ echo z > subdir/z
|
|
$ hg commit -qAm 'add subdir/z'
|
|
$ echo x >> x
|
|
$ hg commit -qAm 'modify x'
|
|
$ cat >> .hg/hgrc <<EOF
|
|
> [extensions]
|
|
> treemanifest=
|
|
>
|
|
> [remotefilelog]
|
|
> name=master
|
|
> cachepath=$CACHEDIR
|
|
>
|
|
> [fastmanifest]
|
|
> usetree=True
|
|
> usecache=False
|
|
>
|
|
> [treemanifest]
|
|
> server=True
|
|
> EOF
|
|
$ hg backfilltree -l 1 --traceback
|
|
$ ls .hg/store/00m*
|
|
.hg/store/00manifest.i
|
|
.hg/store/00manifesttree.i
|
|
$ hg debugindex .hg/store/00manifesttree.i
|
|
rev offset length delta linkrev nodeid p1 p2
|
|
0 0 44 -1 0 bc0c2c938b92 000000000000 000000000000
|
|
$ hg debugindex .hg/store/00manifest.i
|
|
rev offset length delta linkrev nodeid p1 p2
|
|
0 0 44 -1 0 bc0c2c938b92 000000000000 000000000000
|
|
1 44 62 0 1 70f2c6726cec bc0c2c938b92 000000000000
|
|
2 106 55 1 2 68221fc1644f 70f2c6726cec 000000000000
|
|
|
|
$ hg backfilltree -l 1 --traceback
|
|
$ ls .hg/store/00m*
|
|
.hg/store/00manifest.i
|
|
.hg/store/00manifesttree.i
|
|
$ ls .hg/store/meta
|
|
subdir
|
|
$ hg debugindex .hg/store/00manifesttree.i
|
|
rev offset length delta linkrev nodeid p1 p2
|
|
0 0 44 -1 0 bc0c2c938b92 000000000000 000000000000
|
|
1 44 61 0 1 70f2c6726cec bc0c2c938b92 000000000000
|
|
$ hg debugindex .hg/store/00manifest.i
|
|
rev offset length delta linkrev nodeid p1 p2
|
|
0 0 44 -1 0 bc0c2c938b92 000000000000 000000000000
|
|
1 44 62 0 1 70f2c6726cec bc0c2c938b92 000000000000
|
|
2 106 55 1 2 68221fc1644f 70f2c6726cec 000000000000
|
|
|
|
$ hg debugdata .hg/store/00manifesttree.i 0
|
|
x\x001406e74118627694268417491f018a4a883152f0 (esc)
|
|
$ hg debugdata .hg/store/00manifesttree.i 1
|
|
subdir\x00ddb35f099a648a43a997aef53123bce309c794fdt (esc)
|
|
x\x001406e74118627694268417491f018a4a883152f0 (esc)
|
|
|
|
Test backfilling all at once
|
|
$ rm -rf .hg/store/00manifesttree.i .hg/store/meta
|
|
$ hg backfilltree
|
|
$ hg debugindex .hg/store/00manifesttree.i
|
|
rev offset length delta linkrev nodeid p1 p2
|
|
0 0 44 -1 0 bc0c2c938b92 000000000000 000000000000
|
|
1 44 61 0 1 70f2c6726cec bc0c2c938b92 000000000000
|
|
2 105 55 1 2 68221fc1644f 70f2c6726cec 000000000000
|
|
|
|
Test backfilling a commit with a null manifest
|
|
$ cd ../
|
|
$ hg init nullrepo
|
|
$ cd nullrepo
|
|
$ cat >> .hg/hgrc <<EOF
|
|
> [extensions]
|
|
> treemanifest=
|
|
>
|
|
> [remotefilelog]
|
|
> name=master
|
|
> cachepath=$CACHEDIR
|
|
>
|
|
> [fastmanifest]
|
|
> usetree=True
|
|
> usecache=False
|
|
>
|
|
> [treemanifest]
|
|
> server=True
|
|
> EOF
|
|
$ hg commit --config ui.allowemptycommit=True -m "Initial commit"
|
|
$ hg backfilltree
|