git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Wong <normalperson@yhbt.net>
To: "Karl Hasselström" <kha@treskal.com>
Cc: Martin Eisenhardt <martin.eisenhardt@mneisen.org>,
	git <git@vger.kernel.org>,
	Matthieu.Moy@imag.fr
Subject: Re: [BUG] git-svn dcommit fails (connection closed unexpectedly)
Date: Sun, 13 May 2007 17:39:43 -0700	[thread overview]
Message-ID: <20070514003943.GA18924@muzzle> (raw)
In-Reply-To: <20070513210128.GA13428@muzzle>

Eric Wong <normalperson@yhbt.net> wrote:
> Karl Hasselström <kha@treskal.com> wrote:
> > On 2007-05-13 19:49:34 +0200, Martin Eisenhardt wrote:
> > 
> > > 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 <normalperson@yhbt.net>
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 <normalperson@yhbt.net>
---
 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

  reply	other threads:[~2007-05-14  0:39 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-11  9:09 [BUG] git-svn dcommit fails (connection closed unexpectedly) Matthieu Moy
2007-05-11 11:27 ` Lars Hjemli
2007-05-11 11:30   ` Lars Hjemli
2007-05-11 12:51   ` Matthieu Moy
2007-05-14 18:13   ` Matthieu Moy
2007-05-19  6:14     ` Eric Wong
2007-05-19  9:58       ` [PATCH] git-svn: avoid crashing svnserve when creating new directories Eric Wong
2007-05-19 10:19         ` Matthieu Moy
2007-05-19 10:58           ` Eric Wong
2007-05-19 12:02             ` Matthieu Moy
2007-05-13 17:17 ` [BUG] git-svn dcommit fails (connection closed unexpectedly) Eric Wong
2007-05-13 17:49   ` Martin Eisenhardt
2007-05-13 18:24     ` Karl Hasselström
2007-05-13 21:01       ` Eric Wong
2007-05-14  0:39         ` Eric Wong [this message]
2007-05-14 17:26         ` Linus Torvalds
2007-05-14 17:50           ` Matthieu Moy
2007-05-14 12:27   ` Matthieu Moy

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=20070514003943.GA18924@muzzle \
    --to=normalperson@yhbt.net \
    --cc=Matthieu.Moy@imag.fr \
    --cc=git@vger.kernel.org \
    --cc=kha@treskal.com \
    --cc=martin.eisenhardt@mneisen.org \
    /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).