threads / discuss / 2531

A case for tailor

Subject: A case for tailor

## tl;dr

5 messages between Nov 15, 2005 and Nov 17, 2005.

replies: 4people: 3as markdown or json

Johannes Schindelin· Nov 15, 2005, 18:48 UTC · lore
Hi,

I was trying to import a project into git, the upstream of which is managed by Subversion. There has been a flurry of enhancements to git-svnimport, so I thought I´d give it a try.

Short version: it did not work.

Longer version: depending on the argument to "-T", it stopped right away, or it stopped after about 60 commits. Right at the beginning, a lot of warnings told me about some files not being where they were expected.

Possible explanation: at some early stage, the trunk was named "trunk", but somehow (don´t ask me how, I am a fan of git, not svn) renamed to "head".

Well, could also be cygwin, which I am stuck with in my office. 

BTW, I noticed that the manpage tells me that "-t" should be used to specify the trunk, but the program (and it´s usage message) disagree.

Enter tailor. It is a program written in python, which is meant to convert repositories between different SCM formats. It was mentioned some time ago on this list, supports svn import and git export, so I thought I´d give that a try.

Short version: it worked.

Longer version: I had to fix a little bug which made git ignore the author_date (only to find that this had been fixed in the current devel version of tailor), had to make sure .git/info existed, and I added a dirty workaround to git so that empty commits would not lead to a screeching halt of the conversion.

Comparing the speeds, I´d also say that they are comparable, maybe git-svnimport is just a tad faster (until it fscks up).

I am right now trying to convert tailor´s repository (since I don´t like to keep it in the darcs (pun intended) format). However there is still a little problem with darcs, which is probably a problem with the operating system.

Just wanted to let people know...

Ciao, Dscho

Martin Langhoff· Nov 15, 2005, 20:59 UTC · re: Johannes Schindelin · lore

Re: A case for tailor

On 11/16/05, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> Just wanted to let people know...

I've checked out tailor a while ago, and it seems a quite capable tool. Even bounced a few emails with the author, because I thought that we could perhaps deprecate our imports scripts. It _is_ good, and seems to have a cool community around it.

The short of it is that tailor won't do branches. So for trivial single-line-of-development projects, you're fine with it, probably even happier than with our import scripts. Sadly, none of the projects I've worked in the last 6 years fall into that category ;-)

cheers,
martin
Johannes Schindelin· Nov 15, 2005, 21:43 UTC · re: Martin Langhoff · lore

Re: A case for tailor

Hi,
On Wed, 16 Nov 2005, Martin Langhoff wrote:
> The short of it is that tailor won't do branches. So for trivial
> single-line-of-development projects, you're fine with it, probably
> even happier than with our import scripts.  Sadly, none of the
> projects I've worked in the last 6 years fall into that category ;-)

I wasn´t aware of that. However, I am luckier than you are: only a few release+bugfix branches, none of which are of interest right now.

Ciao, Dscho

Matthias Urlichs· Nov 16, 2005, 23:40 UTC · re: Johannes Schindelin · lore

Re: A case for tailor

Hi, Johannes Schindelin wrote:
> Possible explanation: at some early stage, the trunk was named "trunk", 
> but somehow (don´t ask me how, I am a fan of git, not svn) renamed to 
> "head".

Well, you *could* use "-T trunk" to import the first part, ^C when it starts complaining about 'head', duplicate the last line of .git/svn2git (incrementing the SVN change number), and continue with "-T head".

That hackery sortof depends on Upstream not changing anything *else* while renaming 'trunk' to 'head' ...

Of course, the second possibility is to allow patterns as prefixes, drop the distinction of "trunk" and "branch", and store the refs as full paths under .git/refs/heads/**. You're welcome to submit a patch; please don't forget backwards compatibility for those poor souls who need to do incremental imports. ;-)

-- 
Matthias Urlichs   |   {M:U} IT Design @ m-u-it.de   |  smurf@smurf.noris.de
Disclaimer: The quote was selected randomly. Really. | http://smurf.noris.de
 - -
Got a dictionary?  I want to know the meaning of life.
Johannes Schindelin· Nov 17, 2005, 12:02 UTC · re: Matthias Urlichs · lore

Re: A case for tailor

Hi,
On Thu, 17 Nov 2005, Matthias Urlichs wrote:
Show 18 quoted lines
> Hi, Johannes Schindelin wrote:
> 
> > Possible explanation: at some early stage, the trunk was named "trunk", 
> > but somehow (don´t ask me how, I am a fan of git, not svn) renamed to 
> > "head".
> 
> Well, you *could* use "-T trunk" to import the first part, ^C when it
> starts complaining about 'head', duplicate the last line of .git/svn2git
> (incrementing the SVN change number), and continue with "-T head".
> 
> That hackery sortof depends on Upstream not changing anything *else* while
> renaming 'trunk' to 'head' ...
> 
> Of course, the second possibility is to allow patterns as prefixes, drop
> the distinction of "trunk" and "branch", and store the refs as full
> paths under .git/refs/heads/**. You're welcome to submit a patch; please
> don't forget backwards compatibility for those poor souls who need to do
> incremental imports. ;-)
;-), too.

It is not *that* important for me, as that particular project is linear. It is not even important to convert it to git, but I like to pickaxe the source (why not let the machine do the work for you?).

So I will probably not work on svn->git end any more...

Ciao, Dscho

← back to recent threads