From: Junio C Hamano Date: Mon, 22 Apr 2013 01:39:58 +0000 (-0700) Subject: Merge branch 'fc/remote-hg' X-Git-Tag: v1.8.3-rc0~38 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/37d32de72a495b8f8ea985fc97ad7ee8d1d82b06 Merge branch 'fc/remote-hg' Updates remote-hg helper (in contrib/). * fc/remote-hg: (21 commits) remote-hg: activate graphlog extension for hg_log() remote-hg: fix bad file paths remote-hg: document location of stored hg repository remote-hg: fix bad state issue remote-hg: add 'insecure' option remote-hg: add simple mail test remote-hg: add basic author tests remote-hg: show more proper errors remote-hg: force remote push remote-hg: push to the appropriate branch remote-hg: update tags globally remote-hg: update remote bookmarks remote-hg: refactor export remote-hg: split bookmark handling remote-hg: redirect buggy mercurial output remote-hg: trivial test cleanups remote-hg: make sure fake bookmarks are updated remote-hg: fix for files with spaces remote-hg: properly report errors on bookmark pushes remote-hg: add missing config variable in doc ... --- 37d32de72a495b8f8ea985fc97ad7ee8d1d82b06 diff --cc contrib/remote-helpers/test-hg.sh index 7bb81f2f8e,6a1e4b1ad6..d5b873051f --- a/contrib/remote-helpers/test-hg.sh +++ b/contrib/remote-helpers/test-hg.sh @@@ -115,7 -115,43 +115,43 @@@ test_expect_success 'update bookmark' git push ) && - hg -R hgrepo bookmarks | grep "devel\s\+3:" + hg -R hgrepo bookmarks | egrep "devel[ ]+3:" ' + author_test () { + echo $1 >> content && + hg commit -u "$2" -m "add $1" && + echo "$3" >> ../expected + } + + test_expect_success 'authors' ' + mkdir -p tmp && cd tmp && + test_when_finished "cd .. && rm -rf tmp" && + + ( + hg init hgrepo && + cd hgrepo && + + touch content && + hg add content && + + author_test alpha "" "H G Wells " && + author_test beta "test" "test " && + author_test beta "test (comment)" "test " && + author_test gamma "" "Unknown " && + author_test delta "name" "name " && + author_test epsilon "name " && + author_test zeta " test " "test " && + author_test eta "test < test@example.com >" "test " && + author_test theta "test >test@example.com>" "test " && + author_test iota "test < test example com>" "test " && + author_test kappa "test@example.com" "test@example.com " + ) && + + git clone "hg::$PWD/hgrepo" gitrepo && + git --git-dir=gitrepo/.git log --reverse --format="%an <%ae>" > actual && + + test_cmp expected actual + ' + test_done