All of lore.kernel.org
 help / color / mirror / Atom feed
* Adding Missing Tags to a Repository
@ 2013-02-06  4:45 Neil
  2013-02-06 11:18 ` Michael J Gruber
  0 siblings, 1 reply; 2+ messages in thread
From: Neil @ 2013-02-06  4:45 UTC (permalink / raw)
  To: git

Hi everyone,

A while back I did a svn-to-git migration for my team. Our subversion
repository had about 30K+ commits, 100+ branches, 2K+ tags, all made
over a 20+ year period. I was doing the migration using git-svn, and
my big problem was the tags. git-svn seemed to want to traverse the
entire history of each tag, which was taking a long time. Because time
and resources were limited, I ended up just migrating the branches and
trunk, with the idea that I would handle the tags at a later date. My
original plan to do that was to crawl the subversion log, find where
the tags were made, and apply a git tag to the commit that was the
source of the tag. This was a bad idea.

I've found that over the years, people have made tags that are only
subdirectories of the source tree, made tags off of other tags, and
committed to tags. The latter is the biggest problem, since those
commits don't seem to be stored in the git repository because they
never appeared in the branches/trunk.

So, I'm wondering what my options are to bring back this history. One
idea is to somehow resume the git-svn download, but changing it to
also scan tags (it sounds like it should be possible, but I haven't
tried it yet). Or maybe there's some other tool that will more quickly
clone the repository including tags, and then I can somehow splice the
tags back into the repository we're already using?

Any ideas or suggestions?

Thanks!

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Adding Missing Tags to a Repository
  2013-02-06  4:45 Adding Missing Tags to a Repository Neil
@ 2013-02-06 11:18 ` Michael J Gruber
  0 siblings, 0 replies; 2+ messages in thread
From: Michael J Gruber @ 2013-02-06 11:18 UTC (permalink / raw)
  To: Neil; +Cc: git

Neil venit, vidit, dixit 06.02.2013 05:45:
> Hi everyone,
> 
> A while back I did a svn-to-git migration for my team. Our subversion
> repository had about 30K+ commits, 100+ branches, 2K+ tags, all made
> over a 20+ year period. I was doing the migration using git-svn, and
> my big problem was the tags. git-svn seemed to want to traverse the
> entire history of each tag, which was taking a long time. Because time
> and resources were limited, I ended up just migrating the branches and
> trunk, with the idea that I would handle the tags at a later date. My
> original plan to do that was to crawl the subversion log, find where
> the tags were made, and apply a git tag to the commit that was the
> source of the tag. This was a bad idea.
> 
> I've found that over the years, people have made tags that are only
> subdirectories of the source tree, made tags off of other tags, and
> committed to tags. The latter is the biggest problem, since those
> commits don't seem to be stored in the git repository because they
> never appeared in the branches/trunk.

I think it's fair to say that svn encourages the abuse of tags ;)

I've cleaned up other people's mis-tags myself, and it's no fun. If the
tree layout is messed up then git-svn will often create a new root
commit, so that you have to stitch the history yourself.

In the case of "correct" tags, you're often better of converting the tag
creating commit into an annotated tag, provided that the tree is unchanged.

Tags with tree changes are really branches, usually maintenance branches
after a proper tag.

> So, I'm wondering what my options are to bring back this history. One
> idea is to somehow resume the git-svn download, but changing it to
> also scan tags (it sounds like it should be possible, but I haven't
> tried it yet). Or maybe there's some other tool that will more quickly
> clone the repository including tags, and then I can somehow splice the
> tags back into the repository we're already using?
> 
> Any ideas or suggestions?
> 
> Thanks!
> 

If you add a git-svn refspec to your config and rerun git-svn fetch it
might rescan tags, although you may have to poke around to make it
rescan from revision 1.

Michael

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-02-06 11:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-06  4:45 Adding Missing Tags to a Repository Neil
2013-02-06 11:18 ` Michael J Gruber

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.