summaryrefslogtreecommitdiff
path: root/contrib/remote-helpers/test-hg-hg-git.sh
diff options
context:
space:
mode:
authorAntoine Pelisse <apelisse@gmail.com>2013-04-11 12:23:17 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-04-11 17:46:48 (GMT)
commit9a57988b3fac79e0458515a555392d00b759cf4c (patch)
tree6e29171a70c74a2f9556f94b7a0150fe2c6a1db6 /contrib/remote-helpers/test-hg-hg-git.sh
parent20c4b59c352529bda3f5d44baba5e393badc2ee8 (diff)
downloadgit-9a57988b3fac79e0458515a555392d00b759cf4c.zip
git-9a57988b3fac79e0458515a555392d00b759cf4c.tar.gz
git-9a57988b3fac79e0458515a555392d00b759cf4c.tar.bz2
remote-hg: activate graphlog extension for hg_log()
The hg_log() test helper uses the "--graph" parameter that is implemented by the GraphLog extension. If the extension is not activated by the user, the parameter is not available. Activate the extension in setup(). Also changes the way we grep the output in hg_log(). The pipe operator can hide the return code of hg command. As a matter of fact, if log fails because it doesn't know about "--graph", it doesn't report any failure and let's you think everything worked. Signed-off-by: Antoine Pelisse <apelisse@gmail.com> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/remote-helpers/test-hg-hg-git.sh')
-rwxr-xr-xcontrib/remote-helpers/test-hg-hg-git.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/contrib/remote-helpers/test-hg-hg-git.sh b/contrib/remote-helpers/test-hg-hg-git.sh
index 8c59d8e..5daad6b 100755
--- a/contrib/remote-helpers/test-hg-hg-git.sh
+++ b/contrib/remote-helpers/test-hg-hg-git.sh
@@ -78,7 +78,8 @@ hg_push_hg () {
}
hg_log () {
- hg -R $1 log --graph --debug | grep -v 'tag: *default/'
+ hg -R $1 log --graph --debug >log &&
+ grep -v 'tag: *default/' log
}
git_log () {
@@ -97,6 +98,7 @@ setup () {
echo "[extensions]"
echo "hgext.bookmarks ="
echo "hggit ="
+ echo "graphlog ="
) >> "$HOME"/.hgrc &&
git config --global receive.denycurrentbranch warn
git config --global remote-hg.hg-git-compat true