threads / discuss / 29598

git svn problem

Subject: git svn problem

## tl;dr

4 messages between Feb 10, 2012 and Feb 11, 2012.

replies: 3people: 2as markdown or json

Serhat Sevki Dincer· Feb 10, 2012, 18:15 UTC · lore
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· Feb 10, 2012, 21:21 UTC · re: Serhat Sevki Dincer · lore

Re: git svn problem

On 2/10/12 10:15 AM, Serhat Sevki Dincer wrote:
Show 8 quoted lines
> 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· Feb 11, 2012, 00:52 UTC · re: Sam Vilain · lore

Re: git svn problem

On Fri, Feb 10, 2012 at 11:21 PM, Sam Vilain <sam@vilain.net> wrote:
Show 6 quoted lines
> 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· Feb 11, 2012, 10:19 UTC · re: Serhat Sevki Dincer · lore

Re: git svn problem

Ok, I figured out the rest, in case someone needs it:
Show 8 quoted lines
> 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

← back to recent threads