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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Karl,

Karl Hasselström wrote:
> 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
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]