W3C home > Mailing lists > Public > www-validator@w3.org > February 2001

Re: CVS information

From: Terje Bless <link@tss.no>
Date: Thu, 01 Mar 2001 00:22:37 +0100
Message-ID: <3A9D883C.F96FF80D@tss.no>
To: www-validator@w3.org
Brian Gilkison wrote:

>For future reference, my question is, is the output from 'cvs diff' useful
>for contributing patches?


>I've tried using rdiff to make a patch file,
>but rdiff seems to only work against what files are actually in the
>repository? (As I've said in the past, bear with me on my UNIX skills...)

"rdiff" is for making a diff between two _remote_ ("repository") revisions.
You want "diff".

> I thought adding the 'l' switch to something like:
> cvs rdiff -l -r 1.78 -r check validator/httpd/cgi-bin/check

You don't need the "-r 1.78" unless you're diffing against an old version.

To generate a unified diff do:

# Diffs *all* modified files in repos.
# (CWD must be inside local repos.)
cvs diff -u

# Diffs just the "check" file (in CWD).
cvs diff -u check

# Full path.
cvs diff -u validator/httpd/cgi-bin/check

I usually use the first form.

The "correct" way to generate a patch is to develop your changes. Check out
a clean source three from w3.org. Merge in your changes in the clean three.
From the root of the local CVS three, do "cvs diff -u
>/tmp/patch_name.diff". Test the patch by applying it to a a clean source three. Send it to www-validator.

That sounds more complicated then it is. :-)

>would generate the patch against my local copy of check, but I get back a
>'cvs [server aborted]: no such tag check' error.  Am I missing something
>here?  Or is it simply not permitted to generate a patch file?  Or am I
>just clueless?  Honesty is appreciated...

You haven't wrapped your head around CVS' quirks yet. It takes a while for
a normal human brain to get atuned to the strange harmonics emanating from
the Cederquist. Your command "cvs rdiff -l -r 1.78 -r check
validator/httpd/cgi-bin/check" is trying to do a remote diff ("cvs rdiff")
between revision 1.78 ("-r 1.78") and revision "check" ("-r check") for the
file "validator/httpd/cgi-bin/check". Since "check" clearly isn't a valid
revision number, CVS tries to interpret it as a branch "tag". Since there
is no such tag, the server will abort telling you "no such tag".

In the majority of cases, you'll have made small changes to a single file.
Apply your changes to a clean source three, make sure you are in the same
directory as the modified file, and just do "cvs diff -u <filename>".
Everything over that is just window dressing.

If you need to change multiple files, consider making multiple patches
until you feel confident with CVS. The method is still just: be in the
right directory (now "right" has changed to "the root of the CVS three"),
run "cvs diff -u". But once you have multiple files the changes are
starting to become a bit larger and may require futzing with revision
numbers, branch tags, and the quirks of -Wall's patch(3).

*ding* Aha! _Now_ I know where I know you from! You're the Brian Gilkison
from over in the Perl end of the world, right? That would explain it;
you're ruined by Perforce! :-)
Received on Wednesday, 28 February 2001 18:22:42 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:17:29 UTC