Subject: Re: [PATCH/RFC] git svn: handle errors and concurrent commits in dcommit

From: Robert Luberda <[email-masked]>
Date: Mon, 20 Aug 2012 00:43:19 +0200

Eric Wong wrote:

Hi,

> Junio C Hamano <[email-masked]> wrote:
>> I should have asked this yesterday, but do you mean you want to have
>> your "maint" in the upcoming 1.7.12?  This does look like a useful
>> thing to do, but does not seem like a regression fix to me.
> 
> Yeah, I wasn't sure what to name it since my master is still carrying
> Michael's larger SVN 1.7 changes.   Perhaps I should've named my "maint"
> "for-git-master" in this case...

While working on my next patch, I've accidentally discovered that bash gives
the following errors in the test file introduced in my commit :

./t9164-git-svn-dcommit-concrrent.sh: line 65: $hook: ambiguous redirect
./t9164-git-svn-dcommit-concrrent.sh: line 66: $hook: ambiguous redirect

(The test succeeds, even though assignments of the PATH and svnconf
variables is missing; is seems svn treats an empty value of --config-dir
as the current dir.)

Sorry about not noticing this before, dash is used as default /bin/sh on
my system. A simple patch for this issue is included below.

There is also a typo in the test file name: `concrrent' instead of
`concurrent', but it most probably doesn't make any sense to make a
patch for it.

>8--->8--->8--->8--->8--->8--->8--->8--->8--->8--->8--->8--->8
Subject: [PATCH] Add missing quotes in test t9164

This fixes `ambiguous redirect' error given by bash.
---
 t/t9164-git-svn-dcommit-concrrent.sh |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/t/t9164-git-svn-dcommit-concrrent.sh
b/t/t9164-git-svn-dcommit-concrrent.sh
index aac2dda..676ef00 100755
--- a/t/t9164-git-svn-dcommit-concrrent.sh
+++ b/t/t9164-git-svn-dcommit-concrrent.sh
@@ -62,8 +62,8 @@ EOF1
        if [ "$hook_type" = "pre-commit" ]; then
                echo "echo 'commit disallowed' >&2; exit 1" >> "$hook"
        else
-               echo "PATH=\"$PATH\"; export PATH" >> $hook
-               echo "svnconf=\"$svnconf\"" >> $hook
+               echo "PATH=\"$PATH\"; export PATH" >> "$hook"
+               echo "svnconf=\"$svnconf\"" >> "$hook"
                cat >> "$hook" <<- 'EOF2'
                        cd work-auto-commits.svn
                        svn up --config-dir "$svnconf"
--
1.7.10.4

>8--->8--->8--->8--->8--->8--->8--->8--->8--->8--->8--->8--->8

Regards,
robert