All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Wong <normalperson@yhbt.net>
To: Sam Vilain <sam@vilain.net>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 1/5] git-svn: make test for SVK mirror path import
Date: Tue, 5 Dec 2006 00:40:05 -0800	[thread overview]
Message-ID: <20061205084005.GA27236@soma> (raw)
In-Reply-To: <20061205051738.16552.8987.stgit@localhost>

Sam Vilain <sam@vilain.net> wrote:
> From:  <sam@vilain.net>
> 
> A manual test that sets up a repository that looks like an SVK depot,
> and then imports it to check that it looks like we mirrored the
> 'original' source.
> 
> There is also a minor modification to the git-svn test library shell
> file which sets a variable for the subversion repository's filesystem
> path.
> ---
> 
>  t/lib-git-svn.sh                   |    3 -
>  t/t9107-git-svn-svk-mirrorpaths.sh |   92 ++++++++++++++++++++++++++++++++++++
>  2 files changed, 93 insertions(+), 2 deletions(-)
> 
> diff --git a/t/lib-git-svn.sh b/t/lib-git-svn.sh
> index 63c6703..dffd1fb 100644
> --- a/t/lib-git-svn.sh
> +++ b/t/lib-git-svn.sh
> @@ -45,6 +45,5 @@ else
>  	svnadmin create "$svnrepo"
>  fi
>  
> +rawsvnrepo="$svnrepo"
>  svnrepo="file://$svnrepo"
> -
> -
> diff --git a/t/t9107-git-svn-svk-mirrorpaths.sh b/t/t9107-git-svn-svk-mirrorpaths.sh
> new file mode 100755
> index 0000000..130e786
> --- /dev/null
> +++ b/t/t9107-git-svn-svk-mirrorpaths.sh
> @@ -0,0 +1,92 @@
> +#!/bin/sh
> +#
> +# Copyright (c) 2006 Eric Wong

Huh? I didn't write this test.

> +test_description='git-svn on SVK mirror paths'
> +. ./lib-git-svn.sh
> +
> +if test -n "$GIT_SVN_NO_LIB" && test "$GIT_SVN_NO_LIB" -ne 0
> +then
> +	echo 'Skipping: only implemented with SVN libraries'
> +	test_done
> +	exit 0
> +fi
> +
> +# ok, people who don't have SVK installed probably don't care about
> +# this test.
> +
> +# we set up the repository manually, because even if SVK is installed
> +# it is difficult to use it in a way that is idempotent.
> +
> +# we are not yet testing merge tickets..
> +
> +uuid=b00bface-b1ff-c0ff-f0ff-b0bafe775e1e 
> +url=https://really.slow.server.com/foobar 

I had to use --whitespace=strip with git-am above.

> +test_expect_success 'multi-fetch an SVK mirror path' "git-svn multi-fetch"

I had to use the following patch to get the multi-fetch test to pass
with GIT_SVN_DELTA_FETCH=1. (I discovered it while running make -C t
full-svn-test)

Is it safe to assume that svk-mirrored URLs will _always_ be file://?
If so, then the delta fetching code should never be needed.

--- a/git-svn.perl
+++ b/git-svn.perl
@@ -3017,8 +3017,7 @@ sub libsvn_fetch_delta {
 	my $ed = SVN::Git::Fetcher->new({ c => $last_commit, q => $_q });
 	my $reporter = $SVN->do_update($rev, '', 1, $ed, $pool);
 	my @lock = $SVN::Core::VERSION ge '1.2.0' ? (undef) : ();
-	my (undef, $last_rev, undef) = cmt_metadata($last_commit);
-	$reporter->set_path('', $last_rev, 0, @lock, $pool);
+	$reporter->set_path('', ($rev - 1), 0, @lock, $pool);
 	$reporter->finish_report($pool);
 	$pool->clear;
 	unless ($ed->{git_commit_ok}) {

Also, unconditionally setting ($rev - 1) in the above patch disables the
ability to do squashed history[1] imports (not sure if anybody cares about
them, though).

[1] - like shallow clone, but shallow in the middle of history

> +test_expect_success 'got tag history OK' "test \`git-log --pretty=oneline remotes/tags/blah-1.0 | wc -l \` = 3"

But the above test breaks this one...

-- 

  parent reply	other threads:[~2006-12-05  8:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-05  5:17 [PATCH 1/5] git-svn: make test for SVK mirror path import Sam Vilain
2006-12-05  5:17 ` [PATCH 4/5] git-svn: collect revision properties when fetching Sam Vilain
2006-12-05  5:17 ` [PATCH 2/5] git-svn: let libsvn_ls_fullurl return properties too Sam Vilain
2006-12-05  5:17 ` [PATCH 3/5] git-svn: collect SVK source URL on mirror paths Sam Vilain
2006-12-05  5:17 ` [PATCH 5/5] git-svn: re-map repository URLs and UUIDs on SVK " Sam Vilain
2006-12-05  8:58   ` Eric Wong
2006-12-07  0:20     ` Sam Vilain
2006-12-07 20:02       ` Eric Wong
2006-12-08 10:20         ` [PATCH] git-svn: use do_switch for --follow-parent if the SVN library supports it Eric Wong
2006-12-05  8:40 ` Eric Wong [this message]
2006-12-05 10:32 ` [PATCH 1/5] git-svn: make test for SVK mirror path import Jakub Narebski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20061205084005.GA27236@soma \
    --to=normalperson@yhbt.net \
    --cc=git@vger.kernel.org \
    --cc=sam@vilain.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.