On 13 Sep 2000, Lars Gullik Bjønnes wrote:

> Juergen Vigna <[EMAIL PROTECTED]> writes:
> 
> | On 13-Sep-2000 John Levon wrote:
> | > 
> | > But to do that would require me to have *two* source trees, because cvs
> | > won't know about the new files because I can't do "cvs add".
> | 
> | Well I guess we can add you to the cvs-readonly list AND this means you
> | CAN do an add ;)
> 
> yes.

Then we'll never be able to accept patches from anyone unless they have
cvs access of some description (excluding anonymous cvs).

I have modified GNU diff to be able to emulate `cvs diff`.  This allows
anyone with two copies of a cvs snapshot to modify one and generate a
diff between the two that is the equivalent of what they'd get if we gave
them cvs access.

This way people without anonymous cvs access can work on a snapshot of the
source tree (such as Kayvan makes available).  It also means anyone with
anonymous cvs access can generate patches without Lars having to add them
to a growing list of contributors with read-only access.  They can do a
`cvs update` and fix conflicts just before submitting their patch and
everyone should be happy.

I have both a patch against diffutils-2.7:  (14kB)

http://www.devel.lyx.org/~rae/code/arrae-20000910.diffutils-2.7.patch.bz2

and a patched diffutils-2.7 tree: (256kB)

http://www.devel.lyx.org/~rae/code/diffutil-2.7.arrae-20000911.tar.bz2 

The patch includes full documentation.  I probably went a bit overboard
when I added a couple of extra options for making diffs of directories not
controlled by cvs.  But that's a minor quibble.  I'll probably remove
those extra bits before submitting it to somebody (the ChangeLog indicates
it hasn't been worked on since 1994).

Try:
        ./configure ; make ; make dvi ; xdvi diff.dvi

and read the documentation (see concept index under "comparing cvs
snapshots" or just go direct to "Comparing Directories")

##

Something else that's there that I find useful is:

http://www.devel.lyx.org/~rae/code/packcvs

This is a shell script that works a bit like the old makepatch script we
used to use.  It takes from one to three directories as parameters. With
one directory it produces a tarball of all the files in a subdirectory
_not_ ignored by cvs.  I developed this in an effort to reduce the delays
when trying to compile on my machine at uni.  I previously did a `make
maintainer-clean` before making a cvs snapshot to put on a floppy to take
home.

With two or three directories as arguements a recursive diff will be made
of the two directories using:
        diff -p -N -U 4 -r --emulate-cvs $1 $2 > $3/$patchname

So you don't have to remember what the options are for diff to generate a
nice patch.

##

History 101
===========

I developed these because I had been struggling to work on LyX at home (no
cvs access possible) while minimising the delays when sorting out
conflicts on the lame machine I have to use at Uni and to test compile
after sorting out those conflicts.  I take tarballs home on a floppy disk
(just barely fits these days at 1.85MB on a 1.44MB floppy¹) and bring
patches back to Uni.  I had a modified makepatch script that worked okay
but there were a lot of things it couldn't do (ignored too much or not
enough for example). So packdir (the redecessor of packcvs) was born to
allow me to build tarballs without losing all the compiled object files
(the lame machine takes about 45minutes to compile LyX).  Then I decided
that I couldn't make decent patches using a shell script and modified diff
instead.  That lead to the final revision of packcvs that supports both
packing and diffing cvs snapshots.

Allan. (ARRae)

¹ I "overclock" the floppy to get 1.9MB disks.

Reply via email to