git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: H Krishnan <hetchkay@gmail.com>
To: git@vger.kernel.org
Subject: Using git-svn fetch after a directory change with rewrite-root
Date: Mon, 8 Aug 2011 08:56:31 +0530	[thread overview]
Message-ID: <CANWsHyfHtr0EaJtNsDK9UTcmb_AbLg-1jUA-0uWJ-nEeNosb7w@mail.gmail.com> (raw)

Hi,
We use git-svn to sync with SVN. We set the "rewrite-root" attribute
to a dummy URL as different people use different SVN mirrors to update
their git repository. Recently, the trunk directory in SVN was
renamed. After this, with git version 1.7.3 or later, we are not able
to fetch. We get an SVN error ("RA layer request failed: ...: 200
OK"). git version 1.7.0 seemed to work OK. On debugging further, I
found that in the following lines, $url has the rewrite-root prefix
whereas $gs->full_url has the actual url prefix and thus the "last if"
fails.

while (1) {
	# It is possible to tag two different subdirectories at
	# the same revision.  If the url for an existing ref
	# does not match, we must either find a ref with a
	# matching url or create a new ref by growing a tail.
	$gs = Git::SVN->init($u, $p, $repo_id, $ref_id, 1);
	my (undef, $max_commit) = $gs->rev_map_max(1);
	last if (!$max_commit);
	my ($url) = ::cmt_metadata($max_commit);
	last if ($url eq $gs->full_url);
	$ref_id .= '-';
}
print STDERR "Initializing parent: $ref_id\n" unless $::_q > 1;

I wonder if commit 3235b7053c45a734c1cdf9b117bda68b7ced29c9 handles
rewrite-root correctly. Should the comparison be made with
$gs->metadata_url instead of $gs->full_url?

H. Krishnan

             reply	other threads:[~2011-08-08  3:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-08  3:26 H Krishnan [this message]
2011-08-10 13:22 ` Using git-svn fetch after a directory change with rewrite-root H Krishnan
2011-08-16 11:26   ` Michael Schubert
2011-08-20 19:18 ` Eric Wong
2011-09-01 20:54   ` Eric Wong

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=CANWsHyfHtr0EaJtNsDK9UTcmb_AbLg-1jUA-0uWJ-nEeNosb7w@mail.gmail.com \
    --to=hetchkay@gmail.com \
    --cc=git@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).