Hi,

I have made the following changes to the CVS source code so that it better
suits my needs; it would be nice if you could roll these into the official
codebase.

The first change involves adding the following logic to the end of the
remove_entry_and_file() function in client.c:

    else
      {
      char *p = short_pathname;

      if(strlen(p) > 2)
        if(!strncmp(p, "./", 2))
          p += 2;
      
      cvs_output("X ", 0);
      cvs_output(p, 0);
      cvs_output("\n", 1);
      }


This causes CVS to print out an update record for files that have been deleted
from the repository since the last update, e.g.:

U src/foo.c
A src/bar.c
X src/baz.c

which means foo.c was updated, bar.c was added, and baz.c was removed. This
makes it much easier for tools and scripts that use CVS to determine that a
file has been removed (the alternative was to parse the stderr output for "xxx
is no longer pertinent" warnings, which was ugly).

====

The second change entails adding a new command line switch to the 'cvs update'
command. I chose '-z' but that was arbitrary. In update.c, in the argument
parsing loop, I modified the while statement as follows:

    while ((c = getopt (argc, argv, "+ApPflRQqduk:r:D:j:I:W:z:")) != -1)

and added the switch statement:

        case 'z':
          ign_dir_add(strdup(optarg));
          break;


This allows me to specify directories to ignore when doing a 'cvs update'. All
the support for ignoring directories already exists in CVS: it's just not
accessible because AFAIK there is no command line switch to invoke the
behavior (-I apparently only ignores files, not directories). For example:

cvs update -d -z skipme

Would ignore the directory 'skipme' during update.

====

These two changes are trivial but make my life soooo much easier...it would be
great if you could incorporate them into the CVS codebase.

Cheers,
Mark

------------------------------------------------------------------------------
Mark Lindner            http://www.dystance.net/           [EMAIL PROTECTED]
------------------------------------------------------------------------------
begin:vcard 
n:Lindner;Mark
x-mozilla-html:FALSE
org:eBuilt, Inc.;Engineering
adr:;;;;;;
version:2.1
email;internet:[EMAIL PROTECTED]
title:Java Developer / UNIX Evangelist
x-mozilla-cpt:;0
fn:Mark Lindner
end:vcard

Reply via email to