{"thread":{"id":"32728","subject":"[RFC] test-lint-duplicates: check numbering in contrib/remote-helpers","startedAt":"2013-01-25T22:34:24Z","lastAt":"2013-01-25T22:34:24Z","messageCount":1,"participants":["Torsten Bögershausen"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"207849","messageId":"201301252334.25283.tboegi@web.de","threadId":"32728","inReplyTo":null,"subject":"[RFC] test-lint-duplicates: check numbering in contrib/remote-helpers","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2013-01-25T22:34:24Z","receivedAt":"2013-01-25T22:34:24Z","isPatch":false,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"Running make inside contrib/remote-helpers failes in \"test-lint-duplicates\"\n\nThis was because the regexp to check for duplicate numbers strips everything\nafter the first \"-\" in the filename, including the prefix.\n\nAs a result, 2 pathnames like\n\"xxxx/contrib/remote-helpers/test-bzr.sh\" and\n\"xxxx/contrib/remote-helpers/test-hg-bidi.sh\"\nare both converted into\n\"xxxx/contrib/remote\" and reported as duplicate.\n\nImprove the regexp:\nRemove everything after \"tNNNN-\" (where X stand for a digit)\n\nRename the tests in contrib/remote-helpers into\nt5810-test-bzr.sh,\nt5820-test-hg-bidi.sh,\nt5821-test-hg-hg-git.sh,\nt5830-test-hg.sh\n\nFeed the numbers used in contrib/remote-helpers into t/Makefile\nand check that the numbering is unique across both directories\n\nSigned-off-by: Torsten Bögershausen <tboegi@web.de>\n---\n contrib/remote-helpers/Makefile                |   3 +-\n contrib/remote-helpers/t5810-test-bzr.sh       | 143 +++++++\n contrib/remote-helpers/t5820-test-hg-bidi.sh   | 243 +++++++++++\n contrib/remote-helpers/t5821-test-hg-hg-git.sh | 534 +++++++++++++++++++++++++\n contrib/remote-helpers/t5830-test-hg.sh        | 121 ++++++\n contrib/remote-helpers/test-bzr.sh             | 143 -------\n contrib/remote-helpers/test-hg-bidi.sh         | 243 -----------\n contrib/remote-helpers/test-hg-hg-git.sh       | 534 -------------------------\n contrib/remote-helpers/test-hg.sh              | 121 ------\n t/Makefile                                     |   2 +-\n 10 files changed, 1044 insertions(+), 1043 deletions(-)\n create mode 100755 contrib/remote-helpers/t5810-test-bzr.sh\n create mode 100755 contrib/remote-helpers/t5820-test-hg-bidi.sh\n create mode 100755 contrib/remote-helpers/t5821-test-hg-hg-git.sh\n create mode 100755 contrib/remote-helpers/t5830-test-hg.sh\n delete mode 100755 contrib/remote-helpers/test-bzr.sh\n delete mode 100755 contrib/remote-helpers/test-hg-bidi.sh\n delete mode 100755 contrib/remote-helpers/test-hg-hg-git.sh\n delete mode 100755 contrib/remote-helpers/test-hg.sh\n\ndiff --git a/contrib/remote-helpers/Makefile b/contrib/remote-helpers/Makefile\nindex 9a76575..012ad50 100644\n--- a/contrib/remote-helpers/Makefile\n+++ b/contrib/remote-helpers/Makefile\n@@ -1,6 +1,7 @@\n-TESTS := $(wildcard test*.sh)\n+TESTS := $(sort $(wildcard t[0-9][0-9][0-9][0-9]-*.sh))\n \n export T := $(addprefix $(CURDIR)/,$(TESTS))\n+export TDUP := $(sort $(wildcard ../../t/t[0-9][0-9][0-9][0-9]-*.sh))\n export MAKE := $(MAKE) -e\n export PATH := $(CURDIR):$(PATH)\n \ndiff --git a/contrib/remote-helpers/t5810-test-bzr.sh b/contrib/remote-helpers/t5810-test-bzr.sh\nnew file mode 100755\nindex 0000000..70aa8a0\n--- /dev/null\n+++ b/contrib/remote-helpers/t5810-test-bzr.sh\n@@ -0,0 +1,143 @@\n+#!/bin/sh\n+#\n+# Copyright (c) 2012 Felipe Contreras\n+#\n+\n+test_description='Test remote-bzr'\n+\n+. ./test-lib.sh\n+\n+if ! test_have_prereq PYTHON; then\n+\tskip_all='skipping remote-bzr tests; python not available'\n+\ttest_done\n+fi\n+\n+if ! \"$PYTHON_PATH\" -c 'import bzrlib'; then\n+\tskip_all='skipping remote-bzr tests; bzr not available'\n+\ttest_done\n+fi\n+\n+cmd='\n+import bzrlib\n+bzrlib.initialize()\n+import bzrlib.plugin\n+bzrlib.plugin.load_plugins()\n+import bzrlib.plugins.fastimport\n+'\n+\n+if ! \"$PYTHON_PATH\" -c \"$cmd\"; then\n+\techo \"consider setting BZR_PLUGIN_PATH=$HOME/.bazaar/plugins\" 1>&2\n+\tskip_all='skipping remote-bzr tests; bzr-fastimport not available'\n+\ttest_done\n+fi\n+\n+check () {\n+\t(cd $1 &&\n+\tgit log --format='%s' -1 &&\n+\tgit symbolic-ref HEAD) > actual &&\n+\t(echo $2 &&\n+\techo \"refs/heads/$3\") > expected &&\n+\ttest_cmp expected actual\n+}\n+\n+bzr whoami \"A U Thor <author@example.com>\"\n+\n+test_expect_success 'cloning' '\n+  (bzr init bzrrepo &&\n+  cd bzrrepo &&\n+  echo one > content &&\n+  bzr add content &&\n+  bzr commit -m one\n+  ) &&\n+\n+  git clone \"bzr::$PWD/bzrrepo\" gitrepo &&\n+  check gitrepo one master\n+'\n+\n+test_expect_success 'pulling' '\n+  (cd bzrrepo &&\n+  echo two > content &&\n+  bzr commit -m two\n+  ) &&\n+\n+  (cd gitrepo && git pull) &&\n+\n+  check gitrepo two master\n+'\n+\n+test_expect_success 'pushing' '\n+  (cd gitrepo &&\n+  echo three > content &&\n+  git commit -a -m three &&\n+  git push\n+  ) &&\n+\n+  echo three > expected &&\n+  cat bzrrepo/content > actual &&\n+  test_cmp expected actual\n+'\n+\n+test_expect_success 'roundtrip' '\n+  (cd gitrepo &&\n+  git pull &&\n+  git log --format=\"%s\" -1 origin/master > actual) &&\n+  echo three > expected &&\n+  test_cmp expected actual &&\n+\n+  (cd gitrepo && git push && git pull) &&\n+\n+  (cd bzrrepo &&\n+  echo four > content &&\n+  bzr commit -m four\n+  ) &&\n+\n+  (cd gitrepo && git pull && git push) &&\n+\n+  check gitrepo four master &&\n+\n+  (cd gitrepo &&\n+  echo five > content &&\n+  git commit -a -m five &&\n+  git push && git pull\n+  ) &&\n+\n+  (cd bzrrepo && bzr revert) &&\n+\n+  echo five > expected &&\n+  cat bzrrepo/content > actual &&\n+  test_cmp expected actual\n+'\n+\n+cat > expected <<EOF\n+100644 blob 54f9d6da5c91d556e6b54340b1327573073030af\tcontent\n+100755 blob 68769579c3eaadbe555379b9c3538e6628bae1eb\texecutable\n+120000 blob 6b584e8ece562ebffc15d38808cd6b98fc3d97ea\tlink\n+EOF\n+\n+test_expect_success 'special modes' '\n+  (cd bzrrepo &&\n+  echo exec > executable\n+  chmod +x executable &&\n+  bzr add executable\n+  bzr commit -m exec &&\n+  ln -s content link\n+  bzr add link\n+  bzr commit -m link &&\n+  mkdir dir &&\n+  bzr add dir &&\n+  bzr commit -m dir) &&\n+\n+  (cd gitrepo &&\n+  git pull\n+  git ls-tree HEAD > ../actual) &&\n+\n+  test_cmp expected actual &&\n+\n+  (cd gitrepo &&\n+  git cat-file -p HEAD:link > ../actual) &&\n+\n+  echo -n content > expected &&\n+  test_cmp expected actual\n+'\n+\n+test_done\ndiff --git a/contrib/remote-helpers/t5820-test-hg-bidi.sh b/contrib/remote-helpers/t5820-test-hg-bidi.sh\nnew file mode 100755\nindex 0000000..1d61982\n--- /dev/null\n+++ b/contrib/remote-helpers/t5820-test-hg-bidi.sh\n@@ -0,0 +1,243 @@\n+#!/bin/sh\n+#\n+# Copyright (c) 2012 Felipe Contreras\n+#\n+# Base commands from hg-git tests:\n+# https://bitbucket.org/durin42/hg-git/src\n+#\n+\n+test_description='Test bidirectionality of remote-hg'\n+\n+. ./test-lib.sh\n+\n+if ! test_have_prereq PYTHON; then\n+\tskip_all='skipping remote-hg tests; python not available'\n+\ttest_done\n+fi\n+\n+if ! \"$PYTHON_PATH\" -c 'import mercurial'; then\n+\tskip_all='skipping remote-hg tests; mercurial not available'\n+\ttest_done\n+fi\n+\n+# clone to a git repo\n+git_clone () {\n+\thg -R $1 bookmark -f -r tip master &&\n+\tgit clone -q \"hg::$PWD/$1\" $2\n+}\n+\n+# clone to an hg repo\n+hg_clone () {\n+\t(\n+\thg init $2 &&\n+\tcd $1 &&\n+\tgit push -q \"hg::$PWD/../$2\" 'refs/tags/*:refs/tags/*' 'refs/heads/*:refs/heads/*'\n+\t) &&\n+\n+\t(cd $2 && hg -q update)\n+}\n+\n+# push an hg repo\n+hg_push () {\n+\t(\n+\tcd $2\n+\told=$(git symbolic-ref --short HEAD)\n+\tgit checkout -q -b tmp &&\n+\tgit fetch -q \"hg::$PWD/../$1\" 'refs/tags/*:refs/tags/*' 'refs/heads/*:refs/heads/*' &&\n+\tgit checkout -q $old &&\n+\tgit branch -q -D tmp 2> /dev/null || true\n+\t)\n+}\n+\n+hg_log () {\n+\thg -R $1 log --graph --debug | grep -v 'tag: *default/'\n+}\n+\n+setup () {\n+\t(\n+\techo \"[ui]\"\n+\techo \"username = A U Thor <author@example.com>\"\n+\techo \"[defaults]\"\n+\techo \"backout = -d \\\"0 0\\\"\"\n+\techo \"commit = -d \\\"0 0\\\"\"\n+\techo \"debugrawcommit = -d \\\"0 0\\\"\"\n+\techo \"tag = -d \\\"0 0\\\"\"\n+\t) >> \"$HOME\"/.hgrc &&\n+\tgit config --global remote-hg.hg-git-compat true\n+\n+\texport HGEDITOR=/usr/bin/true\n+\n+\texport GIT_AUTHOR_DATE=\"2007-01-01 00:00:00 +0230\"\n+\texport GIT_COMMITTER_DATE=\"$GIT_AUTHOR_DATE\"\n+}\n+\n+setup\n+\n+test_expect_success 'encoding' '\n+\tmkdir -p tmp && cd tmp &&\n+\ttest_when_finished \"cd .. && rm -rf tmp\" &&\n+\n+\t(\n+\tgit init -q gitrepo &&\n+\tcd gitrepo &&\n+\n+\techo alpha > alpha &&\n+\tgit add alpha &&\n+\tgit commit -m \"add älphà\" &&\n+\n+\texport GIT_AUTHOR_NAME=\"tést èncödîng\" &&\n+\techo beta > beta &&\n+\tgit add beta &&\n+\tgit commit -m \"add beta\" &&\n+\n+\techo gamma > gamma &&\n+\tgit add gamma &&\n+\tgit commit -m \"add gämmâ\" &&\n+\n+\t: TODO git config i18n.commitencoding latin-1 &&\n+\techo delta > delta &&\n+\tgit add delta &&\n+\tgit commit -m \"add déltà\"\n+\t) &&\n+\n+\thg_clone gitrepo hgrepo &&\n+\tgit_clone hgrepo gitrepo2 &&\n+\thg_clone gitrepo2 hgrepo2 &&\n+\n+\tHGENCODING=utf-8 hg_log hgrepo > expected &&\n+\tHGENCODING=utf-8 hg_log hgrepo2 > actual &&\n+\n+\ttest_cmp expected actual\n+'\n+\n+test_expect_success 'file removal' '\n+\tmkdir -p tmp && cd tmp &&\n+\ttest_when_finished \"cd .. && rm -rf tmp\" &&\n+\n+\t(\n+\tgit init -q gitrepo &&\n+\tcd gitrepo &&\n+\techo alpha > alpha &&\n+\tgit add alpha &&\n+\tgit commit -m \"add alpha\" &&\n+\techo beta > beta &&\n+\tgit add beta &&\n+\tgit commit -m \"add beta\"\n+\tmkdir foo &&\n+\techo blah > foo/bar &&\n+\tgit add foo &&\n+\tgit commit -m \"add foo\" &&\n+\tgit rm alpha &&\n+\tgit commit -m \"remove alpha\" &&\n+\tgit rm foo/bar &&\n+\tgit commit -m \"remove foo/bar\"\n+\t) &&\n+\n+\thg_clone gitrepo hgrepo &&\n+\tgit_clone hgrepo gitrepo2 &&\n+\thg_clone gitrepo2 hgrepo2 &&\n+\n+\thg_log hgrepo > expected &&\n+\thg_log hgrepo2 > actual &&\n+\n+\ttest_cmp expected actual\n+'\n+\n+test_expect_success 'git tags' '\n+\tmkdir -p tmp && cd tmp &&\n+\ttest_when_finished \"cd .. && rm -rf tmp\" &&\n+\n+\t(\n+\tgit init -q gitrepo &&\n+\tcd gitrepo &&\n+\tgit config receive.denyCurrentBranch ignore &&\n+\techo alpha > alpha &&\n+\tgit add alpha &&\n+\tgit commit -m \"add alpha\" &&\n+\tgit tag alpha &&\n+\n+\techo beta > beta &&\n+\tgit add beta &&\n+\tgit commit -m \"add beta\" &&\n+\tgit tag -a -m \"added tag beta\" beta\n+\t) &&\n+\n+\thg_clone gitrepo hgrepo &&\n+\tgit_clone hgrepo gitrepo2 &&\n+\thg_clone gitrepo2 hgrepo2 &&\n+\n+\thg_log hgrepo > expected &&\n+\thg_log hgrepo2 > actual &&\n+\n+\ttest_cmp expected actual\n+'\n+\n+test_expect_success 'hg branch' '\n+\tmkdir -p tmp && cd tmp &&\n+\ttest_when_finished \"cd .. && rm -rf tmp\" &&\n+\n+\t(\n+\tgit init -q gitrepo &&\n+\tcd gitrepo &&\n+\n+\techo alpha > alpha &&\n+\tgit add alpha &&\n+\tgit commit -q -m \"add alpha\" &&\n+\tgit checkout -q -b not-master\n+\t) &&\n+\n+\t(\n+\thg_clone gitrepo hgrepo &&\n+\n+\tcd hgrepo &&\n+\thg -q co master &&\n+\thg mv alpha beta &&\n+\thg -q commit -m \"rename alpha to beta\" &&\n+\thg branch gamma | grep -v \"permanent and global\" &&\n+\thg -q commit -m \"started branch gamma\"\n+\t) &&\n+\n+\thg_push hgrepo gitrepo &&\n+\thg_clone gitrepo hgrepo2 &&\n+\n+\t: TODO, avoid \"master\" bookmark &&\n+\t(cd hgrepo2 && hg checkout gamma) &&\n+\n+\thg_log hgrepo > expected &&\n+\thg_log hgrepo2 > actual &&\n+\n+\ttest_cmp expected actual\n+'\n+\n+test_expect_success 'hg tags' '\n+\tmkdir -p tmp && cd tmp &&\n+\ttest_when_finished \"cd .. && rm -rf tmp\" &&\n+\n+\t(\n+\tgit init -q gitrepo &&\n+\tcd gitrepo &&\n+\n+\techo alpha > alpha &&\n+\tgit add alpha &&\n+\tgit commit -m \"add alpha\" &&\n+\tgit checkout -q -b not-master\n+\t) &&\n+\n+\t(\n+\thg_clone gitrepo hgrepo &&\n+\n+\tcd hgrepo &&\n+\thg co master &&\n+\thg tag alpha\n+\t) &&\n+\n+\thg_push hgrepo gitrepo &&\n+\thg_clone gitrepo hgrepo2 &&\n+\n+\thg_log hgrepo > expected &&\n+\thg_log hgrepo2 > actual &&\n+\n+\ttest_cmp expected actual\n+'\n+\n+test_done\ndiff --git a/contrib/remote-helpers/t5821-test-hg-hg-git.sh b/contrib/remote-helpers/t5821-test-hg-hg-git.sh\nnew file mode 100755\nindex 0000000..7e3967f\n--- /dev/null\n+++ b/contrib/remote-helpers/t5821-test-hg-hg-git.sh\n@@ -0,0 +1,534 @@\n+#!/bin/sh\n+#\n+# Copyright (c) 2012 Felipe Contreras\n+#\n+# Base commands from hg-git tests:\n+# https://bitbucket.org/durin42/hg-git/src\n+#\n+\n+test_description='Test remote-hg output compared to hg-git'\n+\n+. ./test-lib.sh\n+\n+if ! test_have_prereq PYTHON; then\n+\tskip_all='skipping remote-hg tests; python not available'\n+\ttest_done\n+fi\n+\n+if ! \"$PYTHON_PATH\" -c 'import mercurial'; then\n+\tskip_all='skipping remote-hg tests; mercurial not available'\n+\ttest_done\n+fi\n+\n+if ! \"$PYTHON_PATH\" -c 'import hggit'; then\n+\tskip_all='skipping remote-hg tests; hg-git not available'\n+\ttest_done\n+fi\n+\n+# clone to a git repo with git\n+git_clone_git () {\n+\thg -R $1 bookmark -f -r tip master &&\n+\tgit clone -q \"hg::$PWD/$1\" $2\n+}\n+\n+# clone to an hg repo with git\n+hg_clone_git () {\n+\t(\n+\thg init $2 &&\n+\tcd $1 &&\n+\tgit push -q \"hg::$PWD/../$2\" 'refs/tags/*:refs/tags/*' 'refs/heads/*:refs/heads/*'\n+\t) &&\n+\n+\t(cd $2 && hg -q update)\n+}\n+\n+# clone to a git repo with hg\n+git_clone_hg () {\n+\t(\n+\tgit init -q $2 &&\n+\tcd $1 &&\n+\thg bookmark -f -r tip master &&\n+\thg -q push -r master ../$2 || true\n+\t)\n+}\n+\n+# clone to an hg repo with hg\n+hg_clone_hg () {\n+\thg -q clone $1 $2\n+}\n+\n+# push an hg repo with git\n+hg_push_git () {\n+\t(\n+\tcd $2\n+\told=$(git symbolic-ref --short HEAD)\n+\tgit checkout -q -b tmp &&\n+\tgit fetch -q \"hg::$PWD/../$1\" 'refs/tags/*:refs/tags/*' 'refs/heads/*:refs/heads/*' &&\n+\tgit checkout -q $old &&\n+\tgit branch -q -D tmp 2> /dev/null || true\n+\t)\n+}\n+\n+# push an hg git repo with hg\n+hg_push_hg () {\n+\t(\n+\tcd $1 &&\n+\thg -q push ../$2 || true\n+\t)\n+}\n+\n+hg_log () {\n+\thg -R $1 log --graph --debug | grep -v 'tag: *default/'\n+}\n+\n+git_log () {\n+\tgit --git-dir=$1/.git fast-export --branches\n+}\n+\n+setup () {\n+\t(\n+\techo \"[ui]\"\n+\techo \"username = A U Thor <author@example.com>\"\n+\techo \"[defaults]\"\n+\techo \"backout = -d \\\"0 0\\\"\"\n+\techo \"commit = -d \\\"0 0\\\"\"\n+\techo \"debugrawcommit = -d \\\"0 0\\\"\"\n+\techo \"tag = -d \\\"0 0\\\"\"\n+\techo \"[extensions]\"\n+\techo \"hgext.bookmarks =\"\n+\techo \"hggit =\"\n+\t) >> \"$HOME\"/.hgrc &&\n+\tgit config --global receive.denycurrentbranch warn\n+\tgit config --global remote-hg.hg-git-compat true\n+\n+\texport HGEDITOR=/usr/bin/true\n+\n+\texport GIT_AUTHOR_DATE=\"2007-01-01 00:00:00 +0230\"\n+\texport GIT_COMMITTER_DATE=\"$GIT_AUTHOR_DATE\"\n+}\n+\n+setup\n+\n+test_expect_success 'executable bit' '\n+\tmkdir -p tmp && cd tmp &&\n+\ttest_when_finished \"cd .. && rm -rf tmp\" &&\n+\n+\t(\n+\tgit init -q gitrepo &&\n+\tcd gitrepo &&\n+\techo alpha > alpha &&\n+\tchmod 0644 alpha &&\n+\tgit add alpha &&\n+\tgit commit -m \"add alpha\" &&\n+\tchmod 0755 alpha &&\n+\tgit add alpha &&\n+\tgit commit -m \"set executable bit\" &&\n+\tchmod 0644 alpha &&\n+\tgit add alpha &&\n+\tgit commit -m \"clear executable bit\"\n+\t) &&\n+\n+\tfor x in hg git; do\n+\t\t(\n+\t\thg_clone_$x gitrepo hgrepo-$x &&\n+\t\tcd hgrepo-$x &&\n+\t\thg_log . &&\n+\t\thg manifest -r 1 -v &&\n+\t\thg manifest -v\n+\t\t) > output-$x &&\n+\n+\t\tgit_clone_$x hgrepo-$x gitrepo2-$x &&\n+\t\tgit_log gitrepo2-$x > log-$x\n+\tdone &&\n+\tcp -r log-* output-* /tmp/foo/ &&\n+\n+\ttest_cmp output-hg output-git &&\n+\ttest_cmp log-hg log-git\n+'\n+\n+test_expect_success 'symlink' '\n+\tmkdir -p tmp && cd tmp &&\n+\ttest_when_finished \"cd .. && rm -rf tmp\" &&\n+\n+\t(\n+\tgit init -q gitrepo &&\n+\tcd gitrepo &&\n+\techo alpha > alpha &&\n+\tgit add alpha &&\n+\tgit commit -m \"add alpha\" &&\n+\tln -s alpha beta &&\n+\tgit add beta &&\n+\tgit commit -m \"add beta\"\n+\t) &&\n+\n+\tfor x in hg git; do\n+\t\t(\n+\t\thg_clone_$x gitrepo hgrepo-$x &&\n+\t\tcd hgrepo-$x &&\n+\t\thg_log . &&\n+\t\thg manifest -v\n+\t\t) > output-$x &&\n+\n+\t\tgit_clone_$x hgrepo-$x gitrepo2-$x &&\n+\t\tgit_log gitrepo2-$x > log-$x\n+\tdone &&\n+\n+\ttest_cmp output-hg output-git &&\n+\ttest_cmp log-hg log-git\n+'\n+\n+test_expect_success 'merge conflict 1' '\n+\tmkdir -p tmp && cd tmp &&\n+\ttest_when_finished \"cd .. && rm -rf tmp\" &&\n+\n+\t(\n+\thg init hgrepo1 &&\n+\tcd hgrepo1 &&\n+\techo A > afile &&\n+\thg add afile &&\n+\thg ci -m \"origin\" &&\n+\n+\techo B > afile &&\n+\thg ci -m \"A->B\" &&\n+\n+\thg up -r0 &&\n+\techo C > afile &&\n+\thg ci -m \"A->C\" &&\n+\n+\thg merge -r1 || true &&\n+\techo C > afile &&\n+\thg resolve -m afile &&\n+\thg ci -m \"merge to C\"\n+\t) &&\n+\n+\tfor x in hg git; do\n+\t\tgit_clone_$x hgrepo1 gitrepo-$x &&\n+\t\thg_clone_$x gitrepo-$x hgrepo2-$x &&\n+\t\thg_log hgrepo2-$x > hg-log-$x &&\n+\t\tgit_log gitrepo-$x > git-log-$x\n+\tdone &&\n+\n+\ttest_cmp hg-log-hg hg-log-git &&\n+\ttest_cmp git-log-hg git-log-git\n+'\n+\n+test_expect_success 'merge conflict 2' '\n+\tmkdir -p tmp && cd tmp &&\n+\ttest_when_finished \"cd .. && rm -rf tmp\" &&\n+\n+\t(\n+\thg init hgrepo1 &&\n+\tcd hgrepo1 &&\n+\techo A > afile &&\n+\thg add afile &&\n+\thg ci -m \"origin\" &&\n+\n+\techo B > afile &&\n+\thg ci -m \"A->B\" &&\n+\n+\thg up -r0 &&\n+\techo C > afile &&\n+\thg ci -m \"A->C\" &&\n+\n+\thg merge -r1 || true &&\n+\techo B > afile &&\n+\thg resolve -m afile &&\n+\thg ci -m \"merge to B\"\n+\t) &&\n+\n+\tfor x in hg git; do\n+\t\tgit_clone_$x hgrepo1 gitrepo-$x &&\n+\t\thg_clone_$x gitrepo-$x hgrepo2-$x &&\n+\t\thg_log hgrepo2-$x > hg-log-$x &&\n+\t\tgit_log gitrepo-$x > git-log-$x\n+\tdone &&\n+\n+\ttest_cmp hg-log-hg hg-log-git &&\n+\ttest_cmp git-log-hg git-log-git\n+'\n+\n+test_expect_success 'converged merge' '\n+\tmkdir -p tmp && cd tmp &&\n+\ttest_when_finished \"cd .. && rm -rf tmp\" &&\n+\n+\t(\n+\thg init hgrepo1 &&\n+\tcd hgrepo1 &&\n+\techo A > afile &&\n+\thg add afile &&\n+\thg ci -m \"origin\" &&\n+\n+\techo B > afile &&\n+\thg ci -m \"A->B\" &&\n+\n+\techo C > afile &&\n+\thg ci -m \"B->C\" &&\n+\n+\thg up -r0 &&\n+\techo C > afile &&\n+\thg ci -m \"A->C\" &&\n+\n+\thg merge -r2 || true &&\n+\thg ci -m \"merge\"\n+\t) &&\n+\n+\tfor x in hg git; do\n+\t\tgit_clone_$x hgrepo1 gitrepo-$x &&\n+\t\thg_clone_$x gitrepo-$x hgrepo2-$x &&\n+\t\thg_log hgrepo2-$x > hg-log-$x &&\n+\t\tgit_log gitrepo-$x > git-log-$x\n+\tdone &&\n+\n+\ttest_cmp hg-log-hg hg-log-git &&\n+\ttest_cmp git-log-hg git-log-git\n+'\n+\n+test_expect_success 'encoding' '\n+\tmkdir -p tmp && cd tmp &&\n+\ttest_when_finished \"cd .. && rm -rf tmp\" &&\n+\n+\t(\n+\tgit init -q gitrepo &&\n+\tcd gitrepo &&\n+\n+\techo alpha > alpha &&\n+\tgit add alpha &&\n+\tgit commit -m \"add älphà\" &&\n+\n+\texport GIT_AUTHOR_NAME=\"tést èncödîng\" &&\n+\techo beta > beta &&\n+\tgit add beta &&\n+\tgit commit -m \"add beta\" &&\n+\n+\techo gamma > gamma &&\n+\tgit add gamma &&\n+\tgit commit -m \"add gämmâ\" &&\n+\n+\t: TODO git config i18n.commitencoding latin-1 &&\n+\techo delta > delta &&\n+\tgit add delta &&\n+\tgit commit -m \"add déltà\"\n+\t) &&\n+\n+\tfor x in hg git; do\n+\t\thg_clone_$x gitrepo hgrepo-$x &&\n+\t\tgit_clone_$x hgrepo-$x gitrepo2-$x &&\n+\n+\t\tHGENCODING=utf-8 hg_log hgrepo-$x > hg-log-$x &&\n+\t\tgit_log gitrepo2-$x > git-log-$x\n+\tdone &&\n+\n+\ttest_cmp hg-log-hg hg-log-git &&\n+\ttest_cmp git-log-hg git-log-git\n+'\n+\n+test_expect_success 'file removal' '\n+\tmkdir -p tmp && cd tmp &&\n+\ttest_when_finished \"cd .. && rm -rf tmp\" &&\n+\n+\t(\n+\tgit init -q gitrepo &&\n+\tcd gitrepo &&\n+\techo alpha > alpha &&\n+\tgit add alpha &&\n+\tgit commit -m \"add alpha\" &&\n+\techo beta > beta &&\n+\tgit add beta &&\n+\tgit commit -m \"add beta\"\n+\tmkdir foo &&\n+\techo blah > foo/bar &&\n+\tgit add foo &&\n+\tgit commit -m \"add foo\" &&\n+\tgit rm alpha &&\n+\tgit commit -m \"remove alpha\" &&\n+\tgit rm foo/bar &&\n+\tgit commit -m \"remove foo/bar\"\n+\t) &&\n+\n+\tfor x in hg git; do\n+\t\t(\n+\t\thg_clone_$x gitrepo hgrepo-$x &&\n+\t\tcd hgrepo-$x &&\n+\t\thg_log . &&\n+\t\thg manifest -r 3 &&\n+\t\thg manifest\n+\t\t) > output-$x &&\n+\n+\t\tgit_clone_$x hgrepo-$x gitrepo2-$x &&\n+\t\tgit_log gitrepo2-$x > log-$x\n+\tdone &&\n+\n+\ttest_cmp output-hg output-git &&\n+\ttest_cmp log-hg log-git\n+'\n+\n+test_expect_success 'git tags' '\n+\tmkdir -p tmp && cd tmp &&\n+\ttest_when_finished \"cd .. && rm -rf tmp\" &&\n+\n+\t(\n+\tgit init -q gitrepo &&\n+\tcd gitrepo &&\n+\tgit config receive.denyCurrentBranch ignore &&\n+\techo alpha > alpha &&\n+\tgit add alpha &&\n+\tgit commit -m \"add alpha\" &&\n+\tgit tag alpha &&\n+\n+\techo beta > beta &&\n+\tgit add beta &&\n+\tgit commit -m \"add beta\" &&\n+\tgit tag -a -m \"added tag beta\" beta\n+\t) &&\n+\n+\tfor x in hg git; do\n+\t\thg_clone_$x gitrepo hgrepo-$x &&\n+\t\thg_log hgrepo-$x > log-$x\n+\tdone &&\n+\n+\ttest_cmp log-hg log-git\n+'\n+\n+test_expect_success 'hg author' '\n+\tmkdir -p tmp && cd tmp &&\n+\ttest_when_finished \"cd .. && rm -rf tmp\" &&\n+\n+\tfor x in hg git; do\n+\t\t(\n+\t\tgit init -q gitrepo-$x &&\n+\t\tcd gitrepo-$x &&\n+\n+\t\techo alpha > alpha &&\n+\t\tgit add alpha &&\n+\t\tgit commit -m \"add alpha\" &&\n+\t\tgit checkout -q -b not-master\n+\t\t) &&\n+\n+\t\t(\n+\t\thg_clone_$x gitrepo-$x hgrepo-$x &&\n+\t\tcd hgrepo-$x &&\n+\n+\t\thg co master &&\n+\t\techo beta > beta &&\n+\t\thg add beta &&\n+\t\thg commit -u \"test\" -m \"add beta\" &&\n+\n+\t\techo gamma >> beta &&\n+\t\thg commit -u \"test <test@example.com> (comment)\" -m \"modify beta\" &&\n+\n+\t\techo gamma > gamma &&\n+\t\thg add gamma &&\n+\t\thg commit -u \"<test@example.com>\" -m \"add gamma\" &&\n+\n+\t\techo delta > delta &&\n+\t\thg add delta &&\n+\t\thg commit -u \"name<test@example.com>\" -m \"add delta\" &&\n+\n+\t\techo epsilon > epsilon &&\n+\t\thg add epsilon &&\n+\t\thg commit -u \"name <test@example.com\" -m \"add epsilon\" &&\n+\n+\t\techo zeta > zeta &&\n+\t\thg add zeta &&\n+\t\thg commit -u \" test \" -m \"add zeta\" &&\n+\n+\t\techo eta > eta &&\n+\t\thg add eta &&\n+\t\thg commit -u \"test < test@example.com >\" -m \"add eta\" &&\n+\n+\t\techo theta > theta &&\n+\t\thg add theta &&\n+\t\thg commit -u \"test >test@example.com>\" -m \"add theta\" &&\n+\n+\t\techo iota > iota &&\n+\t\thg add iota &&\n+\t\thg commit -u \"test <test <at> example <dot> com>\" -m \"add iota\"\n+\t\t) &&\n+\n+\t\thg_push_$x hgrepo-$x gitrepo-$x &&\n+\t\thg_clone_$x gitrepo-$x hgrepo2-$x &&\n+\n+\t\thg_log hgrepo2-$x > hg-log-$x &&\n+\t\tgit_log gitrepo-$x > git-log-$x\n+\tdone &&\n+\n+\ttest_cmp git-log-hg git-log-git &&\n+\n+\ttest_cmp hg-log-hg hg-log-git &&\n+\ttest_cmp git-log-hg git-log-git\n+'\n+\n+test_expect_success 'hg branch' '\n+\tmkdir -p tmp && cd tmp &&\n+\ttest_when_finished \"cd .. && rm -rf tmp\" &&\n+\n+\tfor x in hg git; do\n+\t\t(\n+\t\tgit init -q gitrepo-$x &&\n+\t\tcd gitrepo-$x &&\n+\n+\t\techo alpha > alpha &&\n+\t\tgit add alpha &&\n+\t\tgit commit -q -m \"add alpha\" &&\n+\t\tgit checkout -q -b not-master\n+\t\t) &&\n+\n+\t\t(\n+\t\thg_clone_$x gitrepo-$x hgrepo-$x &&\n+\n+\t\tcd hgrepo-$x &&\n+\t\thg -q co master &&\n+\t\thg mv alpha beta &&\n+\t\thg -q commit -m \"rename alpha to beta\" &&\n+\t\thg branch gamma | grep -v \"permanent and global\" &&\n+\t\thg -q commit -m \"started branch gamma\"\n+\t\t) &&\n+\n+\t\thg_push_$x hgrepo-$x gitrepo-$x &&\n+\t\thg_clone_$x gitrepo-$x hgrepo2-$x &&\n+\n+\t\thg_log hgrepo2-$x > hg-log-$x &&\n+\t\tgit_log gitrepo-$x > git-log-$x\n+\tdone &&\n+\n+\ttest_cmp hg-log-hg hg-log-git &&\n+\ttest_cmp git-log-hg git-log-git\n+'\n+\n+test_expect_success 'hg tags' '\n+\tmkdir -p tmp && cd tmp &&\n+\ttest_when_finished \"cd .. && rm -rf tmp\" &&\n+\n+\tfor x in hg git; do\n+\t\t(\n+\t\tgit init -q gitrepo-$x &&\n+\t\tcd gitrepo-$x &&\n+\n+\t\techo alpha > alpha &&\n+\t\tgit add alpha &&\n+\t\tgit commit -m \"add alpha\" &&\n+\t\tgit checkout -q -b not-master\n+\t\t) &&\n+\n+\t\t(\n+\t\thg_clone_$x gitrepo-$x hgrepo-$x &&\n+\n+\t\tcd hgrepo-$x &&\n+\t\thg co master &&\n+\t\thg tag alpha\n+\t\t) &&\n+\n+\t\thg_push_$x hgrepo-$x gitrepo-$x &&\n+\t\thg_clone_$x gitrepo-$x hgrepo2-$x &&\n+\n+\t\t(\n+\t\tgit --git-dir=gitrepo-$x/.git tag -l &&\n+\t\thg_log hgrepo2-$x &&\n+\t\tcat hgrepo2-$x/.hgtags\n+\t\t) > output-$x\n+\tdone &&\n+\n+\ttest_cmp output-hg output-git\n+'\n+\n+test_done\ndiff --git a/contrib/remote-helpers/t5830-test-hg.sh b/contrib/remote-helpers/t5830-test-hg.sh\nnew file mode 100755\nindex 0000000..5f81dfa\n--- /dev/null\n+++ b/contrib/remote-helpers/t5830-test-hg.sh\n@@ -0,0 +1,121 @@\n+#!/bin/sh\n+#\n+# Copyright (c) 2012 Felipe Contreras\n+#\n+# Base commands from hg-git tests:\n+# https://bitbucket.org/durin42/hg-git/src\n+#\n+\n+test_description='Test remote-hg'\n+\n+. ./test-lib.sh\n+\n+if ! test_have_prereq PYTHON; then\n+\tskip_all='skipping remote-hg tests; python not available'\n+\ttest_done\n+fi\n+\n+if ! \"$PYTHON_PATH\" -c 'import mercurial'; then\n+\tskip_all='skipping remote-hg tests; mercurial not available'\n+\ttest_done\n+fi\n+\n+check () {\n+\t(cd $1 &&\n+\tgit log --format='%s' -1 &&\n+\tgit symbolic-ref HEAD) > actual &&\n+\t(echo $2 &&\n+\techo \"refs/heads/$3\") > expected &&\n+\ttest_cmp expected actual\n+}\n+\n+setup () {\n+\t(\n+\techo \"[ui]\"\n+\techo \"username = H G Wells <wells@example.com>\"\n+\t) >> \"$HOME\"/.hgrc\n+}\n+\n+setup\n+\n+test_expect_success 'cloning' '\n+  test_when_finished \"rm -rf gitrepo*\" &&\n+\n+  (\n+  hg init hgrepo &&\n+  cd hgrepo &&\n+  echo zero > content &&\n+  hg add content &&\n+  hg commit -m zero\n+  ) &&\n+\n+  git clone \"hg::$PWD/hgrepo\" gitrepo &&\n+  check gitrepo zero master\n+'\n+\n+test_expect_success 'cloning with branches' '\n+  test_when_finished \"rm -rf gitrepo*\" &&\n+\n+  (\n+  cd hgrepo &&\n+  hg branch next &&\n+  echo next > content &&\n+  hg commit -m next\n+  ) &&\n+\n+  git clone \"hg::$PWD/hgrepo\" gitrepo &&\n+  check gitrepo next next &&\n+\n+  (cd hgrepo && hg checkout default) &&\n+\n+  git clone \"hg::$PWD/hgrepo\" gitrepo2 &&\n+  check gitrepo2 zero master\n+'\n+\n+test_expect_success 'cloning with bookmarks' '\n+  test_when_finished \"rm -rf gitrepo*\" &&\n+\n+  (\n+  cd hgrepo &&\n+  hg bookmark feature-a &&\n+  echo feature-a > content &&\n+  hg commit -m feature-a\n+  ) &&\n+\n+  git clone \"hg::$PWD/hgrepo\" gitrepo &&\n+  check gitrepo feature-a feature-a\n+'\n+\n+test_expect_success 'cloning with detached head' '\n+  test_when_finished \"rm -rf gitrepo*\" &&\n+\n+  (\n+  cd hgrepo &&\n+  hg update -r 0\n+  ) &&\n+\n+  git clone \"hg::$PWD/hgrepo\" gitrepo &&\n+  check gitrepo zero master\n+'\n+\n+test_expect_success 'update bookmark' '\n+  test_when_finished \"rm -rf gitrepo*\" &&\n+\n+  (\n+  cd hgrepo &&\n+  hg bookmark devel\n+  ) &&\n+\n+  (\n+  git clone \"hg::$PWD/hgrepo\" gitrepo &&\n+  cd gitrepo &&\n+  git checkout devel &&\n+  echo devel > content &&\n+  git commit -a -m devel &&\n+  git push\n+  ) &&\n+\n+  hg -R hgrepo bookmarks | grep \"devel\\s\\+3:\"\n+'\n+\n+test_done\ndiff --git a/contrib/remote-helpers/test-bzr.sh b/contrib/remote-helpers/test-bzr.sh\ndeleted file mode 100755\nindex 70aa8a0..0000000\n--- a/contrib/remote-helpers/test-bzr.sh\n+++ /dev/null\n@@ -1,143 +0,0 @@\n-#!/bin/sh\n-#\n-# Copyright (c) 2012 Felipe Contreras\n-#\n-\n-test_description='Test remote-bzr'\n-\n-. ./test-lib.sh\n-\n-if ! test_have_prereq PYTHON; then\n-\tskip_all='skipping remote-bzr tests; python not available'\n-\ttest_done\n-fi\n-\n-if ! \"$PYTHON_PATH\" -c 'import bzrlib'; then\n-\tskip_all='skipping remote-bzr tests; bzr not available'\n-\ttest_done\n-fi\n-\n-cmd='\n-import bzrlib\n-bzrlib.initialize()\n-import bzrlib.plugin\n-bzrlib.plugin.load_plugins()\n-import bzrlib.plugins.fastimport\n-'\n-\n-if ! \"$PYTHON_PATH\" -c \"$cmd\"; then\n-\techo \"consider setting BZR_PLUGIN_PATH=$HOME/.bazaar/plugins\" 1>&2\n-\tskip_all='skipping remote-bzr tests; bzr-fastimport not available'\n-\ttest_done\n-fi\n-\n-check () {\n-\t(cd $1 &&\n-\tgit log --format='%s' -1 &&\n-\tgit symbolic-ref HEAD) > actual &&\n-\t(echo $2 &&\n-\techo \"refs/heads/$3\") > expected &&\n-\ttest_cmp expected actual\n-}\n-\n-bzr whoami \"A U Thor <author@example.com>\"\n-\n-test_expect_success 'cloning' '\n-  (bzr init bzrrepo &&\n-  cd bzrrepo &&\n-  echo one > content &&\n-  bzr add content &&\n-  bzr commit -m one\n-  ) &&\n-\n-  git clone \"bzr::$PWD/bzrrepo\" gitrepo &&\n-  check gitrepo one master\n-'\n-\n-test_expect_success 'pulling' '\n-  (cd bzrrepo &&\n-  echo two > content &&\n-  bzr commit -m two\n-  ) &&\n-\n-  (cd gitrepo && git pull) &&\n-\n-  check gitrepo two master\n-'\n-\n-test_expect_success 'pushing' '\n-  (cd gitrepo &&\n-  echo three > content &&\n-  git commit -a -m three &&\n-  git push\n-  ) &&\n-\n-  echo three > expected &&\n-  cat bzrrepo/content > actual &&\n-  test_cmp expected actual\n-'\n-\n-test_expect_success 'roundtrip' '\n-  (cd gitrepo &&\n-  git pull &&\n-  git log --format=\"%s\" -1 origin/master > actual) &&\n-  echo three > expected &&\n-  test_cmp expected actual &&\n-\n-  (cd gitrepo && git push && git pull) &&\n-\n-  (cd bzrrepo &&\n-  echo four > content &&\n-  bzr commit -m four\n-  ) &&\n-\n-  (cd gitrepo && git pull && git push) &&\n-\n-  check gitrepo four master &&\n-\n-  (cd gitrepo &&\n-  echo five > content &&\n-  git commit -a -m five &&\n-  git push && git pull\n-  ) &&\n-\n-  (cd bzrrepo && bzr revert) &&\n-\n-  echo five > expected &&\n-  cat bzrrepo/content > actual &&\n-  test_cmp expected actual\n-'\n-\n-cat > expected <<EOF\n-100644 blob 54f9d6da5c91d556e6b54340b1327573073030af\tcontent\n-100755 blob 68769579c3eaadbe555379b9c3538e6628bae1eb\texecutable\n-120000 blob 6b584e8ece562ebffc15d38808cd6b98fc3d97ea\tlink\n-EOF\n-\n-test_expect_success 'special modes' '\n-  (cd bzrrepo &&\n-  echo exec > executable\n-  chmod +x executable &&\n-  bzr add executable\n-  bzr commit -m exec &&\n-  ln -s content link\n-  bzr add link\n-  bzr commit -m link &&\n-  mkdir dir &&\n-  bzr add dir &&\n-  bzr commit -m dir) &&\n-\n-  (cd gitrepo &&\n-  git pull\n-  git ls-tree HEAD > ../actual) &&\n-\n-  test_cmp expected actual &&\n-\n-  (cd gitrepo &&\n-  git cat-file -p HEAD:link > ../actual) &&\n-\n-  echo -n content > expected &&\n-  test_cmp expected actual\n-'\n-\n-test_done\ndiff --git a/contrib/remote-helpers/test-hg-bidi.sh b/contrib/remote-helpers/test-hg-bidi.sh\ndeleted file mode 100755\nindex 1d61982..0000000\n--- a/contrib/remote-helpers/test-hg-bidi.sh\n+++ /dev/null\n@@ -1,243 +0,0 @@\n-#!/bin/sh\n-#\n-# Copyright (c) 2012 Felipe Contreras\n-#\n-# Base commands from hg-git tests:\n-# https://bitbucket.org/durin42/hg-git/src\n-#\n-\n-test_description='Test bidirectionality of remote-hg'\n-\n-. ./test-lib.sh\n-\n-if ! test_have_prereq PYTHON; then\n-\tskip_all='skipping remote-hg tests; python not available'\n-\ttest_done\n-fi\n-\n-if ! \"$PYTHON_PATH\" -c 'import mercurial'; then\n-\tskip_all='skipping remote-hg tests; mercurial not available'\n-\ttest_done\n-fi\n-\n-# clone to a git repo\n-git_clone () {\n-\thg -R $1 bookmark -f -r tip master &&\n-\tgit clone -q \"hg::$PWD/$1\" $2\n-}\n-\n-# clone to an hg repo\n-hg_clone () {\n-\t(\n-\thg init $2 &&\n-\tcd $1 &&\n-\tgit push -q \"hg::$PWD/../$2\" 'refs/tags/*:refs/tags/*' 'refs/heads/*:refs/heads/*'\n-\t) &&\n-\n-\t(cd $2 && hg -q update)\n-}\n-\n-# push an hg repo\n-hg_push () {\n-\t(\n-\tcd $2\n-\told=$(git symbolic-ref --short HEAD)\n-\tgit checkout -q -b tmp &&\n-\tgit fetch -q \"hg::$PWD/../$1\" 'refs/tags/*:refs/tags/*' 'refs/heads/*:refs/heads/*' &&\n-\tgit checkout -q $old &&\n-\tgit branch -q -D tmp 2> /dev/null || true\n-\t)\n-}\n-\n-hg_log () {\n-\thg -R $1 log --graph --debug | grep -v 'tag: *default/'\n-}\n-\n-setup () {\n-\t(\n-\techo \"[ui]\"\n-\techo \"username = A U Thor <author@example.com>\"\n-\techo \"[defaults]\"\n-\techo \"backout = -d \\\"0 0\\\"\"\n-\techo \"commit = -d \\\"0 0\\\"\"\n-\techo \"debugrawcommit = -d \\\"0 0\\\"\"\n-\techo \"tag = -d \\\"0 0\\\"\"\n-\t) >> \"$HOME\"/.hgrc &&\n-\tgit config --global remote-hg.hg-git-compat true\n-\n-\texport HGEDITOR=/usr/bin/true\n-\n-\texport GIT_AUTHOR_DATE=\"2007-01-01 00:00:00 +0230\"\n-\texport GIT_COMMITTER_DATE=\"$GIT_AUTHOR_DATE\"\n-}\n-\n-setup\n-\n-test_expect_success 'encoding' '\n-\tmkdir -p tmp && cd tmp &&\n-\ttest_when_finished \"cd .. && rm -rf tmp\" &&\n-\n-\t(\n-\tgit init -q gitrepo &&\n-\tcd gitrepo &&\n-\n-\techo alpha > alpha &&\n-\tgit add alpha &&\n-\tgit commit -m \"add älphà\" &&\n-\n-\texport GIT_AUTHOR_NAME=\"tést èncödîng\" &&\n-\techo beta > beta &&\n-\tgit add beta &&\n-\tgit commit -m \"add beta\" &&\n-\n-\techo gamma > gamma &&\n-\tgit add gamma &&\n-\tgit commit -m \"add gämmâ\" &&\n-\n-\t: TODO git config i18n.commitencoding latin-1 &&\n-\techo delta > delta &&\n-\tgit add delta &&\n-\tgit commit -m \"add déltà\"\n-\t) &&\n-\n-\thg_clone gitrepo hgrepo &&\n-\tgit_clone hgrepo gitrepo2 &&\n-\thg_clone gitrepo2 hgrepo2 &&\n-\n-\tHGENCODING=utf-8 hg_log hgrepo > expected &&\n-\tHGENCODING=utf-8 hg_log hgrepo2 > actual &&\n-\n-\ttest_cmp expected actual\n-'\n-\n-test_expect_success 'file removal' '\n-\tmkdir -p tmp && cd tmp &&\n-\ttest_when_finished \"cd .. && rm -rf tmp\" &&\n-\n-\t(\n-\tgit init -q gitrepo &&\n-\tcd gitrepo &&\n-\techo alpha > alpha &&\n-\tgit add alpha &&\n-\tgit commit -m \"add alpha\" &&\n-\techo beta > beta &&\n-\tgit add beta &&\n-\tgit commit -m \"add beta\"\n-\tmkdir foo &&\n-\techo blah > foo/bar &&\n-\tgit add foo &&\n-\tgit commit -m \"add foo\" &&\n-\tgit rm alpha &&\n-\tgit commit -m \"remove alpha\" &&\n-\tgit rm foo/bar &&\n-\tgit commit -m \"remove foo/bar\"\n-\t) &&\n-\n-\thg_clone gitrepo hgrepo &&\n-\tgit_clone hgrepo gitrepo2 &&\n-\thg_clone gitrepo2 hgrepo2 &&\n-\n-\thg_log hgrepo > expected &&\n-\thg_log hgrepo2 > actual &&\n-\n-\ttest_cmp expected actual\n-'\n-\n-test_expect_success 'git tags' '\n-\tmkdir -p tmp && cd tmp &&\n-\ttest_when_finished \"cd .. && rm -rf tmp\" &&\n-\n-\t(\n-\tgit init -q gitrepo &&\n-\tcd gitrepo &&\n-\tgit config receive.denyCurrentBranch ignore &&\n-\techo alpha > alpha &&\n-\tgit add alpha &&\n-\tgit commit -m \"add alpha\" &&\n-\tgit tag alpha &&\n-\n-\techo beta > beta &&\n-\tgit add beta &&\n-\tgit commit -m \"add beta\" &&\n-\tgit tag -a -m \"added tag beta\" beta\n-\t) &&\n-\n-\thg_clone gitrepo hgrepo &&\n-\tgit_clone hgrepo gitrepo2 &&\n-\thg_clone gitrepo2 hgrepo2 &&\n-\n-\thg_log hgrepo > expected &&\n-\thg_log hgrepo2 > actual &&\n-\n-\ttest_cmp expected actual\n-'\n-\n-test_expect_success 'hg branch' '\n-\tmkdir -p tmp && cd tmp &&\n-\ttest_when_finished \"cd .. && rm -rf tmp\" &&\n-\n-\t(\n-\tgit init -q gitrepo &&\n-\tcd gitrepo &&\n-\n-\techo alpha > alpha &&\n-\tgit add alpha &&\n-\tgit commit -q -m \"add alpha\" &&\n-\tgit checkout -q -b not-master\n-\t) &&\n-\n-\t(\n-\thg_clone gitrepo hgrepo &&\n-\n-\tcd hgrepo &&\n-\thg -q co master &&\n-\thg mv alpha beta &&\n-\thg -q commit -m \"rename alpha to beta\" &&\n-\thg branch gamma | grep -v \"permanent and global\" &&\n-\thg -q commit -m \"started branch gamma\"\n-\t) &&\n-\n-\thg_push hgrepo gitrepo &&\n-\thg_clone gitrepo hgrepo2 &&\n-\n-\t: TODO, avoid \"master\" bookmark &&\n-\t(cd hgrepo2 && hg checkout gamma) &&\n-\n-\thg_log hgrepo > expected &&\n-\thg_log hgrepo2 > actual &&\n-\n-\ttest_cmp expected actual\n-'\n-\n-test_expect_success 'hg tags' '\n-\tmkdir -p tmp && cd tmp &&\n-\ttest_when_finished \"cd .. && rm -rf tmp\" &&\n-\n-\t(\n-\tgit init -q gitrepo &&\n-\tcd gitrepo &&\n-\n-\techo alpha > alpha &&\n-\tgit add alpha &&\n-\tgit commit -m \"add alpha\" &&\n-\tgit checkout -q -b not-master\n-\t) &&\n-\n-\t(\n-\thg_clone gitrepo hgrepo &&\n-\n-\tcd hgrepo &&\n-\thg co master &&\n-\thg tag alpha\n-\t) &&\n-\n-\thg_push hgrepo gitrepo &&\n-\thg_clone gitrepo hgrepo2 &&\n-\n-\thg_log hgrepo > expected &&\n-\thg_log hgrepo2 > actual &&\n-\n-\ttest_cmp expected actual\n-'\n-\n-test_done\ndiff --git a/contrib/remote-helpers/test-hg-hg-git.sh b/contrib/remote-helpers/test-hg-hg-git.sh\ndeleted file mode 100755\nindex 7e3967f..0000000\n--- a/contrib/remote-helpers/test-hg-hg-git.sh\n+++ /dev/null\n@@ -1,534 +0,0 @@\n-#!/bin/sh\n-#\n-# Copyright (c) 2012 Felipe Contreras\n-#\n-# Base commands from hg-git tests:\n-# https://bitbucket.org/durin42/hg-git/src\n-#\n-\n-test_description='Test remote-hg output compared to hg-git'\n-\n-. ./test-lib.sh\n-\n-if ! test_have_prereq PYTHON; then\n-\tskip_all='skipping remote-hg tests; python not available'\n-\ttest_done\n-fi\n-\n-if ! \"$PYTHON_PATH\" -c 'import mercurial'; then\n-\tskip_all='skipping remote-hg tests; mercurial not available'\n-\ttest_done\n-fi\n-\n-if ! \"$PYTHON_PATH\" -c 'import hggit'; then\n-\tskip_all='skipping remote-hg tests; hg-git not available'\n-\ttest_done\n-fi\n-\n-# clone to a git repo with git\n-git_clone_git () {\n-\thg -R $1 bookmark -f -r tip master &&\n-\tgit clone -q \"hg::$PWD/$1\" $2\n-}\n-\n-# clone to an hg repo with git\n-hg_clone_git () {\n-\t(\n-\thg init $2 &&\n-\tcd $1 &&\n-\tgit push -q \"hg::$PWD/../$2\" 'refs/tags/*:refs/tags/*' 'refs/heads/*:refs/heads/*'\n-\t) &&\n-\n-\t(cd $2 && hg -q update)\n-}\n-\n-# clone to a git repo with hg\n-git_clone_hg () {\n-\t(\n-\tgit init -q $2 &&\n-\tcd $1 &&\n-\thg bookmark -f -r tip master &&\n-\thg -q push -r master ../$2 || true\n-\t)\n-}\n-\n-# clone to an hg repo with hg\n-hg_clone_hg () {\n-\thg -q clone $1 $2\n-}\n-\n-# push an hg repo with git\n-hg_push_git () {\n-\t(\n-\tcd $2\n-\told=$(git symbolic-ref --short HEAD)\n-\tgit checkout -q -b tmp &&\n-\tgit fetch -q \"hg::$PWD/../$1\" 'refs/tags/*:refs/tags/*' 'refs/heads/*:refs/heads/*' &&\n-\tgit checkout -q $old &&\n-\tgit branch -q -D tmp 2> /dev/null || true\n-\t)\n-}\n-\n-# push an hg git repo with hg\n-hg_push_hg () {\n-\t(\n-\tcd $1 &&\n-\thg -q push ../$2 || true\n-\t)\n-}\n-\n-hg_log () {\n-\thg -R $1 log --graph --debug | grep -v 'tag: *default/'\n-}\n-\n-git_log () {\n-\tgit --git-dir=$1/.git fast-export --branches\n-}\n-\n-setup () {\n-\t(\n-\techo \"[ui]\"\n-\techo \"username = A U Thor <author@example.com>\"\n-\techo \"[defaults]\"\n-\techo \"backout = -d \\\"0 0\\\"\"\n-\techo \"commit = -d \\\"0 0\\\"\"\n-\techo \"debugrawcommit = -d \\\"0 0\\\"\"\n-\techo \"tag = -d \\\"0 0\\\"\"\n-\techo \"[extensions]\"\n-\techo \"hgext.bookmarks =\"\n-\techo \"hggit =\"\n-\t) >> \"$HOME\"/.hgrc &&\n-\tgit config --global receive.denycurrentbranch warn\n-\tgit config --global remote-hg.hg-git-compat true\n-\n-\texport HGEDITOR=/usr/bin/true\n-\n-\texport GIT_AUTHOR_DATE=\"2007-01-01 00:00:00 +0230\"\n-\texport GIT_COMMITTER_DATE=\"$GIT_AUTHOR_DATE\"\n-}\n-\n-setup\n-\n-test_expect_success 'executable bit' '\n-\tmkdir -p tmp && cd tmp &&\n-\ttest_when_finished \"cd .. && rm -rf tmp\" &&\n-\n-\t(\n-\tgit init -q gitrepo &&\n-\tcd gitrepo &&\n-\techo alpha > alpha &&\n-\tchmod 0644 alpha &&\n-\tgit add alpha &&\n-\tgit commit -m \"add alpha\" &&\n-\tchmod 0755 alpha &&\n-\tgit add alpha &&\n-\tgit commit -m \"set executable bit\" &&\n-\tchmod 0644 alpha &&\n-\tgit add alpha &&\n-\tgit commit -m \"clear executable bit\"\n-\t) &&\n-\n-\tfor x in hg git; do\n-\t\t(\n-\t\thg_clone_$x gitrepo hgrepo-$x &&\n-\t\tcd hgrepo-$x &&\n-\t\thg_log . &&\n-\t\thg manifest -r 1 -v &&\n-\t\thg manifest -v\n-\t\t) > output-$x &&\n-\n-\t\tgit_clone_$x hgrepo-$x gitrepo2-$x &&\n-\t\tgit_log gitrepo2-$x > log-$x\n-\tdone &&\n-\tcp -r log-* output-* /tmp/foo/ &&\n-\n-\ttest_cmp output-hg output-git &&\n-\ttest_cmp log-hg log-git\n-'\n-\n-test_expect_success 'symlink' '\n-\tmkdir -p tmp && cd tmp &&\n-\ttest_when_finished \"cd .. && rm -rf tmp\" &&\n-\n-\t(\n-\tgit init -q gitrepo &&\n-\tcd gitrepo &&\n-\techo alpha > alpha &&\n-\tgit add alpha &&\n-\tgit commit -m \"add alpha\" &&\n-\tln -s alpha beta &&\n-\tgit add beta &&\n-\tgit commit -m \"add beta\"\n-\t) &&\n-\n-\tfor x in hg git; do\n-\t\t(\n-\t\thg_clone_$x gitrepo hgrepo-$x &&\n-\t\tcd hgrepo-$x &&\n-\t\thg_log . &&\n-\t\thg manifest -v\n-\t\t) > output-$x &&\n-\n-\t\tgit_clone_$x hgrepo-$x gitrepo2-$x &&\n-\t\tgit_log gitrepo2-$x > log-$x\n-\tdone &&\n-\n-\ttest_cmp output-hg output-git &&\n-\ttest_cmp log-hg log-git\n-'\n-\n-test_expect_success 'merge conflict 1' '\n-\tmkdir -p tmp && cd tmp &&\n-\ttest_when_finished \"cd .. && rm -rf tmp\" &&\n-\n-\t(\n-\thg init hgrepo1 &&\n-\tcd hgrepo1 &&\n-\techo A > afile &&\n-\thg add afile &&\n-\thg ci -m \"origin\" &&\n-\n-\techo B > afile &&\n-\thg ci -m \"A->B\" &&\n-\n-\thg up -r0 &&\n-\techo C > afile &&\n-\thg ci -m \"A->C\" &&\n-\n-\thg merge -r1 || true &&\n-\techo C > afile &&\n-\thg resolve -m afile &&\n-\thg ci -m \"merge to C\"\n-\t) &&\n-\n-\tfor x in hg git; do\n-\t\tgit_clone_$x hgrepo1 gitrepo-$x &&\n-\t\thg_clone_$x gitrepo-$x hgrepo2-$x &&\n-\t\thg_log hgrepo2-$x > hg-log-$x &&\n-\t\tgit_log gitrepo-$x > git-log-$x\n-\tdone &&\n-\n-\ttest_cmp hg-log-hg hg-log-git &&\n-\ttest_cmp git-log-hg git-log-git\n-'\n-\n-test_expect_success 'merge conflict 2' '\n-\tmkdir -p tmp && cd tmp &&\n-\ttest_when_finished \"cd .. && rm -rf tmp\" &&\n-\n-\t(\n-\thg init hgrepo1 &&\n-\tcd hgrepo1 &&\n-\techo A > afile &&\n-\thg add afile &&\n-\thg ci -m \"origin\" &&\n-\n-\techo B > afile &&\n-\thg ci -m \"A->B\" &&\n-\n-\thg up -r0 &&\n-\techo C > afile &&\n-\thg ci -m \"A->C\" &&\n-\n-\thg merge -r1 || true &&\n-\techo B > afile &&\n-\thg resolve -m afile &&\n-\thg ci -m \"merge to B\"\n-\t) &&\n-\n-\tfor x in hg git; do\n-\t\tgit_clone_$x hgrepo1 gitrepo-$x &&\n-\t\thg_clone_$x gitrepo-$x hgrepo2-$x &&\n-\t\thg_log hgrepo2-$x > hg-log-$x &&\n-\t\tgit_log gitrepo-$x > git-log-$x\n-\tdone &&\n-\n-\ttest_cmp hg-log-hg hg-log-git &&\n-\ttest_cmp git-log-hg git-log-git\n-'\n-\n-test_expect_success 'converged merge' '\n-\tmkdir -p tmp && cd tmp &&\n-\ttest_when_finished \"cd .. && rm -rf tmp\" &&\n-\n-\t(\n-\thg init hgrepo1 &&\n-\tcd hgrepo1 &&\n-\techo A > afile &&\n-\thg add afile &&\n-\thg ci -m \"origin\" &&\n-\n-\techo B > afile &&\n-\thg ci -m \"A->B\" &&\n-\n-\techo C > afile &&\n-\thg ci -m \"B->C\" &&\n-\n-\thg up -r0 &&\n-\techo C > afile &&\n-\thg ci -m \"A->C\" &&\n-\n-\thg merge -r2 || true &&\n-\thg ci -m \"merge\"\n-\t) &&\n-\n-\tfor x in hg git; do\n-\t\tgit_clone_$x hgrepo1 gitrepo-$x &&\n-\t\thg_clone_$x gitrepo-$x hgrepo2-$x &&\n-\t\thg_log hgrepo2-$x > hg-log-$x &&\n-\t\tgit_log gitrepo-$x > git-log-$x\n-\tdone &&\n-\n-\ttest_cmp hg-log-hg hg-log-git &&\n-\ttest_cmp git-log-hg git-log-git\n-'\n-\n-test_expect_success 'encoding' '\n-\tmkdir -p tmp && cd tmp &&\n-\ttest_when_finished \"cd .. && rm -rf tmp\" &&\n-\n-\t(\n-\tgit init -q gitrepo &&\n-\tcd gitrepo &&\n-\n-\techo alpha > alpha &&\n-\tgit add alpha &&\n-\tgit commit -m \"add älphà\" &&\n-\n-\texport GIT_AUTHOR_NAME=\"tést èncödîng\" &&\n-\techo beta > beta &&\n-\tgit add beta &&\n-\tgit commit -m \"add beta\" &&\n-\n-\techo gamma > gamma &&\n-\tgit add gamma &&\n-\tgit commit -m \"add gämmâ\" &&\n-\n-\t: TODO git config i18n.commitencoding latin-1 &&\n-\techo delta > delta &&\n-\tgit add delta &&\n-\tgit commit -m \"add déltà\"\n-\t) &&\n-\n-\tfor x in hg git; do\n-\t\thg_clone_$x gitrepo hgrepo-$x &&\n-\t\tgit_clone_$x hgrepo-$x gitrepo2-$x &&\n-\n-\t\tHGENCODING=utf-8 hg_log hgrepo-$x > hg-log-$x &&\n-\t\tgit_log gitrepo2-$x > git-log-$x\n-\tdone &&\n-\n-\ttest_cmp hg-log-hg hg-log-git &&\n-\ttest_cmp git-log-hg git-log-git\n-'\n-\n-test_expect_success 'file removal' '\n-\tmkdir -p tmp && cd tmp &&\n-\ttest_when_finished \"cd .. && rm -rf tmp\" &&\n-\n-\t(\n-\tgit init -q gitrepo &&\n-\tcd gitrepo &&\n-\techo alpha > alpha &&\n-\tgit add alpha &&\n-\tgit commit -m \"add alpha\" &&\n-\techo beta > beta &&\n-\tgit add beta &&\n-\tgit commit -m \"add beta\"\n-\tmkdir foo &&\n-\techo blah > foo/bar &&\n-\tgit add foo &&\n-\tgit commit -m \"add foo\" &&\n-\tgit rm alpha &&\n-\tgit commit -m \"remove alpha\" &&\n-\tgit rm foo/bar &&\n-\tgit commit -m \"remove foo/bar\"\n-\t) &&\n-\n-\tfor x in hg git; do\n-\t\t(\n-\t\thg_clone_$x gitrepo hgrepo-$x &&\n-\t\tcd hgrepo-$x &&\n-\t\thg_log . &&\n-\t\thg manifest -r 3 &&\n-\t\thg manifest\n-\t\t) > output-$x &&\n-\n-\t\tgit_clone_$x hgrepo-$x gitrepo2-$x &&\n-\t\tgit_log gitrepo2-$x > log-$x\n-\tdone &&\n-\n-\ttest_cmp output-hg output-git &&\n-\ttest_cmp log-hg log-git\n-'\n-\n-test_expect_success 'git tags' '\n-\tmkdir -p tmp && cd tmp &&\n-\ttest_when_finished \"cd .. && rm -rf tmp\" &&\n-\n-\t(\n-\tgit init -q gitrepo &&\n-\tcd gitrepo &&\n-\tgit config receive.denyCurrentBranch ignore &&\n-\techo alpha > alpha &&\n-\tgit add alpha &&\n-\tgit commit -m \"add alpha\" &&\n-\tgit tag alpha &&\n-\n-\techo beta > beta &&\n-\tgit add beta &&\n-\tgit commit -m \"add beta\" &&\n-\tgit tag -a -m \"added tag beta\" beta\n-\t) &&\n-\n-\tfor x in hg git; do\n-\t\thg_clone_$x gitrepo hgrepo-$x &&\n-\t\thg_log hgrepo-$x > log-$x\n-\tdone &&\n-\n-\ttest_cmp log-hg log-git\n-'\n-\n-test_expect_success 'hg author' '\n-\tmkdir -p tmp && cd tmp &&\n-\ttest_when_finished \"cd .. && rm -rf tmp\" &&\n-\n-\tfor x in hg git; do\n-\t\t(\n-\t\tgit init -q gitrepo-$x &&\n-\t\tcd gitrepo-$x &&\n-\n-\t\techo alpha > alpha &&\n-\t\tgit add alpha &&\n-\t\tgit commit -m \"add alpha\" &&\n-\t\tgit checkout -q -b not-master\n-\t\t) &&\n-\n-\t\t(\n-\t\thg_clone_$x gitrepo-$x hgrepo-$x &&\n-\t\tcd hgrepo-$x &&\n-\n-\t\thg co master &&\n-\t\techo beta > beta &&\n-\t\thg add beta &&\n-\t\thg commit -u \"test\" -m \"add beta\" &&\n-\n-\t\techo gamma >> beta &&\n-\t\thg commit -u \"test <test@example.com> (comment)\" -m \"modify beta\" &&\n-\n-\t\techo gamma > gamma &&\n-\t\thg add gamma &&\n-\t\thg commit -u \"<test@example.com>\" -m \"add gamma\" &&\n-\n-\t\techo delta > delta &&\n-\t\thg add delta &&\n-\t\thg commit -u \"name<test@example.com>\" -m \"add delta\" &&\n-\n-\t\techo epsilon > epsilon &&\n-\t\thg add epsilon &&\n-\t\thg commit -u \"name <test@example.com\" -m \"add epsilon\" &&\n-\n-\t\techo zeta > zeta &&\n-\t\thg add zeta &&\n-\t\thg commit -u \" test \" -m \"add zeta\" &&\n-\n-\t\techo eta > eta &&\n-\t\thg add eta &&\n-\t\thg commit -u \"test < test@example.com >\" -m \"add eta\" &&\n-\n-\t\techo theta > theta &&\n-\t\thg add theta &&\n-\t\thg commit -u \"test >test@example.com>\" -m \"add theta\" &&\n-\n-\t\techo iota > iota &&\n-\t\thg add iota &&\n-\t\thg commit -u \"test <test <at> example <dot> com>\" -m \"add iota\"\n-\t\t) &&\n-\n-\t\thg_push_$x hgrepo-$x gitrepo-$x &&\n-\t\thg_clone_$x gitrepo-$x hgrepo2-$x &&\n-\n-\t\thg_log hgrepo2-$x > hg-log-$x &&\n-\t\tgit_log gitrepo-$x > git-log-$x\n-\tdone &&\n-\n-\ttest_cmp git-log-hg git-log-git &&\n-\n-\ttest_cmp hg-log-hg hg-log-git &&\n-\ttest_cmp git-log-hg git-log-git\n-'\n-\n-test_expect_success 'hg branch' '\n-\tmkdir -p tmp && cd tmp &&\n-\ttest_when_finished \"cd .. && rm -rf tmp\" &&\n-\n-\tfor x in hg git; do\n-\t\t(\n-\t\tgit init -q gitrepo-$x &&\n-\t\tcd gitrepo-$x &&\n-\n-\t\techo alpha > alpha &&\n-\t\tgit add alpha &&\n-\t\tgit commit -q -m \"add alpha\" &&\n-\t\tgit checkout -q -b not-master\n-\t\t) &&\n-\n-\t\t(\n-\t\thg_clone_$x gitrepo-$x hgrepo-$x &&\n-\n-\t\tcd hgrepo-$x &&\n-\t\thg -q co master &&\n-\t\thg mv alpha beta &&\n-\t\thg -q commit -m \"rename alpha to beta\" &&\n-\t\thg branch gamma | grep -v \"permanent and global\" &&\n-\t\thg -q commit -m \"started branch gamma\"\n-\t\t) &&\n-\n-\t\thg_push_$x hgrepo-$x gitrepo-$x &&\n-\t\thg_clone_$x gitrepo-$x hgrepo2-$x &&\n-\n-\t\thg_log hgrepo2-$x > hg-log-$x &&\n-\t\tgit_log gitrepo-$x > git-log-$x\n-\tdone &&\n-\n-\ttest_cmp hg-log-hg hg-log-git &&\n-\ttest_cmp git-log-hg git-log-git\n-'\n-\n-test_expect_success 'hg tags' '\n-\tmkdir -p tmp && cd tmp &&\n-\ttest_when_finished \"cd .. && rm -rf tmp\" &&\n-\n-\tfor x in hg git; do\n-\t\t(\n-\t\tgit init -q gitrepo-$x &&\n-\t\tcd gitrepo-$x &&\n-\n-\t\techo alpha > alpha &&\n-\t\tgit add alpha &&\n-\t\tgit commit -m \"add alpha\" &&\n-\t\tgit checkout -q -b not-master\n-\t\t) &&\n-\n-\t\t(\n-\t\thg_clone_$x gitrepo-$x hgrepo-$x &&\n-\n-\t\tcd hgrepo-$x &&\n-\t\thg co master &&\n-\t\thg tag alpha\n-\t\t) &&\n-\n-\t\thg_push_$x hgrepo-$x gitrepo-$x &&\n-\t\thg_clone_$x gitrepo-$x hgrepo2-$x &&\n-\n-\t\t(\n-\t\tgit --git-dir=gitrepo-$x/.git tag -l &&\n-\t\thg_log hgrepo2-$x &&\n-\t\tcat hgrepo2-$x/.hgtags\n-\t\t) > output-$x\n-\tdone &&\n-\n-\ttest_cmp output-hg output-git\n-'\n-\n-test_done\ndiff --git a/contrib/remote-helpers/test-hg.sh b/contrib/remote-helpers/test-hg.sh\ndeleted file mode 100755\nindex 5f81dfa..0000000\n--- a/contrib/remote-helpers/test-hg.sh\n+++ /dev/null\n@@ -1,121 +0,0 @@\n-#!/bin/sh\n-#\n-# Copyright (c) 2012 Felipe Contreras\n-#\n-# Base commands from hg-git tests:\n-# https://bitbucket.org/durin42/hg-git/src\n-#\n-\n-test_description='Test remote-hg'\n-\n-. ./test-lib.sh\n-\n-if ! test_have_prereq PYTHON; then\n-\tskip_all='skipping remote-hg tests; python not available'\n-\ttest_done\n-fi\n-\n-if ! \"$PYTHON_PATH\" -c 'import mercurial'; then\n-\tskip_all='skipping remote-hg tests; mercurial not available'\n-\ttest_done\n-fi\n-\n-check () {\n-\t(cd $1 &&\n-\tgit log --format='%s' -1 &&\n-\tgit symbolic-ref HEAD) > actual &&\n-\t(echo $2 &&\n-\techo \"refs/heads/$3\") > expected &&\n-\ttest_cmp expected actual\n-}\n-\n-setup () {\n-\t(\n-\techo \"[ui]\"\n-\techo \"username = H G Wells <wells@example.com>\"\n-\t) >> \"$HOME\"/.hgrc\n-}\n-\n-setup\n-\n-test_expect_success 'cloning' '\n-  test_when_finished \"rm -rf gitrepo*\" &&\n-\n-  (\n-  hg init hgrepo &&\n-  cd hgrepo &&\n-  echo zero > content &&\n-  hg add content &&\n-  hg commit -m zero\n-  ) &&\n-\n-  git clone \"hg::$PWD/hgrepo\" gitrepo &&\n-  check gitrepo zero master\n-'\n-\n-test_expect_success 'cloning with branches' '\n-  test_when_finished \"rm -rf gitrepo*\" &&\n-\n-  (\n-  cd hgrepo &&\n-  hg branch next &&\n-  echo next > content &&\n-  hg commit -m next\n-  ) &&\n-\n-  git clone \"hg::$PWD/hgrepo\" gitrepo &&\n-  check gitrepo next next &&\n-\n-  (cd hgrepo && hg checkout default) &&\n-\n-  git clone \"hg::$PWD/hgrepo\" gitrepo2 &&\n-  check gitrepo2 zero master\n-'\n-\n-test_expect_success 'cloning with bookmarks' '\n-  test_when_finished \"rm -rf gitrepo*\" &&\n-\n-  (\n-  cd hgrepo &&\n-  hg bookmark feature-a &&\n-  echo feature-a > content &&\n-  hg commit -m feature-a\n-  ) &&\n-\n-  git clone \"hg::$PWD/hgrepo\" gitrepo &&\n-  check gitrepo feature-a feature-a\n-'\n-\n-test_expect_success 'cloning with detached head' '\n-  test_when_finished \"rm -rf gitrepo*\" &&\n-\n-  (\n-  cd hgrepo &&\n-  hg update -r 0\n-  ) &&\n-\n-  git clone \"hg::$PWD/hgrepo\" gitrepo &&\n-  check gitrepo zero master\n-'\n-\n-test_expect_success 'update bookmark' '\n-  test_when_finished \"rm -rf gitrepo*\" &&\n-\n-  (\n-  cd hgrepo &&\n-  hg bookmark devel\n-  ) &&\n-\n-  (\n-  git clone \"hg::$PWD/hgrepo\" gitrepo &&\n-  cd gitrepo &&\n-  git checkout devel &&\n-  echo devel > content &&\n-  git commit -a -m devel &&\n-  git push\n-  ) &&\n-\n-  hg -R hgrepo bookmarks | grep \"devel\\s\\+3:\"\n-'\n-\n-test_done\ndiff --git a/t/Makefile b/t/Makefile\nindex 1923cc1..612fe79 100644\n--- a/t/Makefile\n+++ b/t/Makefile\n@@ -48,7 +48,7 @@ clean: clean-except-prove-cache\n test-lint: test-lint-duplicates test-lint-executable test-lint-shell-syntax\n \n test-lint-duplicates:\n-\t@dups=`echo $(T) | tr ' ' '\\n' | sed 's/-.*//' | sort | uniq -d` && \\\n+\t@dups=`echo $(T) $(TDUP) | tr ' ' '\\n' | sed -ne 's|\\(.*/\\)*t\\([0-9][0-9][0-9][0-9]\\)-.*|\\2|p' | sort | uniq -d` && \\\n \t\ttest -z \"$$dups\" || { \\\n \t\techo >&2 \"duplicate test numbers:\" $$dups; exit 1; }\n \n-- \n1.8.1.1\n"}]}