Hello!
I use
svnversion <workingcopypath>
for that.
As I need to contruct file names from that, I need to handle ranges and the “modified-“M specially. You might to do that differently.
On windows, this goes like this:
(%1 is the path I need to get info from)
SET SVNREVISION=%1 not found
FOR /F "usebackq" %%V IN (`svnversion %1`) DO SET SVNREVISION=%%V
:: das kann auch 4321M oder 4321:4333M sein!
SET SVNREVISION=%SVNREVISION::=-%
:: SVNREVISION ist ein gültiger Dateinamensbestandteil, weil das Skript den Doppelpunkt durch Minuszeichen ersetzt
:: Check auf Buchstaben oder Doppelpunkt (SVN-Range)
SET SV__TMO__=X
SET /A SV__TMO__=%SVNREVISION% + 0
IF %SV__TMO__%==%SVNREVISION% (
ECHO %1: Single Version found: %SVNREVISION%
set SVNVERSION=%SVNREVISION%
) ELSE (
echo %1: Version range %SVNREVISION% found, setting SVNVERSION to 9999
SET SVNVERSION=9999
EXIT /B 1
)
EXIT /B 0
Hope that helps
Hartmut.
--
You received this message because you are subscribed to the Google Groups "TortoiseSVN" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
tortoisesvn...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tortoisesvn/35fd2072-f4e5-4f00-aef5-16974479a315%40googlegroups.com.