Thread (9 messages) flat view 9 messages, 7 authors, 2016-06-15

Re: [BUG] git-svn dcommit fails (connection closed unexpectedly)

From: Eric Wong <hidden>
Date: 2016-06-15 22:43:10
Subsystem: the rest · Maintainer: Linus Torvalds

Eric Wong [off-list ref] wrote:
Karl Hasselström [off-list ref] wrote:
quoted
On 2007-05-13 19:49:34 +0200, Martin Eisenhardt wrote:
quoted
Another case where I stumbled upon said error message was when I
added an empty (sub)directory to a project in subversion and then
used git to track that project. Since git cannot track an empty
directory, it did not appear in my git working copy. When I mkdir'd
the directory locally (in my git wc) and then tried to add files
within that repository, I got exactly the same error as Matthieu.
Interesting.  I don't think git-svn currently checks for that case.
Ok, it already *does* check for this case and works for me(TM).

From 8222388080c05157e2926faffcd853bae500c521 Mon Sep 17 00:00:00 2001
From: Eric Wong <redacted>
Date: Sun, 13 May 2007 17:38:21 -0700
Subject: [PATCH] git-svn: test for creating new files in empty previously directories

Signed-off-by: Eric Wong <redacted>
---
 t/t9112-git-svn-dcommit-new-file.sh |   40 +++++++++++++++++++++++++++++++++++
 1 files changed, 40 insertions(+), 0 deletions(-)
 create mode 100755 t/t9112-git-svn-dcommit-new-file.sh
diff --git a/t/t9112-git-svn-dcommit-new-file.sh b/t/t9112-git-svn-dcommit-new-file.sh
new file mode 100755
index 0000000..e643c13
--- /dev/null
+++ b/t/t9112-git-svn-dcommit-new-file.sh
@@ -0,0 +1,40 @@
+#!/bin/sh
+#
+# Copyright (c) 2007 Eric Wong
+#
+
+test_description='git-svn dcommit new files over svn:// test'
+
+. ./lib-git-svn.sh
+
+# standard svnserve runs on 3690, so lets not conflict with that
+SVNSERVE_PORT=${SVNSERVE_PORT-'3691'}
+
+start_svnserve () {
+	svnserve --listen-port $SVNSERVE_PORT \
+	         --root $rawsvnrepo \
+	         --listen-once \
+	         --listen-host 127.0.0.1 &
+}
+
+test_expect_success 'start tracking an empty repo' "
+	svn mkdir -m 'empty dir' $svnrepo/empty-dir &&
+	echo anon-access = write >> $rawsvnrepo/conf/svnserve.conf &&
+	start_svnserve &&
+	git svn init svn://127.0.0.1:$SVNSERVE_PORT &&
+	git svn fetch
+	"
+
+test_expect_success 'create two files in empty-directory with dcommit' "
+	mkdir empty-dir &&
+	echo hello > empty-dir/a &&
+	echo hello > empty-dir/b &&
+	echo hello > empty-dir/c &&
+	git update-index --add empty-dir/a empty-dir/b empty-dir/c &&
+	git commit -m hello &&
+	start_svnserve &&
+	git svn dcommit
+	"
+
+test_done
+
-- 
Eric Wong
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help