git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* How to use git-svnimport without trunk, tags and branches?
@ 2007-03-11 11:38 Georg Lohrer
  2007-03-11 14:36 ` Karl Hasselström
  0 siblings, 1 reply; 5+ messages in thread
From: Georg Lohrer @ 2007-03-11 11:38 UTC (permalink / raw)
  To: git

Hi,

I have searched the archive but did not found any hint for my problem.
Perhaps I did not have the right search pattern, but see yourself:

The most important thing prior of using git was to import my subversion
repositories. It seems to be quite easy if the SVN-repositories are of
common structure using the trunk, tags and branches structure.

But times ago I have had the idea of not using the traditional structure
of subversion for some of my repositories but using the repository
directly as single directory - no trunk, no tags, no branches. That was
because I thought only a geek would have the "complicated" way for only
a few files without any need for tags and branches.
And now the git-svnimport does not seem to be able to handle a SVN-repos
structure like mine:

~/svnrepos/
      |------- projectA
                  |---- foo.cpp
                  |---- foo.h

I want to import projectA into git _with_ the commit-history (there are
of course no tags and no branches).
Is there a way to do that with git-svnimport? Or do I have to throw away
all the details, checkout projectA and reimport it as initial version
with git?

Any hints are warmly appreciated.

Ciao, Georg

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

* Re: How to use git-svnimport without trunk, tags and branches?
  2007-03-11 11:38 How to use git-svnimport without trunk, tags and branches? Georg Lohrer
@ 2007-03-11 14:36 ` Karl Hasselström
  2007-03-11 16:57   ` Georg Lohrer
  0 siblings, 1 reply; 5+ messages in thread
From: Karl Hasselström @ 2007-03-11 14:36 UTC (permalink / raw)
  To: Georg Lohrer; +Cc: git

On 2007-03-11 12:38:31 +0100, Georg Lohrer wrote:

> But times ago I have had the idea of not using the traditional
> structure of subversion for some of my repositories but using the
> repository directly as single directory - no trunk, no tags, no
> branches. That was because I thought only a geek would have the
> "complicated" way for only a few files without any need for tags and
> branches. And now the git-svnimport does not seem to be able to
> handle a SVN-repos structure like mine:
>
> ~/svnrepos/
>      |------- projectA
>                  |---- foo.cpp
>                  |---- foo.h
>
> I want to import projectA into git _with_ the commit-history (there
> are of course no tags and no branches). Is there a way to do that
> with git-svnimport? Or do I have to throw away all the details,
> checkout projectA and reimport it as initial version with git?

You could try something like this:

  trunk: svnrepos/projectA
  tags: svnrepos/dummytags
  branches: svnrepos/dummybranches

I haven't tested, but I think that kind of maneouver should work.

-- 
Karl Hasselström, kha@treskal.com
      www.treskal.com/kalle

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

* Re: How to use git-svnimport without trunk, tags and branches?
  2007-03-11 14:36 ` Karl Hasselström
@ 2007-03-11 16:57   ` Georg Lohrer
  2007-03-11 20:26     ` Karl Hasselström
  0 siblings, 1 reply; 5+ messages in thread
From: Georg Lohrer @ 2007-03-11 16:57 UTC (permalink / raw)
  To: Karl Hasselström; +Cc: git

Hi Karl,

Karl Hasselström schrieb:
  > You could try something like this:
> 
>   trunk: svnrepos/projectA
>   tags: svnrepos/dummytags
>   branches: svnrepos/dummybranches
> 
> I haven't tested, but I think that kind of maneouver should work.

yes, that does the trick. I use:

$ cd ~/tmp/git-test
$ tar xvfj fooRepos.tar.bz2
$ mv fooRepos foorRepos.svnrepos
$ svn mkdir file:///home/georg/tmp/git-test/fooRepos.svnrepos/dummytags
$ svn mkdir file:///home/georg/tmp/git-test/foorRepos.svnrepos/dummybranches
$ mkdir fooRepos.git; cd fooRepos.git
$ git-svnimport -b dummybranches -t dummytags -T projectA 
file:///home/georg/tmp/git-test/fooRepos.svnrepos

Unfortunately there was a bunch of directories  instead of a single 
projectA-directory. Do I have to repeat the above mentioned sequence for 
every directory (projectA, projectB, ...) or is there a simple way of 
git-svnimport'ing into an existing git-repository?

Nevertheless, if that is not possible, I could extract with your way 
the desired directories separately and keep the histories intact.

Regards, Georg

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

* Re: How to use git-svnimport without trunk, tags and branches?
  2007-03-11 16:57   ` Georg Lohrer
@ 2007-03-11 20:26     ` Karl Hasselström
  2007-03-12 15:10       ` pacco
  0 siblings, 1 reply; 5+ messages in thread
From: Karl Hasselström @ 2007-03-11 20:26 UTC (permalink / raw)
  To: Georg Lohrer; +Cc: git

On 2007-03-11 17:57:13 +0100, Georg Lohrer wrote:

> Karl Hasselström schrieb:
>
> > You could try something like this:
> >
> >  trunk: svnrepos/projectA
> >  tags: svnrepos/dummytags
> >  branches: svnrepos/dummybranches
>
> yes, that does the trick. I use:
>
> $ cd ~/tmp/git-test
> $ tar xvfj fooRepos.tar.bz2
> $ mv fooRepos foorRepos.svnrepos
> $ svn mkdir file:///home/georg/tmp/git-test/fooRepos.svnrepos/dummytags
> $ svn mkdir file:///home/georg/tmp/git-test/foorRepos.svnrepos/dummybranches
> $ mkdir fooRepos.git; cd fooRepos.git
> $ git-svnimport -b dummybranches -t dummytags -T projectA file:///home/georg/tmp/git-test/fooRepos.svnrepos

Did you try importing without creating the dummy* directories? I think
it may work even if they don't exist.

> Unfortunately there was a bunch of directories instead of a single
> projectA-directory. Do I have to repeat the above mentioned sequence
> for every directory (projectA, projectB, ...) or is there a simple
> way of git-svnimport'ing into an existing git-repository?

You could try this:

  trunk: dummy
  tags: dummy
  branches: svnrepos

That should turn svnrepos/projectA into the branch projectA,
svnrepos/projectB into the branch projectB, and so on.

-- 
Karl Hasselström, kha@treskal.com
      www.treskal.com/kalle

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

* Re: How to use git-svnimport without trunk, tags and branches?
  2007-03-11 20:26     ` Karl Hasselström
@ 2007-03-12 15:10       ` pacco
  0 siblings, 0 replies; 5+ messages in thread
From: pacco @ 2007-03-12 15:10 UTC (permalink / raw)
  To: Karl Hasselström; +Cc: git

Zitat von Karl Hasselström <kha@treskal.com>:

> You could try this:
> 
>   trunk: dummy
>   tags: dummy
>   branches: svnrepos
> 
No, it does not do that. Instead I got a huge amount of errors as with giving no
details at all (passing only the non-standard svn-repository).

But, I fixed the way around now, by scrutinizing through the history and looking
for essential parts. I checkedout the specific versions seperately and rebuild
the history by cg-add'ing the file-versions one after the other. The hard way,
but there were not many really important files.

So, thank you a lot for passing me your help.

Ciao, Georg

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

end of thread, other threads:[~2007-03-12 15:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-11 11:38 How to use git-svnimport without trunk, tags and branches? Georg Lohrer
2007-03-11 14:36 ` Karl Hasselström
2007-03-11 16:57   ` Georg Lohrer
2007-03-11 20:26     ` Karl Hasselström
2007-03-12 15:10       ` pacco

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).