You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Vladislav Javadov <va...@yandex.ru> on 2013/11/16 08:10:17 UTC

svnmucc

Hi,

My svnmucc 1.8.4 can't work with commands from a file, like these (saved
as 'normalize.mucc'):

rm programs/develop/fasm/tags
rm programs/games/mine/tags
rm programs/games/snake/tags

I try execute them via svnmucc:

svnmucc -U file:///X:/SVN/Kolibri.com -X normalize.mucc -m "Normalization"

It causes me an error:

svnmucc: E200004: 'rm programs/develop/fasm/tags' is not an action

I looked into the sources and found this error like svnmucc treats the
entire string 'rm programs/develop/fasm/tags' as single command. Is it
real? Is it common issue, not just for Windows?



-- 
WBR,
Vladislav Javadov


Re: svnmucc

Posted by Geoff Rowell <ge...@gmail.com>.
> On Nov 16, 2013, at 6:06 AM, Andreas Mohr <an...@lisas.de> wrote:
> 
>> On Sat, Nov 16, 2013 at 04:29:13AM -0500, Geoff Rowell wrote:
>> 
>>> On Nov 16, 2013, at 2:10 AM, Vladislav Javadov <va...@yandex.ru> wrote:
>>> 
>>> rm programs/develop/fasm/tags
>>> rm programs/games/mine/tags
>>> rm programs/games/snake/tags
>> 
>> Each command argument must be on a separate line:
>> 
>> rm
>> programs/develop/fasm/tags
>> rm
>> programs/games/mine/tags
>> rm
>> programs/games/snake/tags
> 
> So, does that mean that svnmucc has single-arg support only?
> Cause given this example, on the syntax side there's nothing
> that would indicate that a new command is following,
> rather than further options to the existing command...
> (unless "rm" is one of the commands
> which are specially recognized as a known-supported command)
> 
> Sorry for my critique (and thank you for your help!) - just sayin'...
> 
svnmucc commands have a fixed number of arguments. Use "svnmucc --help" to see the valid commands.

- Geoff

Re: UNS: Re: svnmucc

Posted by Blair Zajac <bl...@orcaware.com>.
On Nov 18, 2013, at 7:33 AM, Andreas Krey <a....@gmx.de> wrote:

> On Mon, 18 Nov 2013 07:11:40 +0000, Nico Kadel-Garcia wrote:
>> Brother, unweaving the quotes is its own problem. You see, most
>> filesystems allow single quotes and double quotes in the filenames
>> themselves. Hilarity will ensue.
> 
> Quoting is a solved problem, including quoting quotes.
> 
> Using newlines a command argument separator because there may be spaces
> in files names is a regression from accepted CLI design, and doesn't
> even solve the problem of newlines in file name which filesystems also
> allow. Besides, hilarity also ensues there when a file happens to be named
> 'rm’.

svnmucc handles arbitrary long command line arguments with spaces if they are quoted.  This is in regards to the -X command line option.

Blair


Re: UNS: Re: svnmucc

Posted by Nico Kadel-Garcia <nk...@gmail.com>.
> Quoting is a solved problem, including quoting quotes.

Bwa-ha-ha-ha!. Hee. Giggle, Snort.  Oh, dear lord, that one deserved a
"coffee and cats" warning. The handling of syntactically significant
characters, such as quotes, slashes, single quotes, and spaces is a
very common cross-platform problem and multiple tool problem. There
are individual tools that do it well. Many, many casually written
access control, hook-scripts, and and build scripts do not. And with
so many interpreters having different syntax for quote handling, it
can actually be impossible for one script to hand off the right number
of levels of quoting to another  tool several layers deeper.


On Mon, Nov 18, 2013 at 10:33 AM, Andreas Krey <a....@gmx.de> wrote:
> On Mon, 18 Nov 2013 07:11:40 +0000, Nico Kadel-Garcia wrote:
>> Brother, unweaving the quotes is its own problem. You see, most
>> filesystems allow single quotes and double quotes in the filenames
>> themselves. Hilarity will ensue.
>
> Quoting is a solved problem, including quoting quotes.
>
> Using newlines a command argument separator because there may be spaces
> in files names is a regression from accepted CLI design, and doesn't
> even solve the problem of newlines in file name which filesystems also
> allow. Besides, hilarity also ensues there when a file happens to be named
> 'rm'.
>
> Andreas
>
> --
> "Totally trivial. Famous last words."
> From: Linus Torvalds <torvalds@*.org>
> Date: Fri, 22 Jan 2010 07:29:21 -0800

Re: UNS: Re: svnmucc

Posted by Andreas Krey <a....@gmx.de>.
On Mon, 18 Nov 2013 07:11:40 +0000, Nico Kadel-Garcia wrote:
> Brother, unweaving the quotes is its own problem. You see, most
> filesystems allow single quotes and double quotes in the filenames
> themselves. Hilarity will ensue.

Quoting is a solved problem, including quoting quotes.

Using newlines a command argument separator because there may be spaces
in files names is a regression from accepted CLI design, and doesn't
even solve the problem of newlines in file name which filesystems also
allow. Besides, hilarity also ensues there when a file happens to be named
'rm'.

Andreas

-- 
"Totally trivial. Famous last words."
From: Linus Torvalds <torvalds@*.org>
Date: Fri, 22 Jan 2010 07:29:21 -0800

RE: svnmucc

Posted by Andrew Reedick <An...@cbeyond.net>.

> -----Original Message-----
> From: Nico Kadel-Garcia [mailto:nkadel@gmail.com] 
> Sent: Monday, November 18, 2013 7:12 AM
> To: Vladislav Javadov
> Cc: Blair Zajac; Andreas Mohr; Geoff Rowell; users@subversion.apache.org
> Subject: Re: svnmucc
>
> Brother, unweaving the quotes is its own problem. You see, most filesystems allow single quotes and double quotes in the filenames themselves. Hilarity will ensue.
>
> On Sun, Nov 17, 2013 at 4:19 AM, Vladislav Javadov <va...@yandex.ru> wrote:
> > BZ> The reason to support this syntax with command and arg on separate 
> > BZ> lines is to support files with whitespaces in the names
> >
> > But what about quotes? Most OSes and programs accept quoted file names 
> > containing spaces. Single-line commands are more readable, IMHO.
> >
> >
> > --
> > WBR,
> > Vladislav Javadov
> >

And this is why I switched from bash to xash (aka "xml bash").  All my commands are now entered in xml format.  Finally, no more -print0 and nested/escaped quotes nonsense! 

Example:
	cp -p foo bar
Becomes
	<command><arg>cp</arg><arg>-p</arg><arg>foo</arg><arg>bar</arg></command>

And multi-line commands and scripts go from:
      # Contrived example
	find . -type f -print0 | while read -d $'\0' i
	do
	   sed 's/e/E/g' "$i"
	done | tee foo.txt 2>&1
to:
<commands>
	<command>
		<arg>find</arg>
		<arg>.</arg>	
		<arg>-type</arg>
		<arg>f</arg>
	</command>
	<pipe/>
	<command>
		<arg>while</arg>
		<arg>read</arg>
		<arg>i</arg>
	</command>
	<command>
		<arg>do</arg>
	</command>
	<command>
		<arg>sed</arg>
		<arg>'s/e/E/g'</arg>
		<arg>$i</arg>
	</command>
	<command>
		<arg>done</arg>
	</command>
	<pipe/>
	<tee stdout_format="human_ascii">
		<file>foo.txt</file>
	</tee>
	<redirects>
		<redirect><file_no from="2" to="1"/></redirect>
	</redirects>
</commands>

Simple and inherently accurate, natch?


Re: svnmucc

Posted by Nico Kadel-Garcia <nk...@gmail.com>.
Brother, unweaving the quotes is its own problem. You see, most
filesystems allow single quotes and double quotes in the filenames
themselves. Hilarity will ensue.

On Sun, Nov 17, 2013 at 4:19 AM, Vladislav Javadov <va...@yandex.ru> wrote:
> BZ> The reason to support this syntax with command and arg on separate lines
> BZ> is to support files with whitespaces in the names
>
> But what about quotes? Most OSes and programs accept quoted file names
> containing spaces. Single-line commands are more readable, IMHO.
>
>
> --
> WBR,
> Vladislav Javadov
>

Re: svnmucc

Posted by Vladislav Javadov <va...@yandex.ru>.
BZ> The reason to support this syntax with command and arg on separate lines
BZ> is to support files with whitespaces in the names

But what about quotes? Most OSes and programs accept quoted file names
containing spaces. Single-line commands are more readable, IMHO.


-- 
WBR,
Vladislav Javadov


Re: svnmucc

Posted by Ben Reser <be...@reser.org>.
On 11/16/13 8:38 AM, Blair Zajac wrote:
> The reason to support this syntax with command and arg on separate lines is to
> support files with whitespaces in the names, which wouldn't be possible wit the
> syntax of command and arg on a single line.

Yet another thing to add to the list of code that assumes that filenames don't
have newlines in them.


Re: svnmucc

Posted by Blair Zajac <bl...@orcaware.com>.
On 11/16/2013 03:06 AM, Andreas Mohr wrote:
> On Sat, Nov 16, 2013 at 04:29:13AM -0500, Geoff Rowell wrote:
>>
>>> On Nov 16, 2013, at 2:10 AM, Vladislav Javadov <va...@yandex.ru> wrote:
>>>
>>> rm programs/develop/fasm/tags
>>> rm programs/games/mine/tags
>>> rm programs/games/snake/tags
>>
>> Each command argument must be on a separate line:
>>
>> rm
>> programs/develop/fasm/tags
>> rm
>> programs/games/mine/tags
>> rm
>> programs/games/snake/tags
>
> So, does that mean that svnmucc has single-arg support only?
> Cause given this example, on the syntax side there's nothing
> that would indicate that a new command is following,
> rather than further options to the existing command...
> (unless "rm" is one of the commands
> which are specially recognized as a known-supported command)
>
> Sorry for my critique (and thank you for your help!) - just sayin'...

Not having looked at the source code, it probably just reads from the 
file until it reaches the end.

The reason to support this syntax with command and arg on separate lines 
is to support files with whitespaces in the names, which wouldn't be 
possible wit the syntax of command and arg on a single line.

Blair


Re: svnmucc

Posted by Andreas Mohr <an...@lisas.de>.
On Sat, Nov 16, 2013 at 04:29:13AM -0500, Geoff Rowell wrote:
> 
> > On Nov 16, 2013, at 2:10 AM, Vladislav Javadov <va...@yandex.ru> wrote:
> > 
> > rm programs/develop/fasm/tags
> > rm programs/games/mine/tags
> > rm programs/games/snake/tags
> 
> Each command argument must be on a separate line:
> 
> rm
> programs/develop/fasm/tags
> rm
> programs/games/mine/tags
> rm
> programs/games/snake/tags

So, does that mean that svnmucc has single-arg support only?
Cause given this example, on the syntax side there's nothing
that would indicate that a new command is following,
rather than further options to the existing command...
(unless "rm" is one of the commands
which are specially recognized as a known-supported command)

Sorry for my critique (and thank you for your help!) - just sayin'...

Andreas Mohr

Re: svnmucc

Posted by Geoff Rowell <ge...@gmail.com>.
> On Nov 16, 2013, at 2:10 AM, Vladislav Javadov <va...@yandex.ru> wrote:
> 
> rm programs/develop/fasm/tags
> rm programs/games/mine/tags
> rm programs/games/snake/tags

Each command argument must be on a separate line:

rm
programs/develop/fasm/tags
rm
programs/games/mine/tags
rm
programs/games/snake/tags

- Geoff