remote-helpers: test: cleanup style
[gitweb.git] / contrib / remote-helpers / test-hg-hg-git.sh
index 84403415f87d9126ab090e8264a8053a7fbfe47a..e0dbebf0500c6ebfdc465eb5422adf8c95d7a32e 100755 (executable)
@@ -15,12 +15,12 @@ if ! test_have_prereq PYTHON; then
        test_done
 fi
 
-if ! "$PYTHON_PATH" -c 'import mercurial'; then
+if ! python -c 'import mercurial'; then
        skip_all='skipping remote-hg tests; mercurial not available'
        test_done
 fi
 
-if ! "$PYTHON_PATH" -c 'import hggit'; then
+if ! python -c 'import hggit'; then
        skip_all='skipping remote-hg tests; hg-git not available'
        test_done
 fi
@@ -102,12 +102,14 @@ setup () {
        ) >> "$HOME"/.hgrc &&
        git config --global receive.denycurrentbranch warn
        git config --global remote-hg.hg-git-compat true
+       git config --global remote-hg.track-branches false
 
-       HGEDITOR=/usr/bin/true
+       HGEDITOR=true
+       HGMERGE=true
 
        GIT_AUTHOR_DATE="2007-01-01 00:00:00 +0230"
        GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE"
-       export HGEDITOR GIT_AUTHOR_DATE GIT_COMMITTER_DATE
+       export HGEDITOR HGMERGE GIT_AUTHOR_DATE GIT_COMMITTER_DATE
 }
 
 setup
@@ -197,7 +199,7 @@ test_expect_success 'merge conflict 1' '
        echo C > afile &&
        hg ci -m "A->C" &&
 
-       hg merge -r1 || true &&
+       hg merge -r1 &&
        echo C > afile &&
        hg resolve -m afile &&
        hg ci -m "merge to C"
@@ -455,8 +457,6 @@ test_expect_success 'hg author' '
                git_log gitrepo-$x > git-log-$x
        done &&
 
-       test_cmp git-log-hg git-log-git &&
-
        test_cmp hg-log-hg hg-log-git &&
        test_cmp git-log-hg git-log-git
 '