bug-cvs
[Top][All Lists]
Advanced

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

[PATCH] "log -n" and blame


From: David O'Brien
Subject: [PATCH] "log -n" and blame
Date: Sun, 2 Dec 2007 11:48:02 -0800
User-agent: Mutt/1.5.16 (2007-06-09)

Hi folks,
Here are two patches from the FreeBSD CVS sources.

The first adds the "-n" switch to "cvs log".  Its purpose is for folks
with "log -N" in their ~/.cvsrc file to get tags when needed.

The second makes "blame" an alias for "annotate".  I know some folks
don't like this alias.., but I've found that many folks using the FreeBSD
CVS cannot remember "annotate", but do "blame" and that's what they type
for the functionality.  Supporting "blame" also makes it easier for folks
using other VCS's that have that command.

thanks,
-- 
-- David  (obrien@FreeBSD.org)

diff -u --show-c-function --minimal -r cvs-1.12.13-STOCK/src/log.c 
cvs-1.12.13/src/log.c
--- cvs-1.12.13-STOCK/src/log.c 2005-03-22 05:19:57.000000000 -0800
+++ cvs-1.12.13/src/log.c       2007-12-02 11:26:31.000000000 -0800
@@ -236,7 +236,7 @@ cvslog (int argc, char **argv)
     prl = &log_data.revlist;
 
     optind = 0;
-    while ((c = getopt (argc, argv, "+bd:hlNSRr::s:tw::")) != -1)
+    while ((c = getopt (argc, argv, "+bd:hlNnSRr::s:tw::")) != -1)
     {
        switch (c)
        {
@@ -255,6 +255,9 @@ cvslog (int argc, char **argv)
            case 'N':
                log_data.notags = 1;
                break;
+           case 'n':
+               log_data.notags = 0;
+               break;
            case 'S':
                log_data.sup_header = 1;
                break;


diff -u --show-c-function --minimal -r cvs-1.12.13-STOCK/src/main.c 
cvs-1.12.13/src/main.c
--- cvs-1.12.13-STOCK/src/main.c        2005-10-02 08:17:21.000000000 -0700
+++ cvs-1.12.13/src/main.c      2007-12-02 11:25:38.000000000 -0800
@@ -138,7 +138,7 @@ static const struct cmd
 {
     { "add",      "ad",       "new",       add,       
CVS_CMD_MODIFIES_REPOSITORY | CVS_CMD_USES_WORK_DIR },
     { "admin",    "adm",      "rcs",       admin,     
CVS_CMD_MODIFIES_REPOSITORY | CVS_CMD_USES_WORK_DIR },
-    { "annotate", "ann",      NULL,        annotate,  CVS_CMD_USES_WORK_DIR },
+    { "annotate", "ann",      "blame",     annotate,  CVS_CMD_USES_WORK_DIR },
     { "checkout", "co",       "get",       checkout,  0 },
     { "commit",   "ci",       "com",       commit,    
CVS_CMD_MODIFIES_REPOSITORY | CVS_CMD_USES_WORK_DIR },
     { "diff",     "di",       "dif",       diff,      CVS_CMD_USES_WORK_DIR },




reply via email to

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