<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Hi Alexandre,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jul 22, 2020 at 12:10 AM Alexandre Rademaker &lt;<a href="mailto:arademaker@gmail.com" target="_blank">arademaker@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
mkdir treebank<br>
cd treebank<br>
git svn init <a href="http://sweaglesw.org/svn/treebank" rel="noreferrer" target="_blank">http://sweaglesw.org/svn/treebank</a> --stdlayout --prefix=svn/<br>
for tag in `git branch -r | grep &quot;tags/&quot; | sed &#39;s/ tags\///&#39;`; do git branch $tag refs/remotes/$tag; done<br>
git svn fetch<br></blockquote><div><br></div><div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default">This looks more or less right, but you didn&#39;t link the SVN author(s) to GitHub accounts using --authors-file. Also I think it makes more sense to create Git tags for the SVN tags instead of branches.</div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default"><br></div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default">I also tried importing this repo using GitHub&#39;s importer (<a href="https://docs.github.com/en/github/importing-your-projects-to-github/about-github-importer" target="_blank">https://docs.github.com/en/github/importing-your-projects-to-github/about-github-importer</a>) and it worked great. It&#39;s very simple and results in a Git-like repository, but unfortunately it does not keep the SVN tracking information needed for proper mirroring. It would work better for a one-time import.</div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default"><br></div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default">So I suggest recreating your repo as follows. First create the authors file:<br></div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default"><br></div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default">    cat &gt; authors.txt &lt;&lt;EOF</div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default">    sweaglesw = sweaglesw &lt;<a href="mailto:sweaglesw@users.noreply.github.com">sweaglesw@users.noreply.github.com</a>&gt;<br>    (no author) = (no author) &lt;(no author)&gt;</div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default">    EOF</div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default"><br></div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default">Then clone (does init and fetch in one command):</div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default"><br></div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default">    git svn clone <a href="http://sweaglesw.org/svn/treebank">http://sweaglesw.org/svn/treebank</a> --stdlayout --prefix=svn/ --authors-file=authors.txt</div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default"><br></div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default">Then convert remote tag-branches to Git tags:</div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default"><br></div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default">    cd treebank</div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default">    git for-each-ref --format=&quot;%(refname:lstrip=-1) %(objectname)&quot; refs/remotes/svn/tags |</div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default">    while read ref; do</div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default">      git tag $ref;</div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default">    done</div></div><div><br></div><div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default">And replace the &#39;master&#39; branch with &#39;trunk&#39;:</div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default"><br></div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default">    git checkout -b trunk</div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default">    git branch -d master</div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
The SVN repository (<a href="http://sweaglesw.org/svn/treebank/" rel="noreferrer" target="_blank">http://sweaglesw.org/svn/treebank/</a>) didn’t contain branches, so I have created branches for the two tags I found: `foo` and `packard-2015`. Note that these tags do not look very interesting and maybe they could be removed in the SVN repository. That would make the process even simpler, tracking only the trunk branch.<br></blockquote><div><br></div><div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default">You&#39;re probably right about &#39;foo&#39;, but the &#39;packard-2015&#39; tag points to the revision used for Woodley&#39;s thesis and IWCS 2015 paper so I don&#39;t think we should discard that one. But maybe it doesn&#39;t matter for a mirror since it still exists in the SVN repo?<br></div></div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
We don’t have automation yet, if Woodley update its SVN, all I need to do is:<br>
<br>
git svn fetch<br>
git push --all -u origin<br></blockquote><div><br></div><div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default">When you do `git svn fetch`, it retrieves the commits from the remote SVN repository but doesn&#39;t incorporate them into your local tree. Use `git svn rebase` instead.</div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
Hi Michael and Stephan, any comments about the solution above? Michael is the only user in the <a href="https://github.com/delph-in" rel="noreferrer" target="_blank">https://github.com/delph-in</a> organization? Can you add me so I can move this repository to the delph-in org?<br></blockquote><div><br></div><div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Francis invited you to be a member of the organization. I just updated that invitation so you&#39;d be added to the &quot;Sweagles&quot; team, which has admin rights to the delph-in/FFTB repository I created. Once you accept the invitation, you can do the following to push your repo:<br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">    git remote add origin <a href="https://github.com/delph-in/FFTB.git" target="_blank">https://github.com/delph-in/FFTB.git</a><br>    git push -u origin --all<br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">    git push -u origin --tags</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div></div></div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default">(I called the remote repo FFTB instead of treebank because it&#39;s more distinctive and recognizable, I think.)</div><div><br></div></div>-- <br><div dir="ltr">-Michael Wayne Goodman</div></div>