diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-04-21 18:39:58 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-04-21 18:39:58 -0700 |
commit | 37d32de72a495b8f8ea985fc97ad7ee8d1d82b06 (patch) | |
tree | bad0ab27050d7c8ee7375e06696a42b885eceb7b /contrib/remote-helpers/test-hg.sh | |
parent | 4b35b007a6bd8b76bd37589fa397c12265935029 (diff) | |
parent | 9a57988b3fac79e0458515a555392d00b759cf4c (diff) | |
download | git-37d32de72a495b8f8ea985fc97ad7ee8d1d82b06.tar.gz |
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
...
Diffstat (limited to 'contrib/remote-helpers/test-hg.sh')
-rwxr-xr-x | contrib/remote-helpers/test-hg.sh | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/contrib/remote-helpers/test-hg.sh b/contrib/remote-helpers/test-hg.sh index 7bb81f2f8e..d5b873051f 100755 --- a/contrib/remote-helpers/test-hg.sh +++ b/contrib/remote-helpers/test-hg.sh @@ -118,4 +118,40 @@ test_expect_success 'update bookmark' ' 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 <wells@example.com>" && + author_test beta "test" "test <unknown>" && + author_test beta "test <test@example.com> (comment)" "test <unknown>" && + author_test gamma "<test@example.com>" "Unknown <test@example.com>" && + author_test delta "name<test@example.com>" "name <test@example.com>" && + author_test epsilon "name <test@example.com" "name <unknown>" && + author_test zeta " test " "test <unknown>" && + author_test eta "test < test@example.com >" "test <test@example.com>" && + author_test theta "test >test@example.com>" "test <unknown>" && + author_test iota "test < test <at> example <dot> com>" "test <unknown>" && + author_test kappa "test@example.com" "test@example.com <unknown>" + ) && + + git clone "hg::$PWD/hgrepo" gitrepo && + git --git-dir=gitrepo/.git log --reverse --format="%an <%ae>" > actual && + + test_cmp expected actual +' + test_done |