diff options
author | Eric Wong <normalperson@yhbt.net> | 2007-01-25 15:44:54 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2007-02-23 00:57:10 -0800 |
commit | e5a0b240fc237af6165b728ae9c79288ef624d3b (patch) | |
tree | 972489b8b13886f52e04e63e1ee8cad578e90bdd /t/t9104-git-svn-follow-parent.sh | |
parent | 97f6987afaae239f7e3ae3944e0b29343b43a894 (diff) | |
download | git-e5a0b240fc237af6165b728ae9c79288ef624d3b.tar.gz git-e5a0b240fc237af6165b728ae9c79288ef624d3b.tar.xz |
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 t9104-git-svn-follow-parent.sh and
correctly commit the log message in the preceeding test (which
conflicted with a filename).
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 | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/t/t9104-git-svn-follow-parent.sh b/t/t9104-git-svn-follow-parent.sh index 615c863b9..a6ba0faeb 100755 --- a/t/t9104-git-svn-follow-parent.sh +++ b/t/t9104-git-svn-follow-parent.sh @@ -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 &' test_done |