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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Robert Luberda <robert@xxxxxxxxxx> wrote:
> 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.

Oops, I'll push the following out since Junio already merged your
original:

(your original patch was also whitespace-mangled)

>From 209b4ac46d70aa6f29d51c2fbefa53509513362c Mon Sep 17 00:00:00 2001
From: Robert Luberda <robert@xxxxxxxxxx>
Date: Mon, 20 Aug 2012 00:43:19 +0200
Subject: [PATCH] t9164: Add missing quotes in test

This fixes `ambiguous redirect' error given by bash.

[ew: fix misspelled test name,
     also eliminate space after ">>" to conform to guidelines]

Signed-off-by: Eric Wong <normalperson@xxxxxxxx>
---
 ...n-dcommit-concrrent.sh => t9164-git-svn-dcommit-concurrent.sh} | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
 rename t/{t9164-git-svn-dcommit-concrrent.sh => t9164-git-svn-dcommit-concurrent.sh} (97%)

diff --git a/t/t9164-git-svn-dcommit-concrrent.sh b/t/t9164-git-svn-dcommit-concurrent.sh
similarity index 97%
rename from t/t9164-git-svn-dcommit-concrrent.sh
rename to t/t9164-git-svn-dcommit-concurrent.sh
index aac2dda..d8464d4 100755
--- a/t/t9164-git-svn-dcommit-concrrent.sh
+++ b/t/t9164-git-svn-dcommit-concurrent.sh
@@ -60,11 +60,11 @@ setup_hook()
 		[ "$cnt" = "0" ] || exit 0
 EOF1
 	if [ "$hook_type" = "pre-commit" ]; then
-		echo "echo 'commit disallowed' >&2; exit 1" >> "$hook"
+		echo "echo 'commit disallowed' >&2; exit 1" >>"$hook"
 	else
-		echo "PATH=\"$PATH\"; export PATH" >> $hook
-		echo "svnconf=\"$svnconf\"" >> $hook
-		cat >> "$hook" <<- 'EOF2'
+		echo "PATH=\"$PATH\"; export PATH" >>"$hook"
+		echo "svnconf=\"$svnconf\"" >>"$hook"
+		cat >>"$hook" <<- 'EOF2'
 			cd work-auto-commits.svn
 			svn up --config-dir "$svnconf"
 			echo "$$" >> auto_updated_file
-- 
Eric Wong
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]