[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Update to a different file

From: Greg A. Woods
Subject: Re: Update to a different file
Date: Wed, 25 Jul 2001 01:19:34 -0400 (EDT)

[ On Tuesday, July 24, 2001 at 20:42:15 (-0400), Eric Siegerman wrote: ]
> Subject: Update to a different file (was Re: Update)
> Because of the one-change expectation, and because ">file"
> meaning "put it there" is so instinctive to a Unix user, I often
> forget the "-p" -- indeed, I did so when first typing the above
> example, even though it's precisely what I'm talking about.  The
> results of this error are an empty foo.c.copy and potentially a
> clobbered foo.c.
> (Yes, I understand why the "-p" is necessary, and why it makes
> sense from CVS's point of view; I submit that from the USER's
> point of view, it does NOT make sense.)

Well, it depends on the user.  The '-p' will make perfect sense to
anyone who's used RCS or SCCS (or probably any other basic version
control system).  Every user with such experience will understand that
the normal "checkout" command works on files in the filesystem (eg. much
the same as the unix "cp" command), and they would never expect the file
contents to be produced on stdout.  Indeed I'd go further and suggest
that any really experienced unix user would come to the same conclusion
even if they'd never seen any other revision control system before.  The
"cvs checkout" command is just a fancy version of "cp" -- it copies
(revisions of) files from one place to another, and there are already 

In my experience "-o outfile" is a far more common command-line feature
than "-p", and with "-o -" having the special meaning of printing to
stdout there's really not much sense in having a restricted "-p" that
can only print to stdout.

As a very experience unix user when I first encounterd CVS myself I was
frustrated that there was no "cvs co -o outfile" parameter (just as I
was similarly frustrated by the lack of such a parameter for the RCS
"co" and SCCS "get" commands).

What still frustrates me about "cvs co -p" vs. "cvs co -o outfile" is
that CVS sometimes prints noise about what it's doing to stdout, and
this means that if you want to guarantee a clean file you have to use
"cvs -q" too!

If (for reasons could probably never imagine) the consensus is against
"-o outfile" I might be convinced that there should be a "cvs
concatenate" (and maybe a "cvs cat" short form too) which would be an
alias for "cvs co -p", but if there's a "-o outfile" option with a "-"
filename meaning stdout then I can't see any reason to keep "-p" (at
least not beyond a one release where it's labeled as deprecated with an
explict warning to stderr) or to invent a "concatentate" alias.

                                                        Greg A. Woods

+1 416 218-0098      VE3TCP      <address@hidden>     <address@hidden>
Planix, Inc. <address@hidden>;   Secrets of the Weird <address@hidden>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]