cvsimport: add test illustrating a bug in cvsps
[git/barrbrain.git] / t / t9603-cvsimport-patchsets.sh
blob15a971fc4f8c73b6107ea484b60775c8488fd3d0
1 #!/bin/sh
3 # Structure of the test cvs repository
5 # Message File:Content Commit Time
6 # Rev 1 a: 1.1 2009-02-21 19:11:43 +0100
7 # Rev 2 a: 1.2 b: 1.1 2009-02-21 19:11:14 +0100
8 # Rev 3 b: 1.2 2009-02-21 19:11:43 +0100
10 # As you can see the commit of Rev 3 has the same time as
11 # Rev 1 this leads to a broken import because of a cvsps
12 # bug.
14 test_description='git cvsimport testing for correct patchset estimation'
15 . ./lib-cvs.sh
17 CVSROOT="$TEST_DIRECTORY"/t9603/cvsroot
18 export CVSROOT
20 test_expect_failure 'import with criss cross times on revisions' '
22 git cvsimport -p"-x" -C module-git module &&
23 cd module-git &&
24 git log --pretty=format:%s > ../actual &&
25 echo "" >> ../actual &&
26 cd .. &&
27 echo "Rev 3
28 Rev 2
29 Rev 1" > expect &&
30 test_cmp actual expect
33 test_done