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.



Von: 
tortoisesvn+apn2wqda17snhkxfqq1cpdvnruk9kmmhe6rzvvhpucfd3qw3-...@googlegroups.com
 
<tortoisesvn+apn2wqda17snhkxfqq1cpdvnruk9kmmhe6rzvvhpucfd3qw3-...@googlegroups.com>
Gesendet: Freitag, 28. Februar 2020 20:08
An: TortoiseSVN <[email protected]>
Betreff: Looking-up trunk release number to use in a program script

At first, I apologise profusely if I'm asking something well documented.  I've 
found various pages in the TortoiseSVN manual that may point to a solution, but 
I'm just not clever enough to understand well.  .(-_-).

I want to find out the HEAD release number of an SVN repository, in a form that 
I can access from another program.
For example, if there way of looking-up the HEAD revision at the command line 
and writing it to a file that could be read by another script, that would be 
fine.

In case it's helpful background
- We are building a JS application using the 'MS Studio Code' editor.
- Sometimes we make an obfuscated build from the HEAD code one one repository, 
and commit it to a different repository.  And in the commit to the latter repo, 
we want to include the revision number on which it is based, without entering 
it by hand.

If there's some hint anybody can offer, I'd really appreciate it.
--
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 
[email protected]<mailto:[email protected]>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tortoisesvn/35fd2072-f4e5-4f00-aef5-16974479a315%40googlegroups.com<https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Ftortoisesvn%2F35fd2072-f4e5-4f00-aef5-16974479a315%2540googlegroups.com%3Futm_medium%3Demail%26utm_source%3Dfooter&data=02%7C01%7Chartmut.niemann%40siemens.com%7Cfa4528a3732344ff059808d7bc8375f1%7C38ae3bcd95794fd4addab42e1495d55a%7C1%7C1%7C637185145115459804&sdata=avsBDjTRjNy31FaOFYnfyPcuVHsEkC2kiiTAHCjVISU%3D&reserved=0>.

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tortoisesvn/AM6PR10MB256880E79CA9C8B670A8E829FCE70%40AM6PR10MB2568.EURPRD10.PROD.OUTLOOK.COM.
  • Looking-u... tortoisesvn+APn2wQdA17SnHKxFqq1CPDvNRuK9KmmHE6rzvVhPuCfD3QW3-x5w
    • Re: ... Stefan via TortoiseSVN
      • ... tortoisesvn+APn2wQdA17SnHKxFqq1CPDvNRuK9KmmHE6rzvVhPuCfD3QW3-x5w
    • AW: ... TortoiseSVN on behalf of H. Niemann

Reply via email to