On 04/29/2010 10:14 PM, John Plevyak wrote:

When this happens if you could send out a note on how to update
svn and git trees that would be great.  I know how to do git myself
but I am sure there are others who would be interested.

SVN URL: https://svn.apache.org/repos/asf/trafficserver/
--------------

Change directory into your working area (top-level), and run

    svn switch https://svn.apache.org/repos/asf/trafficserver/

This is basically identical to "checkout", so it will update your tree, and change the base URL, all at the same time. If you get an error, make sure you have all the branches and dirs checked out, if not, you will get an error like this during the migration:

    svn: Directory 'branches/dev' is missing
    svn: Directory 'branches/dev' is missing


In my case, I had to check out branches/dev manually before the "switch", remember to use the new URL above though. Alternatively, you can "cd" into each directory (and/or branch) and do an "svn switch" in there. You will have to modify the URL above accordingly. E.g. you could do

    $ cd traffic/trunk
$ svn switch https://svn.apache.org/repos/asf/trafficserver/traffic/trunk/


(if someone have a better solution to dealing with the missing branches/dirs, please comment here).

Finally, you can of course "ditch" your entire tree, and simply do a new "svn co" of the entire tree (using the URL above). That's what I did, since I had nothing uncommitted in my SVN tree. If you are uncertain, do the above "switch" command(s), and then do an "svn diff" and see if you have anything uncommitted somewhere.


GIT
----

(I haven't got this to work yet, but putting in the details I have so far).


Simply editing .git/config supposedly doesn't work. I did some goo^d^d^dyahoo searches, and found this article:

    https://git.wiki.kernel.org/index.php/GitSvnSwitch


That still didn't work for me, so I haven't been able to 'connect' my existing git repo to the new SVN server. Another suggestion was to clone a new git repo, and then copy your old "local" git branches over to the new git clone. I tried that too, and it still fails, I "cloned" the git-repo from git.apache.org, e.g.

    git clone git://git.apache.org/trafficserver.git

Then I connected the new SVN remote (svn init with the new SVN URL), but when I try to rebase, I get an error like

    Unable to determine upstream SVN information from working tree history


Note that both my old git repo, and the new one I tried to clone, are cloned from the git.apache.org git repo. I did not try to do a complete manual SVN convertion to git, I might try that next. For anyone trying that, I think you can start looking at revisions from around 800,000, anything before that will not have any TS commits.

Gav: Maybe the git:// dump on git.apache.org is not updated to use the new SVN URL? Can you look into that please?

John: Do you have any good ideas here?

Cheers,

-- leif

Reply via email to