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

Re: [PATCH 1/2] git-svn: Fix merge detecting with rewrite-root

From
EWEric Wong <normalperson@yhbt.net>
Date
Feb 26, 2010, 09:43 UTC
Message-ID
<20100226094317.GA22579@dcvr.yhbt.net>
In-Reply-To
<1267034942-31581-1-git-send-email-tuomas.suutari@gmail.com>
Tuomas Suutari <tuomas.suutari@gmail.com> wrote:
Show 18 quoted lines
> Detecting of merges from svn:mergeinfo or svk merge tickets failed
> with rewrite-root option. This fixes it.
> 
> Signed-off-by: Tuomas Suutari <tuomas.suutari@gmail.com>
> ---
> Hi again,
> 
> now I found another problem while importing SVN repo with git-svn.
> 
> To speed-up the import, I copied the SVN repo with rsync to localhost
> and used file:// URL for the import, but because I want to be able to
> track the history with svn+ssh:// later, I used the rewrite-root
> option. That seemed to break the merge detecting.
> 
> With this patch the merge detecting works also with rewrite-root
> option, but since there are no comments why the $self->rewrite_root
> was used in the first place, I have no idea, if this is the right
> thing to do.
Hi Tuomas,

I'm not sure why rewrite_root is used here, either. Ignoring it seems correct but I'll wait for Sam to chime in.

Show 27 quoted lines
>  git-svn.perl |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/git-svn.perl b/git-svn.perl
> index 265852f..1cbddca 100755
> --- a/git-svn.perl
> +++ b/git-svn.perl
> @@ -2993,7 +2993,7 @@ sub find_extra_svk_parents {
>  	for my $ticket ( @tickets ) {
>  		my ($uuid, $path, $rev) = split /:/, $ticket;
>  		if ( $uuid eq $self->ra_uuid ) {
> -			my $url = $self->rewrite_root || $self->{url};
> +			my $url = $self->{url};
>  			my $repos_root = $url;
>  			my $branch_from = $path;
>  			$branch_from =~ s{^/}{};
> @@ -3201,7 +3201,7 @@ sub find_extra_svn_parents {
>  	# are now marked as merge, we can add the tip as a parent.
>  	my @merges = split "\n", $mergeinfo;
>  	my @merge_tips;
> -	my $url = $self->rewrite_root || $self->{url};
> +	my $url = $self->{url};
>  	my $uuid = $self->ra_uuid;
>  	my %ranges;
>  	for my $merge ( @merges ) {
> -- 
> 1.7.0.2.ged48
Previous: Tuomas SuutariNext: Tuomas Suutari
Message 3 of 7 in “git-svn: Fix merge detecting with rewrite-root”
  1. 1/2 git-svn: Fix merge detecting with rewrite-rootTuomas Suutari, Feb 24, 2010
  2. 2/2 t9150,t9151: Add rewrite-root option to initTuomas Suutari, Feb 24, 2010
  3. Eric WongFeb 26, 2010
  4. Tuomas SuutariMar 13, 2010
  5. Sam VilainMar 13, 2010
  6. Eric WongMar 13, 2010
  7. Junio C HamanoMar 13, 2010

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.