sapling/eden/hg-server/tests/test-fb-hgext-treemanifest-comparetrees.t
Durham Goode 98d9269874 server: copy hg to a new hg-server directory
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
2021-04-09 10:09:06 -07:00

72 lines
2.1 KiB
Perl

#chg-compatible
$ . "$TESTDIR/library.sh"
$ setconfig treemanifest.flatcompat=False
$ hginit master
$ cd master
$ cat >> .hg/hgrc <<EOF
> [extensions]
> pushrebase=
> treemanifest=
> [remotefilelog]
> server=True
> [treemanifest]
> server=True
> EOF
$ mkcommit root
$ hg debugmakepublic -r 'all()'
Clone it
$ cd ..
$ hgcloneshallow ssh://user@dummy/master client1 -q --config extensions.treemanifest= --config treemanifest.treeonly=True
fetching tree '' 1dd55a482f8027ebff785185b3691491312757d3, found via 1e4be0697311
1 trees fetched over * (glob)
1 files fetched over * (glob) (?)
$ cd client1
$ cat >> .hg/hgrc <<EOF
> [extensions]
> treemanifest=
>
> [treemanifest]
> treeonly=True
> sendtrees=True
> EOF
$ hg debugdrawdag <<EOS
> F # A/dir1/file = A
> / # A/dir2/file = A
> C E # A/dir3/file = A
> |/ # A/dir4/file = A
> B D # B/dir1/file = B
> |/ # B/dir2/file = B
> A # B/dir3/file = B
> # B/dir4/file = B
> # C/dir1/file = C
> # C/dir2/file = C
> # C/dir3/file = C
> # C/dir4/file = C
> # D/dir1/file = D
> # E/dir2/file = E
> # F/dir3/file = F
> EOS
$ hg bundle -f --base 'A+B+C' leaves.hg -r 'D+E+F'
3 changesets found
The bundle should have 6 tree items in it - the root tree, and the directory tree that is modified in each of the 3 commits.
$ hg debugbundle leaves.hg
Stream params: {Compression: BZ}
changegroup -- {nbchanges: 3, version: 02}
e77dab89c4644acd044afb734c17e20046be6ae7
97a6f48cdfe66f86ceca092b0619df4e5a99d6ec
72e9b93c4354749519aa668d05dd8d358ec3b6c5
b2x:treegroup2 -- {cache: False, category: manifests, version: 1}
6 data items, 6 history items
9aa450467c3cff6ce906129a8d87e2414c8a3adb
9ccae32052b23cce0b4771389f588b8d98787a5f
b3ec0b09ac898d08a4b9ebe89ab54f30ef2eca99
b5a05191267df8533dd03dfb0cf897eb862c702e dir1
9dc6720799554340d343db656f2181f9c99590f0 dir2
c355490c72c78063d7e05398f70f4897f407ce07 dir3