info-cvs
[Top][All Lists]
Advanced

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

Re: Reading log info of the last revision on a given branch


From: Mark D. Baushke
Subject: Re: Reading log info of the last revision on a given branch
Date: Wed, 05 Sep 2007 10:42:56 -0700

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

nandan cn <address@hidden> writes:

> Was looking for a cvs command line, where
> 
> Given  a file name and branch name, want the *log message* of the latest
> revision on that branch.
> 
> Tried some of the cvs log commands , but couldn't get what i was looking for

Given:

  CVSROOT :ext:host.dom.main:/path/to/repository
  filename module/subdir1/subdir2/file1.c
  branch mybranch

  cvs -d :ext:host.dom.main:/path/to/repository \
   rlog -rmybranch. -N module/subdir1/subdir2/file1.c

will give you the log message LAST revision for the 'mybranch' branch.

The '.' at the end asks CVS for just the last revision. The -N supresses
all of the other tags. The module/subdir1/subdir2/file1.c is the
pathname you might use to checkout just the file1.c sources in your
local tree.

If you are already in a checked out tree, then going to the
module/subdir1/subdir2 directory you should be able to use:

   cvs log -rmybranch. -N file1.c

to get the same information.

        Enjoy!
        -- Mark

$ cvs -H log
Usage: cvs log [-lRhtNb] [-r[revisions]] [-d dates] [-s states]
    [-w[logins]] [files...]
        -l      Local directory only, no recursion.
        -R      Only print name of RCS file.
        -h      Only print header.
        -t      Only print header and descriptive text.
        -N      Do not list tags.
        -S      Do not print name/header if no revisions selected.
        -b      Only list revisions on the default branch.
        -r[revisions]   A comma-separated list of revisions to print:
           rev1:rev2   Between rev1 and rev2, including rev1 and rev2.
           rev1::rev2  Between rev1 and rev2, excluding rev1.
           rev:        rev and following revisions on the same branch.
           rev::       After rev on the same branch.
           :rev        rev and previous revisions on the same branch.
           ::rev       rev and previous revisions on the same branch.
           rev         Just rev.
           branch      All revisions on the branch.
           branch.     The last revision on the branch.
        -d dates        A semicolon-separated list of dates
                        (D1<D2 for range, D for latest before).
        -s states       Only list revisions with specified states.
        -w[logins]      Only list revisions checked in by specified logins.
(Specify the --help global option for a list of other help options)
$ 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (FreeBSD)

iD8DBQFG3uqfCg7APGsDnFERAuzMAJwL5Sy9gxr/rsEuA9T+hoVROqHhFwCfUOFr
HKHhK3cQbno9BezrC3ibn4A=
=CNPT
-----END PGP SIGNATURE-----




reply via email to

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