path: root/t/
diff options
authorEric Wong <>2007-01-25 23:44:54 (GMT)
committerEric Wong <>2007-02-23 08:57:10 (GMT)
commite5a0b240fc237af6165b728ae9c79288ef624d3b (patch)
tree972489b8b13886f52e04e63e1ee8cad578e90bdd /t/
parent97f6987afaae239f7e3ae3944e0b29343b43a894 (diff)
git-svn: correctly track revisions made to deleted branches
git-svn has never been able to handle deleted branches very well because svn_ra_get_log() is all-or-nothing, meaning that if the max revision passed to it does not contain the path we're tracking, we miss all the revisions in the repository. Branches fetched using --follow-parent still do this sub-optimally (will be fixed soon). --follow-parent will soon become the default, so we will assume that when using get_log(); We will also avoid tracking revprops for revisions with no path-related changes since otherwise we just end up pulling logs to paths we don't care about. Also added a test for this to and correctly commit the log message in the preceeding test (which conflicted with a filename). Signed-off-by: Eric Wong <>
Diffstat (limited to 't/')
1 files changed, 10 insertions, 1 deletions
diff --git a/t/ b/t/
index 615c863..a6ba0fa 100755
--- a/t/
+++ b/t/
@@ -85,7 +85,7 @@ test_expect_success 'follow higher-level parent' "
cd blob &&
echo hi > hi &&
svn add hi &&
- svn commit -m 'hi' &&
+ svn commit -m 'hihi' &&
cd ..
svn mkdir -m 'new glob at top level' $svnrepo/glob &&
svn mv -m 'move blob down a level' $svnrepo/blob $svnrepo/glob/blob &&
@@ -93,6 +93,15 @@ test_expect_success 'follow higher-level parent' "
git-svn fetch -i blob --follow-parent
+test_expect_success 'follow deleted directory' "
+ svn mv -m 'bye!' $svnrepo/glob/blob/hi $svnrepo/glob/blob/bye&&
+ svn rm -m 'remove glob' $svnrepo/glob &&
+ git-svn init -i glob $svnrepo/glob &&
+ git-svn fetch -i glob &&
+ test \"\`git cat-file blob refs/remotes/glob~1:blob/bye\`\" = hi &&
+ test -z \"\`git ls-tree -z refs/remotes/glob\`\"
+ "
test_debug 'gitk --all &'