diff options
author | Eric Wong <normalperson@yhbt.net> | 2007-01-31 02:45:50 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2007-02-23 00:57:10 -0800 |
commit | 8a603774def11e5a90ae2dbbc0c8d4abacdb2d99 (patch) | |
tree | 374d6aa511e1c2818fea9f24428aacaf47b6ef35 /t/t9104-git-svn-follow-parent.sh | |
parent | f0ecca1041aff2e1398edcdaf5f0ce08a96f5f0f (diff) | |
download | git-8a603774def11e5a90ae2dbbc0c8d4abacdb2d99.tar.gz git-8a603774def11e5a90ae2dbbc0c8d4abacdb2d99.tar.xz |
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 <normalperson@yhbt.net>
Diffstat (limited to 't/t9104-git-svn-follow-parent.sh')
-rwxr-xr-x | t/t9104-git-svn-follow-parent.sh | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/t/t9104-git-svn-follow-parent.sh b/t/t9104-git-svn-follow-parent.sh index dcec16bda..41b9c19d4 100755 --- a/t/t9104-git-svn-follow-parent.sh +++ b/t/t9104-git-svn-follow-parent.sh @@ -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: (http://svn.collab.net/repos/svn) @@ -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 &' test_done |