git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

Previous: Johannes SchindelinNext: Stephen Bannasch
Message 3 of 7 in “Can I switch a git-svn clone from a file => http url?”
  1. Stephen BannaschApr 2, 2008
  2. Johannes SchindelinApr 2, 2008
  3. Björn SteinbrinkApr 2, 2008
  4. Stephen BannaschApr 3, 2008
  5. Björn SteinbrinkApr 5, 2008
  6. Teemu LikonenApr 3, 2008
  7. Stephen BannaschApr 4, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.