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

Re: [PATCH] Give svnmucc ability to handle multiline properties

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Mon, 27 Jul 2009 16:18:15 +0100

On Sun, 2009-07-26, Gavin Baumanis wrote:
> Ping.
> This submission has received no comments.

My comments are:

It seems a good idea to extend svnmucc's "-X" syntax in some way to
enable multi-line arguments.

In the proposed solution, is there any way to provide an argument that
ends with the escape character? In other words, if I choose '@' as the
escape character, how could I specify the filename 'tempfile.@@@' as an
argument? When I am a human user, I can probably choose an escape
character that isn't found at the end of any argument, but if I am a
script invoking svnmucc on arbitrary file names then I'd like a way to
pass them safely.

Making the escape character configurable seems overly complex - not
complexity of implementation, but the sort of complexity that means any
time you store or automatically generate svnmucc commands you would then
have to keep track also of which character was used, and ensure the same
character is used when interpreting them.

I would just pick one escape character and specify that at end of line
it means include the end-of-line character(s) and continue the argument
on the next line; if doubled, include just one copy of itself; otherwise
it's an error.

It's difficult to pick an escape character. I would tend to choose '\'
because it is so commonly used for this purpose in Unix-like systems. It
could be a bit awkward on Windows, but actually the "put" action is the
only svnmucc action that takes a local file name, and you could assume
that Windows users don't use svnmucc much anyway, so that could still be
good. If you choose '@', as in your example, although it has meaning in
the regular svn client I can't see it being used much in svnmucc input
so that could also be good.

- Julian

> On 16/07/2009, at 20:47 , Purple Streak wrote:
>
> > Hi,
> > We use svnmucc to update externals properties as part of our build
> > process. As it is svnmucc doesn't allow multi-line property values
> > when used with -X as each newline in the extra args file means a new
> > argument. This is patch which we've been using to allow this. If the
> > argument isn't used then the behaviour is unchanged.
> >
> > [[[
> > Allow svnmucc to set multiline properties. This is done by adding
> > an optional
> > -c (--continuation-char) argument which takes a single character
> > argument.
> > Any lines in the --extra-args file ending with that character will
> > then not
> > terminate the current argument.
> >
> > * tools/client-side/svnmucc/svnmucc.c
> > (read_extra_args) New external file argument parsing function
> > (usage) Updated with new argument
> > (main) Update to accept new argument and call read_extra_args
> > ]]]
> >
> > As an example we are using '-c @' on a file with:
> >
> > svnmucc.exe -m "hello" -c @ -X multi-line.txt
> >
> > Where multi-line.txt is
> >
> > propset
> > svn:externals
> > -r52792 /svn/Repo/Pools/Shared/Stuff@
> > -r52792 /svn/Repo/Pools/Shared/MoreStuff
> > https://source01/svn/Sandbox/testA

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2375974
Received on 2009-07-27 17:18:38 CEST

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