Re: [Lazarus] How do you guys extract an SVN revision number from a Git commit ref?

2015-03-26 Thread Graeme Geldenhuys
On 2015-03-26 05:47, vfclists . wrote: This is what I have settled on in the mean time. LAZ_SVN_REVISION=`git log | grep -A 10 $LAZ_GIT_REVISION | grep git-svn-id | cut -d @ -f 2 | cut -d -f 1` Didn't the following work for you? It extracts exactly what you want and will work on any

Re: [Lazarus] How do you guys extract an SVN revision number from a Git commit ref?

2015-03-26 Thread JuuS
On 03/24/2015 10:10 PM, vfclists . wrote: I am using this code to obtain the SVN revision of a git commit hash. The example below is for the latest commit hence the git log -n 1. git log -n 1 | head -n 7 | tail -n 1 | cut -d @ -f 2 | cut -d -f 1 It checks for the seventh line,

Re: [Lazarus] How do you guys extract an SVN revision number from a Git commit ref?

2015-03-26 Thread vfclists .
On 26 March 2015 at 10:58, Graeme Geldenhuys mailingli...@geldenhuys.co.uk wrote: On 2015-03-26 10:42, vfclists . wrote: 'git svn find-rev' works for finding the Git commit refs from subversion refs only if the subversion refs are of the form rN, and I thought going the other way

Re: [Lazarus] How do you guys extract an SVN revision number from a Git commit ref?

2015-03-25 Thread vfclists .
On 24 March 2015 at 23:33, Graeme Geldenhuys mailingli...@geldenhuys.co.uk wrote: On 2015-03-24 21:10, vfclists . wrote: git log -n 1 | head -n 7 | tail -n 1 | cut -d @ -f 2 | cut -d -f 1 Try: git svn find-rev $(git log --max-count 1 --pretty=format:%H) Alternatively you could do

[Lazarus] How do you guys extract an SVN revision number from a Git commit ref?

2015-03-24 Thread vfclists .
I am using this code to obtain the SVN revision of a git commit hash. The example below is for the latest commit hence the git log -n 1. git log -n 1 | head -n 7 | tail -n 1 | cut -d @ -f 2 | cut -d -f 1 It checks for the seventh line, searches for the '@' in trunk@N and extracts it from