[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
cvs status and up-to-date files
From: |
Juha Takala |
Subject: |
cvs status and up-to-date files |
Date: |
Fri, 27 Oct 2000 12:06:11 +0300 (EEST) |
Hi!
This information is for cvs version 1.11, on Redhat Linux 6.2 (but I suppose
it applies to other versions, too).
Problem: The output of `cvs status' includes information about all the files
in current directory. In larger projects there may be lot of files that are
"Up-to-date". In my opinion, the information (noise?) about them makes the
output less readable.
Solution: I implemented `cvs status -u', meaning "Don't display Up-to-date
files". The default behaviour is same as before. The patch is below.
Because I don't know the internal workings of cvs client/server system, I
strongly suggest that someone look carefully if the change is compatible
with the design principle etc. Feel free to do whatever you like.
-juha
--- status.c~ Wed Jun 2 00:36:33 1999
+++ status.c Fri Oct 27 11:08:46 2000
@@ -18,6 +18,7 @@
static int local = 0;
static int long_format = 0;
+static int display_uptodate = 1;
static RCSNode *xrcsnode;
static const char *const status_usage[] =
@@ -26,6 +27,7 @@
"\t-v\tVerbose format; includes tag information for the file\n",
"\t-l\tProcess this directory only (not recursive).\n",
"\t-R\tProcess directories recursively.\n",
+ "\t-u\tDon't display Up-to-date files.\n",
"(Specify the --help global option for a list of other help options)\n",
NULL
};
@@ -42,7 +44,7 @@
usage (status_usage);
optind = 0;
- while ((c = getopt (argc, argv, "+vlR")) != -1)
+ while ((c = getopt (argc, argv, "+vlRu")) != -1)
{
switch (c)
{
@@ -55,6 +57,9 @@
case 'R':
local = 0;
break;
+ case 'u':
+ display_uptodate = 0;
+ break;
case '?':
default:
usage (status_usage);
@@ -77,6 +82,8 @@
send_arg("-v");
if (local)
send_arg("-l");
+ if (!display_uptodate)
+ send_arg("-u");
/* For a while, we tried setting SEND_NO_CONTENTS here so this
could be a fast operation. That prevents the
@@ -162,6 +169,8 @@
sstat = "Entry Invalid";
break;
case T_UPTODATE:
+ if (!display_uptodate)
+ goto get_out;
sstat = "Up-to-date";
break;
case T_NEEDS_MERGE:
@@ -306,6 +315,7 @@
}
cvs_output ("\n", 0);
+ get_out:
freevers_ts (&vers);
return (0);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- cvs status and up-to-date files,
Juha Takala <=