Re: [PATCH 1/3] Move remote parsing into a library file out of builtin-push.
- From
Daniel Barkalow <barkalow@iabervon.org>
- Date
- May 10, 2007, 07:45 UTC
- Message-ID
- <Pine.LNX.4.64.0705100328260.18541@iabervon.org>
- In-Reply-To
- <7vhcqlma1l.fsf@assigned-by-dhcp.cox.net>
On Thu, 10 May 2007, Junio C Hamano wrote:
Show 14 quoted lines
> This seems to break t9400, with "fatal: bad repository 'gitcvs.git", > upon "git push". > > : gitster t/db/remote; sh t9400-git-cvsserver-server.sh -i -v > * expecting success: cvs -Q co -d cvswork master && > test "$(echo $(grep -v ^D cvswork/CVS/Entries|cut -d/ -f2,3,5))" = "empty/1.1/" > cvs checkout: Updating cvswork > U cvswork/empty > * ok 1: basic checkout > > * expecting success: echo testfile1 >testfile1 && > git add testfile1 && > git commit -q -m "Add testfile1" && > git push gitcvs.git >/dev/null &&
The man page doesn't think this is valid, since it only claims absolute paths to work for local repositories. (Current builtin-push seems to be sloppy; it has the die() that triggers in my version, but its read_config() always returns a value that doesn't trigger it, suggesting that there's some sort of bug.)
Following patch fixes t9400 to use absolute paths (assuming that's what it expects "git push gitcvs.git" to mean).
=== cut here === Local repository names for git-push are only documented with absolute paths, even though current git-push is lenient. Use an absolute path in t9400-git-cvsserver-server.sh.
Signed-off-by: Daniel Barkalow <barkalow@iabervon.org> ---
diff --git a/t/t9400-git-cvsserver-server.sh b/t/t9400-git-cvsserver-server.sh index f17be6b..178b9b4 100755 --- a/t/t9400-git-cvsserver-server.sh +++ b/t/t9400-git-cvsserver-server.sh @@ -45,7 +45,7 @@ test_expect_success 'cvs update (create new file)' \ 'echo testfile1 >testfile1 && git add testfile1 && git commit -q -m "Add testfile1" && - git push gitcvs.git >/dev/null && + git push $(pwd)/gitcvs.git >/dev/null && cd cvswork && cvs -Q update && test "$(echo $(grep testfile1 CVS/Entries|cut -d/ -f2,3,5))" = "testfile1/1.1/" && @@ -56,7 +56,7 @@ test_expect_success 'cvs update (update existing file)' \ 'echo line 2 >>testfile1 && git add testfile1 && git commit -q -m "Append to testfile1" && - git push gitcvs.git >/dev/null && + git push $(pwd)/gitcvs.git >/dev/null && cd cvswork && cvs -Q update && test "$(echo $(grep testfile1 CVS/Entries|cut -d/ -f2,3,5))" = "testfile1/1.2/" && @@ -69,7 +69,7 @@ test_expect_failure "cvs update w/o -d doesn't create subdir (TODO)" \ echo >test/empty && git add test && git commit -q -m "Single Subdirectory" && - git push gitcvs.git >/dev/null && + git push $(pwd)/gitcvs.git >/dev/null && cd cvswork && cvs -Q update && test ! -d test' @@ -82,7 +82,7 @@ test_expect_success 'cvs update (subdirectories)' \ git add $dir; done) && git commit -q -m "deep sub directory structure" && - git push gitcvs.git >/dev/null && + git push $(pwd)/gitcvs.git >/dev/null && cd cvswork && cvs -Q update -d && (for dir in A A/B A/B/C A/D E; do @@ -100,7 +100,7 @@ cd "$WORKDIR" test_expect_success 'cvs update (delete file)' \ 'git rm testfile1 && git commit -q -m "Remove testfile1" && - git push gitcvs.git >/dev/null && + git push $(pwd)/gitcvs.git >/dev/null && cd cvswork && cvs -Q update && test -z "$(grep testfile1 CVS/Entries)" && @@ -111,7 +111,7 @@ test_expect_success 'cvs update (re-add deleted file)' \ 'echo readded testfile >testfile1 && git add testfile1 && git commit -q -m "Re-Add testfile1" && - git push gitcvs.git >/dev/null && + git push $(pwd)/gitcvs.git >/dev/null && cd cvswork && cvs -Q update && test "$(echo $(grep testfile1 CVS/Entries|cut -d/ -f2,3,5))" = "testfile1/1.4/" &&