-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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>
- Loading branch information
Eric Wong
authored and
Junio C Hamano
committed
Aug 15, 2007
1 parent
1467b5f
commit 6ed7726
Showing
2 changed files
with
63 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |