[cvsnt] Re: Bug in command line parsing for tag command

Jerzy Kaczorowski jerzyk at wndtabs.com
Tue Jan 11 01:58:18 GMT 2005


Community technical support mailing list was retired 2010 and replaced with a professional technical support team. For assistance please contact: Pre-sales Technical support via email to sales@march-hare.com.


Tony,

I am quite sure it is a bug in tag command since all other commands behave
the way I'm ecspecting and I can also find similiar examples on google for
other command line tools:
http://www.google.com/search?q=double+hyphen+%22--%22+indicates+end+of+options&sourceid=opera&num=0&ie=utf-8&oe=utf-8.

> That's a bug in status in fact.  cvsnt always sends "--" before the
> filenames automatically.

I don't know what you mean by "send automatically" - I am just showing the
command line I typed into command prompt window. It works for all other
commands - status, update, log, commit, annotate, diff...

> Apart from already being handled by the client... the syntax is wrong.
> > cvs.exe tag a -- -hyphenfile.tst
> "a" is an argument.  You want:
> cvs.exe tag -- a -hyphenfile.txt

The syntax is correct. "a" is an argument - tag name here - and after that
it's followed by a double-hyphen to mark the end of options. After a "--"
there can be only files, and that is how the files starting with hyphen can
be properly handled by all other commands. If you don't specify the end of
options command parser can't tell what's the file and takes the first
character following the hyphen as an option resulting in errors, e.g.:

cvs.exe status -hyphenfile.tst
status: invalid option -- h
Usage: cvs status [-vlR] [files...]
        -v      Verbose format; includes tag information for the file
        -l      Process this directory only (not recursive).
        -R      Process directories recursively.
        -q      Display a quick summary of each file (send more increased
terseness).
        -x      cvsnt 2.x compatible output (default).
        -X      cvs 1.x compatible output.
(Specify the --help global option for a list of other help options)

Best Regards,
Jerzy

----- Original Message ----- 
From: "Tony Hoyle" <tmh at nodomain.org>
Newsgroups: support.cvsnt
To: <cvsnt at cvsnt.org cvsnt downloads at march-hare.com @CVSNT on Twitter CVSNT on Facebook>
Sent: Tuesday, January 11, 2005 0:47
Subject: [cvsnt] Re: Bug in command line parsing for tag command


> Jerzy Kaczorowski wrote:
> > Tony,
> >
> > There seem to be a bug in the tag command line parsing if it contains
"--"
> > to mark the last argument and the begining of files, e.g.:
>
> Apart from already being handled by the client... the syntax is wrong.
>
> > cvs.exe tag a -- -hyphenfile.tst
>
> "a" is an argument.  You want:
>
> cvs.exe tag -- a -hyphenfile.txt
>
> Tony
> _______________________________________________
> cvsnt mailing list
> cvsnt at cvsnt.org cvsnt downloads at march-hare.com @CVSNT on Twitter CVSNT on Facebook
> http://www.cvsnt.org/cgi-bin/mailman/listinfo/cvsnt https://www.march-hare.com/cvspro/en.asp#downcvs
>





More information about the cvsnt mailing list
Download the latest CVSNT, TortosieCVS, WinCVS etc. for Windows 8 etc.
@CVSNT on Twitter   CVSNT on Facebook