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

Re: [TSVN] SubWCRev update

From: Molle Bestefich <molle.bestefich_at_gmail.com>
Date: 2005-04-09 19:38:45 CEST

SteveKing wrote:
>> Eg. replace "$WCREV$" with "$WCREV: 504 $" inside the files instead of
>> requiring both source and destination files?
>
> Simple: I never liked those keywords! You can't use them e.g in #defines
> or anything else which requires a simple number.

Yeah, you're right, they're cumbersome.
OTOH, if you do put the keyword outside of the $$ string to make it
work with #define and friends, it's hard to find the appropriate word
to remove and replace with a new one. What should one go after? If
you always remove the first word before the /* $Revision$ */, you'll
have removed a word too much from the source file the first time a
revision number is inserted. If you search for a '=' in the same line
as the keyword and insert after that, it might work in most cases..
But it's not pretty.

> If you replace "$WCREV$" with "7777", then you can use it in a #define.
> But if you replace it with "$WCREV: 777$", then the define is not a
> number but a string, which you'd have to parse and convert it into a
> number first before you can use it somewhere else.

That's the sacrifice you have to make if you want to keep both the
attribute tag and the revision information (whatever) in the file at
the same time.

I think the Subversion folks might have chosen a bad replacement
algorithm since it's not compatible with #defines, but I think they're
at least right with the "keep everything in one file" style..

>> Also applicable for the complex attributes you've just crafted:
>> "$WCMIXED?TrueText:FalseText$" becomes "$WCMIXED?TrueText:FalseText:
>> TrueText $.
>
> Yeach! Ugly!

Whatever :-).
De gustibus non est disputandum / Über Geschmäcker darf man nicht streiten.
At least it's not really hard to understand.

>> In this regard, the colon that you've chosen between TrueText and
>> FalseText is IMHO very unfortunate, and should be replaced with
>> something else quickly, before it becomes common usage, so that we in
>> the future can be compatible with the CVS/SVN way of doing keywords..
>
> The colon is standard C/C++ syntax. So it's not something we just invented.

Keyword expansion has nothing to do with C/C++ and as such does not
have to follow their syntax.

> I think SubWCRev.exe should keep working the way it does now. Otherwise
> we couldn't even use it anymore in TSVN for the build process without
> writing scripts to parse those strings instead of clean numbers.

As I understood it, this is a completely new feature.
That's why I want it changed to something else, before projects like
TSVN start using it and it can't be changed anymore. Why? Because we
may, just in case, want to have room to be able to be compatible with
the Subversion syntax in the future. Using ':' in the
TrueText/FalseText case precludes this option.
Thanks for proving my point :-)..

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Sat Apr 9 19:39:13 2005

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