<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On 26 March 2015 at 10:58, Graeme Geldenhuys <span dir="ltr"><<a href="mailto:mailinglists@geldenhuys.co.uk" target="_blank">mailinglists@geldenhuys.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 2015-03-26 10:42, vfclists . wrote:<br>
> 'git svn find-rev' works for finding the Git commit refs from subversion<br>
> refs only if the subversion refs are of the form rNNNNN, and I thought<br>
> going the other way<br>
<br>
</span>Sorry, I probably haven't had enough coffee yet, but I don't fully<br>
understand. I thought you wanted the latest svn revision number by using<br>
a git mirror (of a subversion repo). That is exactly what the command<br>
does that I posted.<br>
<br>
For example. Here is the last commit I have in my lazarus repo (cloned<br>
from the git mirror on Github).<br>
===============================<br>
$ git log -1<br>
commit d7e9b24c9bb114264663cc45d7148a4ade3f2b24<br>
Author: dmitry <dmitry@4005530d-fff6-0310-9dd1-cebe43e6787f><br>
Date: Thu Mar 26 00:48:36 2015 +0000<br>
<br>
printer4lazarus: carbon - replace OSX 10.5 (driver specific) code<br>
with OSX 10.0 compatible code for getting printerinters DPI<br>
<br>
git-svn-id: <a href="http://svn.freepascal.org/svn/lazarus/trunk@48507
4005530d-fff6-0310-9dd1-cebe43e6787f" target="_blank">http://svn.freepascal.org/svn/lazarus/trunk@48507<br>
4005530d-fff6-0310-9dd1-cebe43e6787f</a><br>
===============================<br>
<br>
<br>
As far as I understood, you are interested in finding the SVN revision<br>
of that commit - which is r48507 (by looking at the git-svn-id line.<br>
<br>
<br>
===============================<br>
$ git svn find-rev $(git log --max-count 1 --pretty=format:%H)<br>
48507<br>
===============================<br>
<br>
As you can see, the command returns exactly that revision for you.<br>
<br>
<br>
The first time you run the 'git svn find-rev' git will do some layout<br>
migration (svn info) for you. Maybe it is also because I'm using the<br>
very latest Git. But after the first run, it will always only return the<br>
svn revision number.<br>
<div class="HOEnZb"><div class="h5"><br clear="all"></div></div></blockquote><div><br></div><div>Your original answer was correct. I needed something for any commit not just the latest, but the example I used was for just the latest commit, and I confused myself as a result.<br><br></div></div>-- <br><div class="gmail_signature">Frank Church<br><br>=======================<br><a href="http://devblog.brahmancreations.com">http://devblog.brahmancreations.com</a></div>
</div></div>