# git-svnexport

2 messages from 2007-07-03 to 2007-07-05. Participants: Steve French, Patrick Doyle.
Thread: https://gitlist.dev/t/8841

## Steve French, 2007-07-03 19:31

Subject: git-svnexport
Message-ID: <524f69650707031231y2ab7b9a3o7769f64b9876326@mail.gmail.com>
URL: https://gitlist.dev/e/524f69650707031231y2ab7b9a3o7769f64b9876326%40mail.gmail.com

```
I noticed a git-svnexport, but don't see an easy way to do the more
common task ... export a replica (via svn) of a kernel directory whose
master copy is in git (no changes come through svn, all changes come
through git).

The Samba team (jra and others) use svn and would like me to keep more
uptodate the svn branch (which I sync manually now by applying the
patches from the kernel git tree by hand) for the two cifs git trees.
Basically I need to do something like:

git log fs/cifs
save off each of the commits which hit fs/cifs which are not in the svn tree yet
patch and "svn checkin" each of the commits to the svn tree


Has anyone done any scripts to --- export -- to an svn tree from part
of a git tree?
I don't want to go to having my svn tree as the master and import into
git from svn.



-- 
Thanks,

Steve

```

## Patrick Doyle, 2007-07-05 13:50

Subject: Re: git-svnexport
Message-ID: <e2a1d0aa0707050650m729018f0x9e355ed23e8156af@mail.gmail.com>
URL: https://gitlist.dev/e/e2a1d0aa0707050650m729018f0x9e355ed23e8156af%40mail.gmail.com
In-Reply-To: <524f69650707031231y2ab7b9a3o7769f64b9876326@mail.gmail.com>

```
On 7/3/07, Steve French <smfrench@gmail.com> wrote:
> I noticed a git-svnexport, but don't see an easy way to do the more
> common task ... export a replica (via svn) of a kernel directory whose
> master copy is in git (no changes come through svn, all changes come
> through git).
>
> The Samba team (jra and others) use svn and would like me to keep more
> uptodate the svn branch (which I sync manually now by applying the
> patches from the kernel git tree by hand) for the two cifs git trees.
> Basically I need to do something like:
>
> git log fs/cifs
> save off each of the commits which hit fs/cifs which are not in the svn tree yet
> patch and "svn checkin" each of the commits to the svn tree
>
>
> Has anyone done any scripts to --- export -- to an svn tree from part
> of a git tree?
> I don't want to go to having my svn tree as the master and import into
> git from svn.
>
If you're interested I (may) have attached a script I was using to
learn how to import a git maintained project into a subversion
maintained project.  It is obviously a "play with this and try this
out" script, not a production script in any sense of the word, but it
might help point you in the direction you want to go.

The gist of the script is that I used .git/info/grafts to graft the
chain of git commits from my other project onto the most recent commit
from the svn maintained project (fetched via "git-svn clone") and then
I committed the result back to SVN.  All of the cruft around that is
simply, "blow away what I tried before and start from scratch all over
again" cruft I used when I was testing the concept.

hth

--wpd

```
