diff options
author | Adam Brewster <adambrewster@gmail.com> | 2009-08-11 23:14:27 -0400 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-08-12 22:17:56 -0700 |
commit | 6f5748e14cc5bb0a836b649fb8e2d6a5eb166f1d (patch) | |
tree | d5bfd423ccb6f1f2f2f12df41fc0b0c4cf27a6ad /t/t9144-git-svn-old-rev_map.sh | |
parent | b186a261b1f7ec1fbda8c5f6d84595f3a7716d92 (diff) | |
download | git-6f5748e14cc5bb0a836b649fb8e2d6a5eb166f1d.tar.gz |
svn: allow branches outside of refs/remotes
It may be convenient for some users to store svn remote tracking
branches outside of the refs/remotes/ heirarchy.
To accomplish this feat, this patch includes the entire path to
the ref in $r->{'refname'} in &read_all_remotes and tries to change
references to this entry so the new value makes sense.
[ew: fixed backwards compatibility, long lines]
Signed-off-by: Adam Brewster <adambrewster@gmail.com>
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Diffstat (limited to 't/t9144-git-svn-old-rev_map.sh')
-rwxr-xr-x | t/t9144-git-svn-old-rev_map.sh | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/t/t9144-git-svn-old-rev_map.sh b/t/t9144-git-svn-old-rev_map.sh new file mode 100755 index 0000000000..7600a35cd4 --- /dev/null +++ b/t/t9144-git-svn-old-rev_map.sh @@ -0,0 +1,31 @@ +#!/bin/sh +# +# Copyright (c) 2009 Eric Wong + +test_description='git svn old rev_map preservd' +. ./lib-git-svn.sh + +test_expect_success 'setup test repository with old layout' ' + mkdir i && + (cd i && > a) && + svn_cmd import -m- i "$svnrepo" && + git svn init "$svnrepo" && + git svn fetch && + test -d .git/svn/refs/remotes/git-svn/ && + ! test -e .git/svn/git-svn/ && + mv .git/svn/refs/remotes/git-svn .git/svn/ && + rm -r .git/svn/refs +' + +test_expect_success 'old layout continues to work' ' + svn_cmd import -m- i "$svnrepo/b" && + git svn rebase && + echo a >> b/a && + git add b/a && + git commit -m- -a && + git svn dcommit && + ! test -d .git/svn/refs/ && + test -e .git/svn/git-svn/ +' + +test_done |