Server IP : 103.119.228.120 / Your IP : 18.222.92.56 Web Server : Apache System : Linux v8.techscape8.com 3.10.0-1160.119.1.el7.tuxcare.els2.x86_64 #1 SMP Mon Jul 15 12:09:18 UTC 2024 x86_64 User : nobody ( 99) PHP Version : 5.6.40 Disable Function : shell_exec,symlink,system,exec,proc_get_status,proc_nice,proc_terminate,define_syslog_variables,syslog,openlog,closelog,escapeshellcmd,passthru,ocinum cols,ini_alter,leak,listen,chgrp,apache_note,apache_setenv,debugger_on,debugger_off,ftp_exec,dl,dll,myshellexec,proc_open,socket_bind,proc_close,escapeshellarg,parse_ini_filepopen,fpassthru,exec,passthru,escapeshellarg,escapeshellcmd,proc_close,proc_open,ini_alter,popen,show_source,proc_nice,proc_terminate,proc_get_status,proc_close,pfsockopen,leak,apache_child_terminate,posix_kill,posix_mkfifo,posix_setpgid,posix_setsid,posix_setuid,dl,symlink,shell_exec,system,dl,passthru,escapeshellarg,escapeshellcmd,myshellexec,c99_buff_prepare,c99_sess_put,fpassthru,getdisfunc,fx29exec,fx29exec2,is_windows,disp_freespace,fx29sh_getupdate,fx29_buff_prepare,fx29_sess_put,fx29shexit,fx29fsearch,fx29ftpbrutecheck,fx29sh_tools,fx29sh_about,milw0rm,imagez,sh_name,myshellexec,checkproxyhost,dosyayicek,c99_buff_prepare,c99_sess_put,c99getsource,c99sh_getupdate,c99fsearch,c99shexit,view_perms,posix_getpwuid,posix_getgrgid,posix_kill,parse_perms,parsesort,view_perms_color,set_encoder_input,ls_setcheckboxall,ls_reverse_all,rsg_read,rsg_glob,selfURL,dispsecinfo,unix2DosTime,addFile,system,get_users,view_size,DirFiles,DirFilesWide,DirPrintHTMLHeaders,GetFilesTotal,GetTitles,GetTimeTotal,GetMatchesCount,GetFileMatchesCount,GetResultFiles,fs_copy_dir,fs_copy_obj,fs_move_dir,fs_move_obj,fs_rmdir,SearchText,getmicrotime MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/share/doc/git-1.8.3.1/contrib/remote-helpers/ |
Upload File : |
#!/bin/sh # # Copyright (c) 2012 Felipe Contreras # # Base commands from hg-git tests: # https://bitbucket.org/durin42/hg-git/src # test_description='Test remote-hg' . ./test-lib.sh if ! test_have_prereq PYTHON; then skip_all='skipping remote-hg tests; python not available' test_done fi if ! "$PYTHON_PATH" -c 'import mercurial'; then skip_all='skipping remote-hg tests; mercurial not available' test_done fi check () { (cd $1 && git log --format='%s' -1 && git symbolic-ref HEAD) > actual && (echo $2 && echo "refs/heads/$3") > expected && test_cmp expected actual } setup () { ( echo "[ui]" echo "username = H G Wells <wells@example.com>" ) >> "$HOME"/.hgrc } setup test_expect_success 'cloning' ' test_when_finished "rm -rf gitrepo*" && ( hg init hgrepo && cd hgrepo && echo zero > content && hg add content && hg commit -m zero ) && git clone "hg::$PWD/hgrepo" gitrepo && check gitrepo zero master ' test_expect_success 'cloning with branches' ' test_when_finished "rm -rf gitrepo*" && ( cd hgrepo && hg branch next && echo next > content && hg commit -m next ) && git clone "hg::$PWD/hgrepo" gitrepo && check gitrepo next next && (cd hgrepo && hg checkout default) && git clone "hg::$PWD/hgrepo" gitrepo2 && check gitrepo2 zero master ' test_expect_success 'cloning with bookmarks' ' test_when_finished "rm -rf gitrepo*" && ( cd hgrepo && hg bookmark feature-a && echo feature-a > content && hg commit -m feature-a ) && git clone "hg::$PWD/hgrepo" gitrepo && check gitrepo feature-a feature-a ' test_expect_success 'cloning with detached head' ' test_when_finished "rm -rf gitrepo*" && ( cd hgrepo && hg update -r 0 ) && git clone "hg::$PWD/hgrepo" gitrepo && check gitrepo zero master ' test_expect_success 'update bookmark' ' test_when_finished "rm -rf gitrepo*" && ( cd hgrepo && hg bookmark devel ) && ( git clone "hg::$PWD/hgrepo" gitrepo && cd gitrepo && git checkout devel && echo devel > content && git commit -a -m devel && git push ) && 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 <test@example.com>" && 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 <test@example.com>" && 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 <test@example.com>" && author_test iota "test < test <at> example <dot> com>" "test <unknown>" && author_test kappa "test@example.com" "Unknown <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