1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
#!/bin/sh
#
# Basic test to the mercurial-git extension
set -e
# Setup a git repository with some content
git config --global init.defaultBranch master
# Workaround for CVE-2022-39253 mitigation
git config --global protocol.file.allow always
git init --bare git_server
git clone git_server git_clone 2>&1
cd git_clone
git config user.name Babar
git config user.email babar@jungle.org
echo a >a
git add a
git commit -m a
git push origin master 2>&1
cd ..
# Now try to clone it with mercurial-git
hg --config extensions.hggit= clone git_server hg_clone
# Do some changes and push them to the git server
cd hg_clone
echo b >>a
hg commit -u "Babar <babar@jungle.org>" -m "more content to a"
exec hg --config extensions.hggit= push
|