[Top][All Lists]

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

Re: Updating third party software

From: Kaz Kylheku
Subject: Re: Updating third party software
Date: Mon, 14 Oct 2002 10:14:01 -0700 (PDT)

On Mon, 14 Oct 2002, Ripalda-Marin, Miguel-Angel wrote:

> Hi everybody,
> I'm tracking a third party software within my CVS repository. Till now, what

My condolences. ;)

> I've done is this:
> 1.- Downloaded the initial release of the 3rd party software.
> 2.- Create a new module within my CVS repository.
> 3.- Work within the HEAD main branch.
> Now, another release of that 3rd party software has been published, and I
> would like to update my CVS repository. The first problem that I've come up
> with, is this one: there is no patch-like incremental release.
> To deal with this, I have tried to follow these steps:
> 1.- Download that new realese.
> 2.- Export the old release of that package from my CVS repository:
>       $ cvs export -r THIRD_PARTY_BRANCH package

Note that CVS has a lame form of third party code tracking known as
the ``vendor branch'' feature. This happens to be suitable for what you
are describing, namely creating a project by importing some third party
code and then keeping up with patches from that third party code.

The problem with the vendor branch is that it starts at version 1.1 of every
file ( really, but that's an internal detail). You cannot start
a vendor branch somewhere halfway up your trunk, so vendor branching is
useless for the case when someone takes some release of your code and
becomes a patch; you then have to track their patches on a real branch,
the methods that you describe.

> 3.- Create a patch file with diff, with the changes from the old to the new
> release of the package:
>       $ diff -rP <old version dir> <new version dir> > patch.file

You should make a unified diff (-u) if you are going to be using the result
to patch. Also, include the -N parameter to make sure that any files
that exist in the new version, but do not exist in the old version, are
included in the patch!  So just run ``diff -urN''.

> 4.- Checkout the branch fro the 3rd party tracking:
>       $ cvs checkout -r THIRD_PARTY package
> 5.- Apply the patch file to the module:
>       $ cd package
>       $ patch -Np1 patch.file
> 6.- Commit changes.
> But in step 5, it tells me that it cannot find the files to patch... what am
> I doing wrong?

Read the man page on patch. The syntax is:

    patch [ options ] [ originalfile [ patchfile ] ]

but usually just

    patch  -p<number> < patchfile

So if you run it the way you have, it is interpreting patch.file as the
originalfile argument.

Meta-CVS: directory structure versioning; versioned symbolic links;
versioned execute permission; versioned property lists; easy branching
and merging and third party code tracking; all implemented over the
standard CVS command line client --

reply via email to

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