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

JuuS JuuS at mykolab.ch
Thu Mar 26 11:47:22 CET 2015



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, searches for the '@' in trunk at NNNNN and
> extracts it from there.
> The problem is the position the line with the trunk at NNNNN string varies.
> Is there some way to work it calculate it?
> 
> My awk, grep and sed skills are not so hot.

I don't know if you live in the Linux world but if so there is a
software available in the Software Center called Kiki.

It's used to build and test Regular Expressions, and is a learning area
with a pretty good syntax explanations to try out and get used to.

HTH.


> 
> -- 
> Frank Church
> 
> =======================
> http://devblog.brahmancreations.com
> 
> 
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
> 




More information about the Lazarus mailing list