git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Initializing svn repo from git
@ 2007-03-16 21:40 Chris Riddoch
  2007-03-24 22:35 ` Eric Wong
  0 siblings, 1 reply; 2+ messages in thread
From: Chris Riddoch @ 2007-03-16 21:40 UTC (permalink / raw
  To: git

Hi, folks.  This is probably targeted at Eric Wong, but any assistance
is welcome.  I asked on #git, and decideded that a larger audience
might be interested in this question, and whatever its answer turns
out to be.

I've been working on a project, and tracking its history in git.  Due
to lack of windows support, and windows-only developers joining my
project, my higher-ups decided that we needed to use SVN.  I expect
I'll probably use git-svn, myself, but I'm faced with a task:

I need to use the contents of my git repository, which is *very*
linear with only one branch, to fill in some history for a new, empty
svn repository.

My current steps, which isn't complete (identifiers cleaned out to
protect... well, me.)

$ git svn init  svn://server/project project
$ cd project
project$ git svn fetch
Fetching git-svn
r0 = df2d1a798e85c75b9abbfd22fe06ff651a8fa9dd
project$ git pull /git/project
warning: no common commits
remote: Generating pack...
remote: Done counting 850 objects.
remote: Deltifying 850 objects.
...

project$ git log
commit <sha>
Merge: <sha>... <sha>...
Author: Chris Riddoch
Date: Fri Mar 16 15:13:58 2007 -0600

    Merge /git/project/

commit <sha>
Author: (no author) <(no author)@641bd306-a92b-0410-b27c-7dcbb122c54d>
Date:   Wed Mar 14 20:41:10 2007 +0000

    git-svn-id: svn://server/project@0 641bd306-a92b-0410-b27c-7dcbb122c54d

commit <sha>
Author: Chris Riddoch
Date:   Tue Mar 13 13:54:21 2007 -0600

    Most recent commit

<skipping a bunch>

commit <sha>
Author: Chris Riddoch
Date:   Thu Feb 1 10:55:42 2007 -0700

    Initial commit of project



Um... now what?  Can someone walk me through this?

Oh, how I wish for a native Windows version of git.  That's the
*right* solution, I know.

-- 
epistemological humility
  Chris Riddoch

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

* Re: Initializing svn repo from git
  2007-03-16 21:40 Initializing svn repo from git Chris Riddoch
@ 2007-03-24 22:35 ` Eric Wong
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Wong @ 2007-03-24 22:35 UTC (permalink / raw
  To: Chris Riddoch; +Cc: git

Chris Riddoch <riddochc@gmail.com> wrote:
> Hi, folks.  This is probably targeted at Eric Wong, but any assistance

In that case, feel free to Cc: me so I see it sooner :)

> is welcome.  I asked on #git, and decideded that a larger audience
> might be interested in this question, and whatever its answer turns
> out to be.
> 
> I've been working on a project, and tracking its history in git.  Due
> to lack of windows support, and windows-only developers joining my
> project, my higher-ups decided that we needed to use SVN.  I expect
> I'll probably use git-svn, myself, but I'm faced with a task:
> 
> I need to use the contents of my git repository, which is *very*
> linear with only one branch, to fill in some history for a new, empty
> svn repository.
> 
> My current steps, which isn't complete (identifiers cleaned out to
> protect... well, me.)
> 
> $ git svn init  svn://server/project project
> $ cd project
> project$ git svn fetch
> Fetching git-svn
> r0 = df2d1a798e85c75b9abbfd22fe06ff651a8fa9dd

With completely linear history, you can probably use grafts and add
df2d1a798e85c75b9abbfd22fe06ff651a8fa9dd as a parent of your original,
initial commit.   Afterwards, running dcommit should just work.  (I've
never tried this, though).

> project$ git pull /git/project
> warning: no common commits
> remote: Generating pack...
> remote: Done counting 850 objects.
> remote: Deltifying 850 objects.
> ...
> 
> project$ git log
> commit <sha>
> Merge: <sha>... <sha>...
> Author: Chris Riddoch
> Date: Fri Mar 16 15:13:58 2007 -0600
> 
>    Merge /git/project/
> 
> commit <sha>
> Author: (no author) <(no author)@641bd306-a92b-0410-b27c-7dcbb122c54d>
> Date:   Wed Mar 14 20:41:10 2007 +0000
> 
>    git-svn-id: svn://server/project@0 641bd306-a92b-0410-b27c-7dcbb122c54d
> 
> commit <sha>
> Author: Chris Riddoch
> Date:   Tue Mar 13 13:54:21 2007 -0600
> 
>    Most recent commit
> 
> <skipping a bunch>
> 
> commit <sha>
> Author: Chris Riddoch
> Date:   Thu Feb 1 10:55:42 2007 -0700
> 
>    Initial commit of project
> 
> 
> 
> Um... now what?  Can someone walk me through this?

That will probably force you to discard your git-only history
in SVN or have you duplicate history, neither is what you want.
If it's not too late; I recommend you start over with the
above instructions.

-- 
Eric Wong

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

end of thread, other threads:[~2007-03-24 22:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-16 21:40 Initializing svn repo from git Chris Riddoch
2007-03-24 22:35 ` Eric Wong

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).