X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft9116-git-svn-log.sh;h=cf4c05261b42ddd0711f78951adfc4a49ffdcc1e;hb=817bac35f24166e8b306ecef5283ed721068f113;hp=0374a7476bcc5b254aa1464d468434ae3205f114;hpb=71ee7fd15457a0252c089420b5b66de266dcbd2f;p=git.git diff --git a/t/t9116-git-svn-log.sh b/t/t9116-git-svn-log.sh index 0374a7476..cf4c05261 100755 --- a/t/t9116-git-svn-log.sh +++ b/t/t9116-git-svn-log.sh @@ -8,14 +8,16 @@ test_description='git svn log tests' test_expect_success 'setup repository and import' ' mkdir import && - cd import && - for i in trunk branches/a branches/b \ - tags/0.1 tags/0.2 tags/0.3; do - mkdir -p $i && \ - echo hello >> $i/README || exit 1 - done && \ + ( + cd import && + for i in trunk branches/a branches/b tags/0.1 tags/0.2 tags/0.3 + do + mkdir -p $i && + echo hello >>$i/README || + exit 1 + done && svn_cmd import -m test . "$svnrepo" - cd .. && + ) && git svn init "$svnrepo" -T trunk -b branches -t tags && git svn fetch && git reset --hard trunk && @@ -58,6 +60,21 @@ test_expect_success 'test ascending revision range' " git svn log -r 1:4 | grep '^r[0-9]' | cut -d'|' -f1 | test_cmp expected-range-r1-r2-r4 - " +test_expect_success 'test ascending revision range with --show-commit' " + git reset --hard trunk && + git svn log --show-commit -r 1:4 | grep '^r[0-9]' | cut -d'|' -f1 | test_cmp expected-range-r1-r2-r4 - + " + +test_expect_success 'test ascending revision range with --show-commit (sha1)' " + git svn find-rev r1 >expected-range-r1-r2-r4-sha1 && + git svn find-rev r2 >>expected-range-r1-r2-r4-sha1 && + git svn find-rev r4 >>expected-range-r1-r2-r4-sha1 && + git reset --hard trunk && + git svn log --show-commit -r 1:4 | grep '^r[0-9]' | cut -d'|' -f2 >out && + git rev-parse \$(cat out) >actual && + test_cmp expected-range-r1-r2-r4-sha1 actual + " + printf 'r4 \nr2 \nr1 \n' > expected-range-r4-r2-r1 test_expect_success 'test descending revision range' "