# git svn problem

4 messages from 2012-02-10 to 2012-02-11. Participants: Serhat Sevki Dincer, Sam Vilain.
Thread: https://gitlist.dev/t/29598

## Serhat Sevki Dincer, 2012-02-10 18:15

Subject: git svn problem
Message-ID: <CAPqC6xRtZXwv+U6AKRUXDz=m-G4AjgWksbwqeMD_qzS8YC=DoQ@mail.gmail.com>
URL: https://gitlist.dev/e/CAPqC6xRtZXwv%2BU6AKRUXDz%3Dm-G4AjgWksbwqeMD_qzS8YC%3DDoQ%40mail.gmail.com

```
Hi,

I am using git-svn (1.7.4.1-3 on ubuntu) to get a project. It has two
svn repositories, apparently disjoint. First half is at
http://svn.plone.org/svn/plone/plone.app.locales, and the continuation
at http://svn.plone.org/svn/collective/plone.app.locales
How can i get a nice linear git-svn repository? the second one is the
new location of the project. I am only interested in the trunks btw.

Thanks..

```

## Sam Vilain, 2012-02-10 21:21

Subject: Re: git svn problem
Message-ID: <4F358A53.8010409@vilain.net>
URL: https://gitlist.dev/e/4F358A53.8010409%40vilain.net
In-Reply-To: <CAPqC6xRtZXwv+U6AKRUXDz=m-G4AjgWksbwqeMD_qzS8YC=DoQ@mail.gmail.com>

```
On 2/10/12 10:15 AM, Serhat Sevki Dincer wrote:
> Hi,
>
> I am using git-svn (1.7.4.1-3 on ubuntu) to get a project. It has two
> svn repositories, apparently disjoint. First half is at
> http://svn.plone.org/svn/plone/plone.app.locales, and the continuation
> at http://svn.plone.org/svn/collective/plone.app.locales
> How can i get a nice linear git-svn repository? the second one is the
> new location of the project. I am only interested in the trunks btw.

Import them separately to different git-svn remotes, and once they are 
in the same repository you can graft them together using 
.git/info/grafts (see man gitrepository-layout).  Once it looks right 
(check using 'gitk' etc), make it permanent using git filter-branch. 
You'll also want to remove the .git/svn directory, and re–run 'git svn 
fetch' so that git svn's revision database is recomputed.  Don't forget 
the -A option to 'git svn fetch'!

Good luck,
Sam

```

## Serhat Sevki Dincer, 2012-02-11 00:52

Subject: Re: git svn problem
Message-ID: <CAPqC6xSJ7pfUQJz8FQ743mJMNmZyfJfWxutOnt+FVkP76eXOGw@mail.gmail.com>
URL: https://gitlist.dev/e/CAPqC6xSJ7pfUQJz8FQ743mJMNmZyfJfWxutOnt%2BFVkP76eXOGw%40mail.gmail.com
In-Reply-To: <4F358A53.8010409@vilain.net>

```
On Fri, Feb 10, 2012 at 11:21 PM, Sam Vilain <sam@vilain.net> wrote:
> Import them separately to different git-svn remotes, and once they are in
> the same repository you can graft them together using .git/info/grafts (see
> man gitrepository-layout).  Once it looks right (check using 'gitk' etc),
> make it permanent using git filter-branch. You'll also want to remove the
> .git/svn directory, and re–run 'git svn fetch' so that git svn's revision
> database is recomputed.  Don't forget the -A option to 'git svn fetch'!

That sounds too complicated. There should be an easier way (i hope:)
I have the following at the moment:

rm -rf plone.app.locales ; mkdir plone.app.locales ; cd plone.app.locales
git svn init -T trunk http://svn.plone.org/svn/plone/plone.app.locales
touch start ; git add start ; git commit -m start
git svn fetch -r49624:HEAD
git rebase --onto master --root trunk --preserve-merges
git checkout -b plone

plone branch looks good, now I would like to do the same with
collective/plone.app.locales. I tried a couple of things but ended up
getting errors like:

Rebuilding .git/svn/refs/remotes/trunk/.rev_map.db7f04ef-aaf3-0310-a811-c281ed44c4ad
...
Done rebuilding
.git/svn/refs/remotes/trunk/.rev_map.db7f04ef-aaf3-0310-a811-c281ed44c4ad
RA layer request failed: REPORT of '/svn/collective/!svn/vcc/default':
Could not read chunk size: connection was closed by server
(http://svn.plone.org) at /usr/lib/git-core/git-svn line 5131

Is there some way around these errors?

Thanks..
Serhat

```

## Serhat Sevki Dincer, 2012-02-11 10:19

Subject: Re: git svn problem
Message-ID: <CAPqC6xR9LFgx4r1t0misYavPe8sky=VJf39N29CU-66Re7zL-Q@mail.gmail.com>
URL: https://gitlist.dev/e/CAPqC6xR9LFgx4r1t0misYavPe8sky%3DVJf39N29CU-66Re7zL-Q%40mail.gmail.com
In-Reply-To: <CAPqC6xSJ7pfUQJz8FQ743mJMNmZyfJfWxutOnt+FVkP76eXOGw@mail.gmail.com>

```
Ok, I figured out the rest, in case someone needs it:

> I have the following at the moment:
>
> rm -rf plone.app.locales ; mkdir plone.app.locales ; cd plone.app.locales
> git svn init -T trunk http://svn.plone.org/svn/plone/plone.app.locales
> touch start ; git add start ; git commit -m start
> git svn fetch -r49624:HEAD
> git rebase --onto master --root trunk --preserve-merges
> git checkout -b plone

# edit .git/config: s#/plone/#/collective/#  s#remotes/trunk#remotes/trunkcol#

git checkout master
git svn fetch -r248302:HEAD
git rebase --onto plone --root trunkcol --preserve-merges
git checkout -b collective
git branch -d master plone

```
