Re: Can I switch a git-svn clone from a file => http url?
- From
Björn Steinbrink <b.steinbrink@gmx.de>
- Date
- Apr 2, 2008, 15:17 UTC
- Message-ID
- <20080402151721.GA31738@atjola.homenet>
- In-Reply-To
- <p06240804c41942f6276e@[192.168.1.114]>
On 2008.04.02 10:38:34 -0400, Stephen Bannasch wrote:
Show 7 quoted lines
> 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.
I guess you should have used the --rewrite-root option when you did the clone. Then the metadata in the log entries would already point to the right URL and you could just adjust the URL in .git/config and drop the rewriteRoot entry there.
Show 7 quoted lines
> Is there an operation I can now do to switch the base url from: > > file:///Path/to/svn/repository/projects > > to > > https://svn.concord.org/svn/projects
Basically, this should work:
Change the URL to the repo in your .git/config. Use filter-branch to change all git-svn-id lines in the log entries. Delete the .rev_map.* files in .git/svn/* Run git svn fetch (rebuilds the .rev_map.* files).
The filter-branch call should use the --msg-filter option to change the log entries and should apply to all the svn branches/tags/trunk (or just use " -- --all", if there's nothing that may not be filtered).
HTH Björn