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

RE: SubWCRev and ternary keywords and $WCRANGE$ colon

From: Craig McQueen <craig.mcqueen_at_beamcommunications.com>
Date: Tue, 12 Apr 2011 18:07:36 -0700

> -----Original Message-----
> From: Stefan Küng [mailto:tortoisesvn_at_gmail.com]
> Sent: Wednesday, 13 April 2011 5:23 AM
> To: users_at_tortoisesvn.tigris.org
> Subject: Re: SubWCRev and ternary keywords and $WCRANGE$ colon
>
> On 12.04.2011 08:56, Craig McQueen wrote:
> > Hello,
> >
> > I’m trying to use the following keyword substitution with SubWCRev:
> >
> > #define SVN_REVISION "$WCMIXED?$WCRANGE$:$WCREV$$"
> >
> > The intention is, if there is a single revision (not mixed), then I
> get
> > the latest commit revision (rather than latest update revision). If
> > there is a mixed revision range, I get the range.
> >
> > But, I find that when I have mixed ranges, such as 1234:1280, I’m
> > getting a resulting string of “1234” instead of “1234:1280”. It seems
> > that the $WCMIXED?...:...$ keyword is stopping at the colon character
> > contained within the substituted $WCRANGE$ string, rather than the
> colon
> > character of the expression.
> >
> > This seems like a bug to me. Do developers agree?
>
> This is by design. The $WCMIXED?x:y$ expression does not support other
> replacement statements as the x:y params. Because it is not fixed in
> which order the expressions are evaluated/replaced in the file.
>
> That means, you can not nest expressions.
>
> You have to work around that using e.g. defines:
> #define RANGE $WCRANGE$
> #define REV $WCREV$
> #define SVN_REVISION "$WCMIXED?RANGE:REV$"
>

Thanks for explaining that--it makes sense. Since this is a potential "gotcha" for users, your good explanation would be worth adding to the documentation.

Thanks and regards,
Craig McQueen

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2719262

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2011-04-13 03:08:00 CEST

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