info-cvs
[Top][All Lists]
Advanced

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

Re: cvs log options ( was Re: cvs rtag -r BRANCH -D date)


From: Stephen Cameron
Subject: Re: cvs log options ( was Re: cvs rtag -r BRANCH -D date)
Date: Mon, 11 Jun 2001 11:57:08 -0700 (PDT)

--- "Derek R. Price" <address@hidden> wrote:
> Stephen Rasku wrote:
> 
> > cvs admin -o uses a colon syntax to specify a revision range and cvs log
> > uses the same (or similar) syntax to specify revisions (except for the
> > space problem mentioned above) but it uses a different syntax for dates.
> > First of all, it uses -d instead of -D and it uses a greater than/less
> > than syntax.  I would prefer using a -D syntax that mirrors the -r syntax.
> >  So you would do some thing like this:
> >
> >         cvs log -D <date> -D now
> >         cvs log -D start -D <date>
> >         cvs log -D <date1> -D <date2>
> >         etc.
> 
> This sounds usable.
> 
> 
> > I would also change the -r option so that it matches "cvs update" and "cvs
> > diff".  It would work like this:
> >
> >         cvs log -r <rev1> -r <rev2>
> >         cvs log -r <rev>.origin -r <rev>
> >         cvs log -r <rev> -r HEAD
> >         cvs log -r <branch>
> >         cvs log -r <branch1> -r <branch2>
> 
> Hmm... interesting.  This might be doable without loss of functionality in
> conjunction with Stephen Cameron's .origin/.trunk patch.  I'd like more
> feedback on Cameron's patch before adoption, though.  If you'd like to
> download and try it, Steve keeps it at
> http://www.geocities.com/dotslashstar/branch_patch.html .
> 
Some testing of the patch with vendor branches is probably mandatory before
integration too. (Perhaps someday I'll just happen to need a vendor branch for
something, and finally get around to that...)

Just a couple comments (not really relating to how this might fit in with my
patch):

There is this comment in log.c:
    /* Unfortunately, rlog accepts -r without an argument to mean that
       latest revision on the default branch, so we must support that
       for compatibility.  */
    if (argstring == NULL)
        argstring = "";

The implication is that no space is allowed between -r and its argument, if
this "compatibility" the comment refers to is something we want to keep.  (I do
know that this "no space" requirement has tripped me up a number of times. 
Maybe this is the "space problem" alluded to...I didn't see the first
message(S) in this thread (yet).)

Specifying revision ranges for "log" makes sense in the typical cases, but
perhaps not in the general case, as you could give two revisions on completely
separate branches.  You can diff those, but what to do for log messages?  There
aren't any.  (And maybe that's the answer, ask a silly question, CVS gives a
silly answer: the empty set of log messages.). But, by doing that, the results
of log used against multiple files at once with two tags could be misleading
since for some files no log messages may show due to two revisions specified
being added separately to separate branches (for example) while for other files
log messages show up, so that certain types of changes would be masked, and
presumably this masking effect would be counter to the reasons you're running
"cvs log" in the first place.  Maybe a message like "No loggable revision
sequence between revisons 1.2.2.4 and 1.2.4.9 esists for foo.c", or prefereably
something clearer, would suffice.  Arguably, "log" is most commonly used on a
single file at a time, (by me anyway)

[...]
-- steve



__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/



reply via email to

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