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