git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] git-svn: factor out svnserve test code for later use

From
Alec Berryman <alec@thened.net>
Date
Sep 14, 2008, 21:14 UTC
Message-ID
<1221426856-2652-2-git-send-email-alec@thened.net>
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
Previous: Alec BerrymanNext: Alec Berryman
Message 2 of 4 in “git-svn: Always create a new RA when calling do_switch for svn://”
  1. git-svn: Always create a new RA when calling do_switch for svn://Alec Berryman, Sep 14, 2008
  2. git-svn: factor out svnserve test code for later useAlec Berryman, Sep 14, 2008
  3. git-svn: Always create a new RA when calling do_switch for svn://Alec Berryman, Sep 14, 2008
  4. Eric WongSep 18, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.