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

Re: [PATCH/rfc] git-svn.perl: workaround assertions in svn library 1.5.0

From
Dmitry Potapov <dpotapov@gmail.com>
Date
Jul 20, 2008, 20:14 UTC
Message-ID
<20080720201407.GM2925@dpotapov.dyndns.org>
In-Reply-To
<7vbq0tibuf.fsf@gitster.siamese.dyndns.org>
On Sat, Jul 19, 2008 at 06:27:36PM -0700, Junio C Hamano wrote:
Show 6 quoted lines
> 
> So what's the conclusion of this issue?
> 
> I'll just revert 2fe403e (git-svn.perl: workaround assertions in svn
> library 1.5.0, 2008-07-06) for 1.6.0-rc0 unless I hear better
> suggestions.

I have tested the change that I proposed, and it seems to solve the problem and, as far as I can tell, no other correction is necessary. Yet, I don't really understand git-svn well, so I could be wrong.

Reverting 2fe403e will only help users of svn library 1.4, while all new linux distributives, which will include Git 1.6.0, are going to install svn library 1.5.0, and if you use svn library 1.5.0, reverting 2fe403e does not fix anything but only add one more bug. Thus, unless we are going to require to install git-svn only with svn library 1.4, reverting this change does not seem to be very helpful for most users.

So, I hope my patch is better solution...
Dmitry
-- 8< --
From: Dmitry Potapov <dpotapov@gmail.com>
Date: Thu, 17 Jul 2008 22:32:02 +0400
Subject: [PATCH] git-svn: fix git svn info to work without arguments

commit 2fe403e7452bd6e1e8232445cf5434ce8f1af973 broke "git-svn info ." due to replacing '.' with '' in canonicalize_path for the top directory, while find_file_type_and_diff_status was not corrected.

Bug reports:

http://thread.gmane.org/gmane.comp.version-control.git/87822/ http://bugs.debian.org/490400

Signed-off-by: Dmitry Potapov <dpotapov@gmail.com>
---
 git-svn.perl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/git-svn.perl b/git-svn.perl
index a366c89..b00a91a 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -1226,7 +1226,7 @@ sub linearize_history {
 
 sub find_file_type_and_diff_status {
 	my ($path) = @_;
-	return ('dir', '') if $path eq '.';
+	return ('dir', '') if $path eq '';
 
 	my $diff_output =
 	    command_oneline(qw(diff --cached --name-status --), $path) || "";
-- 
1.5.6.3
Previous: Junio C HamanoNext: Eric Wong
Message 6 of 8 in “git-svn.perl: workaround assertions in svn library 1.5.0”
  1. git-svn.perl: workaround assertions in svn library 1.5.0Gerrit Pape, Jul 6, 2008
  2. Eric WongJul 7, 2008
  3. Gerrit PapeJul 17, 2008
  4. Dmitry PotapovJul 17, 2008
  5. Junio C HamanoJul 20, 2008
  6. Dmitry PotapovJul 20, 2008
  7. Eric WongJul 21, 2008
  8. Junio C HamanoJul 21, 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.