From: B Smith-Mannschott <bsmith.occs@gmail.com>
To: Bruno Harbulot <Bruno.Harbulot@manchester.ac.uk>
Cc: git@vger.kernel.org, Eric Wong <normalperson@yhbt.net>
Subject: Re: Efficient cloning from svn (with multiple branches/tags subdirs)
Date: Thu, 15 Oct 2009 19:29:58 +0200 [thread overview]
Message-ID: <28c656e20910151029s2e053f75q56e968f313d12b21@mail.gmail.com> (raw)
In-Reply-To: <4AD75A93.9050106@manchester.ac.uk>
On Thu, Oct 15, 2009 at 19:23, Bruno Harbulot
<Bruno.Harbulot@manchester.ac.uk> wrote:
> Hello,
>
> Avery Pennarun wrote:
>>
>> On Wed, Oct 14, 2009 at 2:00 PM, Eric Wong <normalperson@yhbt.net> wrote:
>>>
>>> Avery Pennarun <apenwarr@gmail.com> wrote:
>>>>
>>>> I've been thinking about this myself for some time. One option that
>>>> might be "interesting" would be to just grab the *entire* svn tree
>>>> (from the root), and then use git-subtree[1] to slice and dice it into
>>>> branches using your local copy of git (which is fast and uses no
>>>> bandwidth) instead of during the svn fetch (which is slow and uses
>>>> lots of bandwidth). I think it would also simplify the git-svn code
>>>> quite a lot, at least for fetching, since there would always be a
>>>> global view of the tree and SVN things like "copy branch A to tag B"
>>>> would just be exactly that.
>>>
>>> This was actually the original use case of git svn back when I started.
>>>
>>> git svn clone SVNREPO_ROOT (without --stdlayout)
>>>
>>> It's still an option if you have the disk space for the working copies,
>>> but I had to create the branches/tags support since the working copies
>>> would be become prohibitively large. If git-subtree could be
>>> taught to work on a bare repo (git svn has a --no-checkout option)
>>> it might be an option, too.
>
> Thank you for your suggestions. Unfortunately, I'm not really familiar with
> git-subtree and how it could work with git-svn, sorry.
>
> I've tried another workaround: using svnsync to pull the repository only
> once, and only then using git-svn fetch, locally, so as to avoid too much
> network traffic (I don't mind too much if it loops locally). I was hoping to
> be able to change the URL of the repository to the original one afterwards,
> but it doesn't seem to work so easily, because of the commit IDs. I'm
> assuming not having the same will cause problems for further fetches (this
> time directly from the original SVN repository) and for potential dcommits.
>
> When I do this:
> git init
> git svn init -s --prefix=svn/ file:///path/to/local/restlet-svnroot
> git svn fetch -r 1:2
>
> I get this ID, for example:
> r2 = c69a0b98d288a6e4e8779b50962b7fc65c4622e8
>
> If I do this using the original http://restlet.tigris.org/svn/restlet, I get
> this:
> r2 = ce3b82915e92fe1ccf6ddedacd9d74b30bd4de86
>
>
> I've even tried to install a Apache-based subversion server locally and make
> it believe it was restlet.tigris.org (by editing /etc/hosts and creating the
> appropriate VirtualHost), but this generates another SHA1 ID. (That's of
> course not a solution that would be generalisable.)
>
> I've had a quick look at the git-svn code to see how this ID was generated,
> but couldn't find anything obvious.
> I realise this isn't the cleanest approach possible, but any suggestion
> would be appreciated.
When I 'git svn clone' from a svnsync mirror I pass
--use-svnsync-props. Have you tried that?
// Ben
next prev parent reply other threads:[~2009-10-15 17:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-13 18:13 Efficient cloning from svn (with multiple branches/tags subdirs) Bruno Harbulot
2009-10-14 6:03 ` Eric Wong
2009-10-14 9:07 ` Bruno Harbulot
2009-10-14 16:28 ` Avery Pennarun
2009-10-14 18:00 ` Eric Wong
2009-10-14 18:26 ` Avery Pennarun
2009-10-15 17:23 ` Bruno Harbulot
2009-10-15 17:29 ` B Smith-Mannschott [this message]
2009-10-16 11:20 ` Bruno Harbulot
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=28c656e20910151029s2e053f75q56e968f313d12b21@mail.gmail.com \
--to=bsmith.occs@gmail.com \
--cc=Bruno.Harbulot@manchester.ac.uk \
--cc=git@vger.kernel.org \
--cc=normalperson@yhbt.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 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).