git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mathias Lafeldt <misfire@debugon.org>
To: H Krishnan <hetchkay@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: svn repository URL and git
Date: Wed, 27 Oct 2010 17:31:58 +0200	[thread overview]
Message-ID: <4CC845EE.5040602@debugon.org> (raw)
In-Reply-To: <loom.20101027T170254-268@post.gmane.org>

H Krishnan wrote:
> Hi, 
> We have started using git and git-svn. 
> I was thrilled to see that two people cloning using "git svn clone" 
> from the same repository got the same sha1 IDs for the commits which 
> meant that each of us could sync with svn independently while still 
> being able to share code among ourselves. 
> But my excitement was shortlived as the sha1 IDs were different if we 
> refer to the svn server using an alias. For example, using 
> http://mysvnserver.mydomain.com/repos/myproject/trunk gave different 
> sha1 IDs from using http://mysvnserver/repos/myproject/trunk even 
> though both refer to the same repository. This also disallowed using 
> mirrors of the repository for cloning. 
> Apparently the sha1 ID is generated from the full path of the URL. 
> Instead of this, could git-svn init be made to accept an optional 
> "prefix" argument as well which is filtered out of the URL before 
> building the sha1 ID. This will allow easy support for the oft 
> requested support for "svn switch --relocate". How much of an effort 
> is this? I don't know perl or git internals well enough for me to take 
> a stab at it but I am willing to learn if someone can give me some 
> pointers. 
> Krishnan

The problem is the "git-svn-id" which is automatically appended to each
commit done with git-svn. This ID consists of the URL and the UUID of
the corresponding SVN repository. A different git-svn-id value results
in a different commit SHA1 (i.e. a different commit to git).

I guess git-svn's --rewrite-root option might help here. Also, you have
to make sure that your SVN repos have the same UUID (with svnadmin
setuuid), of course.

-Mathias

  reply	other threads:[~2010-10-27 15:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-27 15:05 svn repository URL and git H Krishnan
2010-10-27 15:31 ` Mathias Lafeldt [this message]
2010-10-27 16:15   ` H Krishnan
2010-10-28 16:58     ` H Krishnan
2010-10-28 19:02       ` Ulrich Spörlein
2010-10-28 19:31         ` Mathias Lafeldt
2010-10-28 19:37           ` Ulrich Spörlein
2010-10-29  3:07           ` H Krishnan

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=4CC845EE.5040602@debugon.org \
    --to=misfire@debugon.org \
    --cc=git@vger.kernel.org \
    --cc=hetchkay@gmail.com \
    /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).