diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-03-02 12:44:06 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-03-02 12:44:06 -0800 |
commit | 6954ef206343d366c365f5946caa967f92d7bab1 (patch) | |
tree | d27036ef23f5daa823dc4e8e637d5ecde592be63 /t/t9600-cvsimport.sh | |
parent | Merge branch 'jc/grep-author-all-match-implicit' (diff) | |
parent | cvsimport: new -R option: generate .git/cvs-revisions mapping (diff) | |
download | tgif-6954ef206343d366c365f5946caa967f92d7bab1.tar.xz |
Merge branch 'ac/cvsimport-revision-mapping'
* ac/cvsimport-revision-mapping:
cvsimport: new -R option: generate .git/cvs-revisions mapping
Diffstat (limited to 't/t9600-cvsimport.sh')
-rwxr-xr-x | t/t9600-cvsimport.sh | 36 |
1 files changed, 33 insertions, 3 deletions
diff --git a/t/t9600-cvsimport.sh b/t/t9600-cvsimport.sh index 363345faef..b572ce3ab7 100755 --- a/t/t9600-cvsimport.sh +++ b/t/t9600-cvsimport.sh @@ -47,13 +47,20 @@ EOF test_expect_success 'import a trivial module' ' - git cvsimport -a -z 0 -C module-git module && + git cvsimport -a -R -z 0 -C module-git module && test_cmp module-cvs/o_fortuna module-git/o_fortuna ' test_expect_success 'pack refs' 'cd module-git && git gc && cd ..' +test_expect_success 'initial import has correct .git/cvs-revisions' ' + + (cd module-git && + git log --format="o_fortuna 1.1 %H" -1) > expected && + test_cmp expected module-git/.git/cvs-revisions +' + test_expect_success 'update cvs module' ' cd module-cvs && @@ -86,13 +93,21 @@ EOF test_expect_success 'update git module' ' cd module-git && - git cvsimport -a -z 0 module && + git cvsimport -a -R -z 0 module && git merge origin && cd .. && test_cmp module-cvs/o_fortuna module-git/o_fortuna ' +test_expect_success 'update has correct .git/cvs-revisions' ' + + (cd module-git && + git log --format="o_fortuna 1.1 %H" -1 HEAD^ && + git log --format="o_fortuna 1.2 %H" -1 HEAD) > expected && + test_cmp expected module-git/.git/cvs-revisions +' + test_expect_success 'update cvs module' ' cd module-cvs && @@ -107,13 +122,22 @@ test_expect_success 'cvsimport.module config works' ' cd module-git && git config cvsimport.module module && - git cvsimport -a -z0 && + git cvsimport -a -R -z0 && git merge origin && cd .. && test_cmp module-cvs/tick module-git/tick ' +test_expect_success 'second update has correct .git/cvs-revisions' ' + + (cd module-git && + git log --format="o_fortuna 1.1 %H" -1 HEAD^^ && + git log --format="o_fortuna 1.2 %H" -1 HEAD^ + git log --format="tick 1.1 %H" -1 HEAD) > expected && + test_cmp expected module-git/.git/cvs-revisions +' + test_expect_success 'import from a CVS working tree' ' $CVS co -d import-from-wt module && @@ -126,6 +150,12 @@ test_expect_success 'import from a CVS working tree' ' ' +test_expect_success 'no .git/cvs-revisions created by default' ' + + ! test -e import-from-wt/.git/cvs-revisions + +' + test_expect_success 'test entire HEAD' 'test_cmp_branch_tree master' test_done |