path: root/t/
diff options
authorEric Wong <>2007-01-31 10:45:50 (GMT)
committerEric Wong <>2007-02-23 08:57:10 (GMT)
commit8a603774def11e5a90ae2dbbc0c8d4abacdb2d99 (patch)
tree374d6aa511e1c2818fea9f24428aacaf47b6ef35 /t/
parentf0ecca1041aff2e1398edcdaf5f0ce08a96f5f0f (diff)
git-svn: fix several fetch bugs related to repeated invocations
We no longer delete the top-level directory even if it got deleted from the upstream repository. In gs_do_update; we double-check that the path we're tracking exists at both endpoints before proceeding. We have also added additional protection against fetching revisions out-of-order. To simplify our internal interfaces, I've disabled passing the 'recursive' flag to the gs_do_{switch,update} wrapper functions since we always want it in git-svn. We also pass the entire Git::SVN object rather than just the path because it helped me debug. When printing progress, the refname is printed out to make it less confusing when multi-fetch is running. Signed-off-by: Eric Wong <>
Diffstat (limited to 't/')
1 files changed, 13 insertions, 3 deletions
diff --git a/t/ b/t/
index dcec16b..41b9c19 100755
--- a/t/
+++ b/t/
@@ -95,12 +95,12 @@ test_expect_success 'follow higher-level parent' "
test_expect_success 'follow deleted directory' "
- svn mv -m 'bye!' $svnrepo/glob/blob/hi $svnrepo/glob/blob/bye&&
+ 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 \"\`git cat-file blob refs/remotes/glob:blob/bye\`\" = hi &&
+ test \"\`git ls-tree refs/remotes/glob | wc -l \`\" -eq 1
# ref: r9270 of the Subversion repository: (
@@ -146,6 +146,16 @@ test_expect_success "track initial change if it was only made to parent" "
\"\`git rev-parse r9270-d~1\`\"
+test_expect_success "multi-fetch continues to work" "
+ git-svn multi-fetch --follow-parent
+ "
+test_expect_success "multi-fetch works off a 'clean' repository" "
+ rm -r $GIT_DIR/svn $GIT_DIR/refs/remotes $GIT_DIR/logs &&
+ mkdir $GIT_DIR/svn &&
+ git-svn multi-fetch --follow-parent
+ "
test_debug 'gitk --all &'