From: Daniel Trebbien <dtrebbien@gmail.com>
To: Brian Gernhardt <benji@silverinsanity.com>
Cc: git@vger.kernel.org
Subject: Re: Why does git-svn redownload revisions?
Date: Wed, 8 Sep 2010 15:36:56 -0700 [thread overview]
Message-ID: <AANLkTinOTgB7HkeVdB-+ttvVMT1HFg91nt6pdD6Y_uML@mail.gmail.com> (raw)
In-Reply-To: <B1E94440-DDCA-4C10-A0EE-E08A66DF3D7E@silverinsanity.com>
On Wed, Sep 8, 2010 at 10:19 AM, Brian Gernhardt
<benji@silverinsanity.com> wrote:
> This happens when you have a tag or branch that is a subdirectory of trunk. It looks like tags/nano_2_1_1 is a branch off trunk/nano. Git-svn doesn't recognize that trunk/nano@4248 is a subdirectory of trunk@4248 so it starts downloading the complete history of trunk/nano again.
>
> I've encountered the same problem when importing other SVN repos. If nano is the only subdirectory in trunk, you can fix this by changing your .git/config like this:
>
> - fetch = trunk:refs/remotes/trunk
> + fetch = trunk/nano:refs/remotes/trunk
>
> This will cause issues if nano is not the only directory in trunk (it won't fetch the others) or if you have branches or tags that branch off the full trunk (you get the same problem).
>
> Or you can downloading both trunk and nano as separate branches. I think it fetches each revision twice, but it will prevent it from downloading the entire history for each subdirectory branch.
>
> fetch = trunk:refs/remotes/trunk
> + fetch = trunk/nano:refs/remotes/nano
>
> This will make your history look a little odd since trunk will have every commit that nano does but be a completely separate branch. (It also seems to confuse `git-svn find-rev`.)
>
> You can also speed imports like this by creating a local mirror with svnsync and using `git svn clone --use-svnsync-props file:///local/mirror`. This probably isn't a good long term solution, but can be very handy when you're experimenting with getting it right. Once you have it set up as you like delete svn-remote.svn.useSvnsyncProps, change svn-remote.svn.url to the original URL, and delete the local mirror.
>
> I've been investigating altering the algorithm that finds branch points to understand branching off subdirectories, but haven't had the time. It's good to know that the Minix 3 repo isn't the only one that does it.
>
> ~~ Brian
Looking through the Nano repository, it appears that early tags were
copies of the entire trunk, but later tags (`nano_2_0_8` and onward)
were copies of just `trunk/nano`.
Is there a way that I can inform git-svn that tags `nano_2_0_8`,
`nano_2_0_9`, ... should all be based off of `remotes/trunk/nano`?
next prev parent reply other threads:[~2010-09-08 22:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-08 16:13 Why does git-svn redownload revisions? Daniel Trebbien
2010-09-08 17:19 ` Brian Gernhardt
2010-09-08 22:36 ` Daniel Trebbien [this message]
2010-09-08 23:50 ` Brian Gernhardt
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=AANLkTinOTgB7HkeVdB-+ttvVMT1HFg91nt6pdD6Y_uML@mail.gmail.com \
--to=dtrebbien@gmail.com \
--cc=benji@silverinsanity.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).