Subject: Re: [PATCH 0/2] [RFT] git-svn: more efficient revision -> commit mapping

From: Eric Wong <[email-masked]>
Date: Thu, 13 Dec 2007 08:30:03 -0800

Sam Vilain <[email-masked]> wrote:
> Eric Wong wrote:
> > Sam (or anybody else using useSvmProps:
> > 
> >   Do you have any feedback with svmProps enabled?
> 
> 3682645  120 -rw-rw-r--   1 samv     samv       121893 Dec 13 14:05
> tags/debian_version_1_2_0beta1@2972/.rev_db.d29f7b36-84ff-0310-85ce-ba787dbd31ca
> 
>  =>
> 
> -3683050    4 -rw-rw-r--   1 samv     samv           48 Dec 13 14:26
> ./tags/debian_version_1_2_0beta1@2972/.rev_map.d29f7b36-84ff-0310-85ce-ba787dbd31ca
> 
> git-log --all | grep git-svn | tail -3
> 
>     git-svn-id:
> file:///home/samv/.svk/local/mirror/fai/branches/source-dist@2971
> d29f7b36-84ff-0310-85ce-ba787dbd31ca
>     git-svn-id: svn+ssh://svn.debian.org/svn/fai/trunk@2
> ba5ec265-b0fb-0310-8e1a-cf9e4c2b1591
>     git-svn-id: svn+ssh://svn.debian.org/svn/fai/trunk@1
> ba5ec265-b0fb-0310-8e1a-cf9e4c2b1591
> 
> So, the remapping is still working fine.

Hi Sam, nice.

> The one that failed there is not a new bug.  Here's the fix anyway
> though :-)
> 
> Subject: [PATCH] git-svn: fix --use-svm-props and --follow-parent
> 
> If, when using --follow-parent, it finds that the parent is an SVM
> path, *and* the SVM path is not at the root of the corresponding SVN
> repository (the usual case when using SVK), then the logic in
> Git::SVN::ra will not find the correct source repository.  This is
> because the freshly created RA object is missing the path.  So, set
> this after creation.

This seems to break the non-useSvmProps case (in t9104).  I'll look more
at it later.

> Signed-off-by: Sam Vilain <[email-masked]>
> ---
>  git-svn.perl |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/git-svn.perl b/git-svn.perl
> index 54d7844..3e5fd82 100755
> --- a/git-svn.perl
> +++ b/git-svn.perl
> @@ -2189,6 +2189,7 @@ sub find_parent_branch {
>  		$ref_id .= '-' while find_ref($ref_id);
>  		print STDERR "Initializing parent: $ref_id\n";
>  		$gs = Git::SVN->init($new_url, '', $ref_id, $ref_id, 1);
> +		$gs->{path} = $branch_from;
>  	}
>  	my ($r0, $parent) = $gs->find_rev_before($r, 1);
>  	if (!defined $r0 || !defined $parent) {

-- 
Eric Wong