Re: git-svnimport breakage as of git-1.4.4

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

 



Hi,

On 10:26 Thu 07 Dec     , Daniel Drake wrote:
> 
> git-svnimport broken between git-1.4.3.5 and git-1.4.4
> 
> I have found that commit 83936a29e275bc0c04f60d3333e4951a9e16b1fc is the
> cause of this.
> 
> I am using git-svnimport to work with a repo with this layout:
> 
> https://server/repo/trunk
> https://server/repo/tags/x.y.z
> https://server/repo/branches/somebranch
> 
> Starting a fresh import:
> 
> # git-svnimport -v -i -C repo -r https://server repo

Is this 'server' public? Can I rerun this git-svnimport?

If not, please try the patch:


diff --git a/git-svnimport.perl b/git-svnimport.perl
index cbaa8ab..b9de446 100755
--- a/git-svnimport.perl
+++ b/git-svnimport.perl
@@ -210,6 +210,12 @@ $svn .= "/$svn_dir" if defined $svn_dir;
 my $svn2 = SVNconn->new($svn);
 $svn = SVNconn->new($svn);
 
+if($svn_dir) {
+	$svn_dir =~ s#/*$#/#;
+} else {
+	$svn_dir = "";
+}
+
 my $lwp_ua;
 if($opt_d or $opt_D) {
 	$svn_url = URI->new($svn_url)->canonical;
@@ -906,7 +912,7 @@ sub commit_all {
 	my ($changed_paths, $revision, $author, $date, $message, $pool) = @_;
 	my %p;
 	while(my($path,$action) = each %$changed_paths) {
-		$p{$path} = [ $action->action,$action->copyfrom_path, $action->copyfrom_rev, $path ];
+		$p{$path} = [ $action->action,$svn_dir$action->copyfrom_path, $action->copyfrom_rev, $svn_dir$path ];
 	}
 	$changed_paths = \%p;
 

Thanks,
Sasha
-
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]