summaryrefslogtreecommitdiff
path: root/t/t9116-git-svn-log.sh
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2007-08-15 09:55:18 -0700
committerJunio C Hamano <gitster@pobox.com>2007-08-15 12:09:48 -0700
commit6ed77266c6e85130920ef30cd290d36ad4464695 (patch)
tree0d3edc412cb3cb3ac9751ee908fbf287d3de7dcd /t/t9116-git-svn-log.sh
parent1467b5fec376b6c43a5fa54bffd356e458a8d57c (diff)
downloadgit-6ed77266c6e85130920ef30cd290d36ad4464695.tar.gz
git-svn: fix log with single revision against a non-HEAD branch
Running git-svn log <ref> -r<rev> against a <ref> other than the current HEAD did not work if the <rev> was exclusive to the other branch. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t9116-git-svn-log.sh')
-rwxr-xr-xt/t9116-git-svn-log.sh48
1 files changed, 48 insertions, 0 deletions
diff --git a/t/t9116-git-svn-log.sh b/t/t9116-git-svn-log.sh
new file mode 100755
index 0000000000..0d4e6b3f04
--- /dev/null
+++ b/t/t9116-git-svn-log.sh
@@ -0,0 +1,48 @@
+#!/bin/sh
+#
+# Copyright (c) 2007 Eric Wong
+#
+
+test_description='git-svn log tests'
+. ./lib-git-svn.sh
+
+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 && \
+ svn import -m test . $svnrepo
+ cd .. &&
+ git-svn init $svnrepo -T trunk -b branches -t tags &&
+ git-svn fetch &&
+ git reset --hard trunk &&
+ echo bye >> README &&
+ git commit -a -m bye &&
+ git svn dcommit &&
+ git reset --hard a &&
+ echo why >> FEEDME &&
+ git update-index --add FEEDME &&
+ git commit -m feedme &&
+ git svn dcommit &&
+ git reset --hard trunk &&
+ echo aye >> README &&
+ git commit -a -m aye &&
+ git svn dcommit
+ "
+
+test_expect_success 'run log' "
+ git reset --hard a &&
+ git svn log -r2 trunk | grep ^r2 &&
+ git svn log -r4 trunk | grep ^r4 &&
+ git svn log -r3 | grep ^r3
+ "
+
+test_expect_success 'run log against a from trunk' "
+ git reset --hard trunk &&
+ git svn log -r3 a | grep ^r3
+ "
+
+test_done