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

Re: Bug?: import-tars misbehaves on Subversion tarballs

From
Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
Date
Apr 24, 2007, 08:40 UTC
Message-ID
<20070424084037.GA8906@informatik.uni-freiburg.de>
In-Reply-To
<20070424073907.GA22121@diana.vm.bytemark.co.uk>
Hello Karl,
Karl Hasselström wrote:
Show 14 quoted lines
> import-tars behaves very oddly when I try to import the Subversion
> tarballs. (For example,
> http://subversion.tigris.org/downloads/subversion-1.4.3.tar.bz2
> triggers this problem.) It creates two toplevel directories,
> subversion-1.4.3 and subversion-1.4.3subversion. The former seems to
> contain at least almost all files; the latter has only a handful of
> files, all with very long names.
> 
> When I unpack it with GNU tar, I get all the files under a single
> "subversion-1.4.3" directory, as expected.
> 
> Could it simply be that import-tars can't handle long filenames
> somehow? (This is pure speculation, since I know absolutely nothing
> about the tar format.)

I don't know much, but there are two locations that make up the name (i.e. prefix + name). Can you try the following patch:

---
 contrib/fast-import/import-tars.perl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/contrib/fast-import/import-tars.perl b/contrib/fast-import/import-tars.perl
index 5585a8b..5f3f742 100755
--- a/contrib/fast-import/import-tars.perl
+++ b/contrib/fast-import/import-tars.perl
@@ -64,7 +64,7 @@ foreach my $tar_file (@ARGV)
 		}
 		print FI "\n";
 
-		my $path = "$prefix$name";
+		my $path = "$prefix/$name";
 		$files{$path} = [$next_mark++, $mode];
 
 		$commit_time = $mtime if $mtime > $commit_time;
-- 
1.5.1.1.190.g74474

If it works, we still need a commit log ...

Best regards
Uwe

-- 
Uwe Kleine-König

http://www.google.com/search?q=5%2B7
Previous: Michael LoefflerNext: Karl Hasselström
Message 3 of 8 in “Bug?: import-tars misbehaves on Subversion tarballs”
  1. Karl HasselströmApr 24, 2007
  2. Michael LoefflerApr 24, 2007
  3. Uwe Kleine-KönigApr 24, 2007
  4. Karl HasselströmApr 24, 2007
  5. [import-tars] fix importing of subversion tarsUwe Kleine-König, Apr 24, 2007
  6. Karl HasselströmApr 24, 2007
  7. Karl HasselströmApr 24, 2007
  8. Shawn O. PearceApr 24, 2007

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.