git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alec Berryman <alec@thened.net>
To: git@vger.kernel.org, Eric Wong <normalperson@yhbt.net>
Cc: Alec Berryman <alec@thened.net>
Subject: [PATCH] git-svn: factor out svnserve test code for later use
Date: Sun, 14 Sep 2008 17:14:15 -0400	[thread overview]
Message-ID: <1221426856-2652-2-git-send-email-alec@thened.net> (raw)
In-Reply-To: <1221426856-2652-1-git-send-email-alec@thened.net>

Signed-off-by: Alec Berryman <alec@thened.net>
---
 t/lib-git-svn.sh                    |   17 +++++++++++++++++
 t/t9113-git-svn-dcommit-new-file.sh |   14 +-------------
 2 files changed, 18 insertions(+), 13 deletions(-)

diff --git a/t/lib-git-svn.sh b/t/lib-git-svn.sh
index c526eed..67c431d 100644
--- a/t/lib-git-svn.sh
+++ b/t/lib-git-svn.sh
@@ -138,3 +138,20 @@ close $wr or die $!;
 close $rd or die $!;
 EOF
 }
+
+require_svnserve () {
+    if test -z "$SVNSERVE_PORT"
+    then
+        say 'skipping svnserve test. (set $SVNSERVE_PORT to enable)'
+        test_done
+        exit
+    fi
+}
+
+start_svnserve () {
+    svnserve --listen-port $SVNSERVE_PORT \
+             --root "$rawsvnrepo" \
+             --listen-once \
+             --listen-host 127.0.0.1 &
+}
+
diff --git a/t/t9113-git-svn-dcommit-new-file.sh b/t/t9113-git-svn-dcommit-new-file.sh
index 250c530..e9b6128 100755
--- a/t/t9113-git-svn-dcommit-new-file.sh
+++ b/t/t9113-git-svn-dcommit-new-file.sh
@@ -12,19 +12,7 @@ test_description='git svn dcommit new files over svn:// test'
 
 . ./lib-git-svn.sh
 
-if test -z "$SVNSERVE_PORT"
-then
-	say 'skipping svnserve test. (set $SVNSERVE_PORT to enable)'
-	test_done
-	exit
-fi
-
-start_svnserve () {
-	svnserve --listen-port $SVNSERVE_PORT \
-	         --root "$rawsvnrepo" \
-	         --listen-once \
-	         --listen-host 127.0.0.1 &
-}
+require_svnserve
 
 test_expect_success 'start tracking an empty repo' '
 	svn mkdir -m "empty dir" "$svnrepo"/empty-dir &&
-- 
1.6.0.2.231.gfc858

  reply	other threads:[~2008-09-14 21:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-14 21:14 [PATCH] git-svn: Always create a new RA when calling do_switch for svn:// Alec Berryman
2008-09-14 21:14 ` Alec Berryman [this message]
2008-09-14 21:14   ` Alec Berryman
2008-09-18  6:44 ` Eric Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1221426856-2652-2-git-send-email-alec@thened.net \
    --to=alec@thened.net \
    --cc=git@vger.kernel.org \
    --cc=normalperson@yhbt.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).