[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Rescue Linux tool svnwcrev from abandoning. Does someone have a copy we can add to github ?

From: Alfred von Campe <alfred_at_von-campe.com>
Date: Fri, 5 Jun 2020 09:01:21 -0400

On Jun 5, 2020, at 8:22, Roelof Berg wrote:
>
> I will create a script named SubWCRev.sh with a content like:
>
> #!/bin/bash
> echo -n "{\""
> echo -n `svn info | grep -e "^URL: " | sed 's/URL: //g'`
> echo -n "\",\""
> echo -n `svn info | grep -e "^Revision: " | sed 's/Revision: //g'`
> echo "\",\"\"}"
>
> Thanks for your support, I don’t need access to svnwcrev anymore.

Or as a one liner with printf and awk saving a few process invocations:

#!/bin/bash
printf '{"%s"},"%d",""}\n' $(svn info | awk '/^URL:/ {print $2}') $(svn info | awk '/^Revision:/ {print $2}’)

Alfred
Received on 2020-06-05 15:01:37 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.