mirror of
https://github.com/facebook/sapling.git
synced 2024-10-12 01:39:21 +03:00
906035f526
Summary: Super-basic implementation of generating changegroup part in getbundle. All it does is sending changelog entries - so no manifest and no filelog entries. While it's very simple, it may actually be enough for a real production use-case. With treemanifest and remotefilelog we don't need to pull anything except for changelog entries, everything else will be downloaded on demand. Reviewed By: jsgf Differential Revision: D6748070 fbshipit-source-id: 1dcd802a4b3b111f935e713e7696d58f05861b77
48 lines
1.0 KiB
Bash
48 lines
1.0 KiB
Bash
#!/bin/bash
|
|
# Library routines and initial setup for Mononoke-related tests.
|
|
|
|
function mononoke {
|
|
$MONONOKE_SERVER "$@" >> "$TESTTMP/mononoke.out" 2>&1 &
|
|
echo $! >> "$DAEMON_PIDS"
|
|
}
|
|
|
|
# Wait until a Mononoke server is available for this repo.
|
|
function wait_for_mononoke {
|
|
local socket="$1/.hg/mononoke.sock"
|
|
local attempts=50
|
|
until [[ -S $socket || $attempts -le 0 ]]; do
|
|
attempts=$((attempts - 1))
|
|
sleep 0.1
|
|
done
|
|
}
|
|
|
|
function blobimport {
|
|
$MONONOKE_BLOBIMPORT "$@"
|
|
}
|
|
|
|
function edenserver {
|
|
$MONONOKE_EDEN_SERVER "$@" >> "$TESTTMP/edenserver.out" 2>&1 &
|
|
echo $! >> "$DAEMON_PIDS"
|
|
}
|
|
|
|
# Run an hg binary configured with the settings required to talk to Mononoke.
|
|
function hgmn {
|
|
hg --config ui.ssh="$DUMMYSSH" --config ui.remotecmd="$MONONOKE_HGCLI" "$@"
|
|
}
|
|
|
|
hgcloneshallow() {
|
|
local dest
|
|
orig=$1
|
|
shift
|
|
dest=$1
|
|
shift
|
|
hg clone --shallow --config remotefilelog.reponame=master "$orig" "$dest" "$@"
|
|
cat >> "$dest"/.hg/hgrc <<EOF
|
|
[remotefilelog]
|
|
reponame=master
|
|
datapackversion=1
|
|
[phases]
|
|
publish=False
|
|
EOF
|
|
}
|