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

Re: Diff Project --invoke-diff-cmd part

From: Daniel Shahaf <danielsh_at_elego.de>
Date: Sun, 28 Apr 2013 12:24:26 +0300

Alan Barrett wrote on Wed, Apr 24, 2013 at 09:44:11 +0200:
> On Tue, 23 Apr 2013, Gabriela Gibson wrote:
>>> Also, a minor design nit (sorry, no code review): The "---f1"
>>> construct is something I've never seen before.
>>
>> That's why I picked it --- I checked extensively, and no-one uses a
>> triple dash, so it does exactly what we hope it will: never interfere
>> with anything that people might do. Also, I think it looks quite
>> 'unixy' and it's easy to read. I expect fewer problems on windows.
>
> Speaking as somebody who might use this feature, I would much prefer a
> more familiar notation like "%(f1)". To my eyes, "---f1" does not look
> unixy or easy to read; familiar constructs are easier to read than
> unfamiliar constructs.
>
> In addition to the familiarity issue, there's an issue with escapes: you
> need a way of representing a literal "---f1" sequence that does not
> expand to anything. With notation like "%(f1)" there's already a
> widespread convention of using "%%" to represent a "%" character that
> does not introduce an expnsion.

True. However, both cmd.exe and the Subversion config file parser use
'%' as a metacharacter, and each of them escapes it differently, so the
way to generate a single, literal '%' character would be:

%%%% in ~/.subversion/config;
%% in the value of --config-option=... on unix;
^%^% in the value of --config-option=... on windows;
% not guaranteed to, but works in practice when not followed by either /[(]/ or /\w+[%]/.

That's going to be challenging to document clearly.

What about $(f1)? That's also familiar (makefile syntax) but might be
a little saner to escape in various contexts.

Daniel

P.S. It appears our config files' %-interpolation feature doesn't kick
in for --config-option's argument. I'm not sure whether that's a good
thing or not.
Received on 2013-04-28 11:25:29 CEST

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

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