<div dir="ltr">Hi again,<br><div><div class="gmail_extra"><br><div class="gmail_quote">2015-10-12 23:49 GMT+02:00 Etienne Champetier <span dir="ltr"><<a href="mailto:champetier.etienne@gmail.com" target="_blank">champetier.etienne@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi All,<br><div class="gmail_extra"><br></div><div class="gmail_extra">Here are some commands to make a "full" git repo, from the "trunk" repo<br></div><div class="gmail_extra">(the only complaint that everyone agrees on)<br></div><div class="gmail_extra">We keep git commit sha's for the trunk, and we add all branches/tags<br><br></div><div class="gmail_extra">It needs some more tunning, but it's a good start :)<br><br></div><div class="gmail_extra">1) clone the trunk repo<br>git clone git://<a href="http://git.openwrt.org/openwrt.git" target="_blank">git.openwrt.org/openwrt.git</a> openwrt-git-svn<br></div><div class="gmail_extra">cd openwrt-git-svn</div><div class="gmail_extra"><br></div><div class="gmail_extra">2) init git svn<br>git svn init -T"/trunk" -t"/tags" -b"/branches" --prefix="svn/" svn://<a href="http://svn.openwrt.org/openwrt" target="_blank">svn.openwrt.org/openwrt</a><br><br></div><div class="gmail_extra">3) tell git that we already have trunk<br>git update-ref refs/remotes/svn/trunk refs/remotes/origin/master<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">4) download all branches/tags (except trunk because we already have it)<br></div><div class="gmail_extra">git svn fetch<br><br></div><div class="gmail_extra">resulting .git/config<br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">[core]<br>        repositoryformatversion = 0<br>        filemode = true<br>        bare = false<br>        logallrefupdates = true<br>[remote "origin"]<br>        url = git://<a href="http://git.openwrt.org/openwrt.git" target="_blank">git.openwrt.org/openwrt.git</a><br>        fetch = +refs/heads/*:refs/remotes/origin/*<br>[branch "master"]<br>        remote = origin<br>        merge = refs/heads/master<br>[svn-remote "svn"]<br>        url = svn://<a href="http://svn.openwrt.org/openwrt" target="_blank">svn.openwrt.org/openwrt</a><br>        fetch = trunk:refs/remotes/svn/trunk<br>        branches = branches/*:refs/remotes/svn/*<br>        tags = tags/*:refs/remotes/svn/tags/*<br></blockquote><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">original SO post: <a href="http://stackoverflow.com/a/12251845" target="_blank">http://stackoverflow.com/a/12251845</a><br><br></div><div class="gmail_extra">Good night<span class=""><font color="#888888"><br></font></span></div><span class=""><font color="#888888"><div class="gmail_extra">Etienne<br></div></font></span></div></blockquote><div> </div></div>Who has access/is running the script to mirror the svn on <a href="http://git.openwrt.org">git.openwrt.org</a> ? <br></div><div class="gmail_extra">I would like to know the exact commands used to update the git mirror<br><br></div><div class="gmail_extra">Here is an exemple of what we can have (I don't want to migrate to github, i'm using it out of simplicity)<br>for now svn tags are git branches<br><a href="https://github.com/champtar/openwrt-full">https://github.com/champtar/openwrt-full</a><br><br></div><div class="gmail_extra">to do that i've added to my .git/config (after step 4)<br></div><div class="gmail_extra"><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">[remote "champtar"]<br>        url = git@github.com:champtar/openwrt-full.git<br>        fetch = +refs/heads/*:refs/remotes/champtar/*<br>        push = refs/remotes/svn/*:refs/heads/*<br></blockquote><br></div><div class="gmail_extra">and pushed with:<br></div><div class="gmail_extra">git push --mirror champtar<br></div><div class="gmail_extra"><br>some more reading<br><a href="http://john.albin.net/git/convert-subversion-to-git">http://john.albin.net/git/convert-subversion-to-git</a><br><a href="http://wiki.gnucash.org/wiki/Git_Svn_Mirror">http://wiki.gnucash.org/wiki/Git_Svn_Mirror</a><br><br></div><div class="gmail_extra">Regards<br></div><div class="gmail_extra">Etienne<br></div></div></div>