Thread (7 messages) flat view 7 messages, 4 authors, 2016-06-15

Re: Can I switch a git-svn clone from a file => http url?

From: Stephen Bannasch <hidden>
Date: 2016-06-15 22:44:27

At 9:05 AM +0300 4/3/08, Teemu Likonen wrote:
Stephen Bannasch kirjoitti:
quoted
I've just created a git-svn clone from a svn repo accessed locally
with a file:/// path.

Unfortunately the local svn repo is just a copy of the main svn repo
normally accessed with http or https (served through Apache). I was
having problems cloning the main svn repository (more details below)
so I archived the remote svn repository and copied it to my local
hard drive.
2. Convert your repo again:

$ mkdir repo ; cd repo
$ git svn init --rewrite-root=http://... file:///...
$ git svn fetch

This way you'll create new Git repo from file:///... url but commit
messages will have git-svn-id's url pointing at http://... . After that
set the correct remote url to .git/config:

[svn-remote "svn"]
url = http://...
Thanks Teemu,

That took a while but worked.

I also removed the rewriteRoot line from config after editing the url.

I think I might have achieved the same effect more quickly with Björn's suggestion to use:

  git-filter-branch --msg-filter

to:
quoted
Use filter-branch to change all git-svn-id lines in the log entries.
But it wasn't clear to me how to change the git-svn-id lines.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help