Re: Why does git-svn redownload revisions?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Sep 8, 2010 at 10:19 AM, Brian Gernhardt
<benji@xxxxxxxxxxxxxxxxxx> 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`?
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]