From: Hal Niner
Subject: Automatic generation of patches.
Date: 
Message-ID: <1533d93d.0310310942.19cf47fd@posting.google.com>
I'm looking for a automatic way of generating files that patch a live
running system.  My idea is: I have (a) an old source code (b) a new
source code.  Somehow I want to generate a file containing the
difference between (b) and (a) that can be (LOAD)ed into a running
lisp system.  Ideally this file would containg only the minimal
changes needed to upgrade the live system.

From: Henrik Motakef
Subject: Re: Automatic generation of patches.
Date: 
Message-ID: <864qxpz3hk.fsf@pokey.internal.henrik-motakef.de>
····@cyberspace.org (Hal Niner) writes:

> I'm looking for a automatic way of generating files that patch a live
> running system.  My idea is: I have (a) an old source code (b) a new
> source code.  Somehow I want to generate a file containing the
> difference between (b) and (a) that can be (LOAD)ed into a running
> lisp system.  Ideally this file would containg only the minimal
> changes needed to upgrade the live system.

There is some diff-like stuff in the CMU AI repository that could be useful:
<http://www-cgi.cs.cmu.edu/afs/cs/project/ai-repository/ai/lang/lisp/code/tools/src_cmp/0.html>

But that will only help you with finding differences in source code,
for a useful patch you will need more. I doubt that an automatic
solution can work reliably.
From: Paul Wallich
Subject: Re: Automatic generation of patches.
Date: 
Message-ID: <bnu90p$jd8$1@reader2.panix.com>
Henrik Motakef wrote:

> ····@cyberspace.org (Hal Niner) writes:
> 
> 
>>I'm looking for a automatic way of generating files that patch a live
>>running system.  My idea is: I have (a) an old source code (b) a new
>>source code.  Somehow I want to generate a file containing the
>>difference between (b) and (a) that can be (LOAD)ed into a running
>>lisp system.  Ideally this file would containg only the minimal
>>changes needed to upgrade the live system.
> 
> 
> There is some diff-like stuff in the CMU AI repository that could be useful:
> <http://www-cgi.cs.cmu.edu/afs/cs/project/ai-repository/ai/lang/lisp/code/tools/src_cmp/0.html>
> 
> But that will only help you with finding differences in source code,
> for a useful patch you will need more. I doubt that an automatic
> solution can work reliably.

Fer example, you'd have to do some reasoning to capture changes in the 
formats of data structures passed among functions and generate the 
appropriate conversions. Alternately you could restrict "legal" changes 
in source files to ones that could be handled by your patch system, but 
that might not be satisfactory either.

paul
From: Espen Vestre
Subject: Re: Automatic generation of patches.
Date: 
Message-ID: <kwfzh57td2.fsf@merced.netfonds.no>
····@cyberspace.org (Hal Niner) writes:

> I'm looking for a automatic way of generating files that patch a live
> running system.  My idea is: I have (a) an old source code (b) a new
> source code.  Somehow I want to generate a file containing the
> difference between (b) and (a) that can be (LOAD)ed into a running
> lisp system.  Ideally this file would containg only the minimal
> changes needed to upgrade the live system.

I use a fairly naive "lisp diff" program that roughly does the 
following:

 - constructs the set-difference between the two programs (testing
   with a function which is roughly EQUALP)
 - adds dummy methods for any _removed_ methods (alternatively, one
   could add forms that actually removed those methods)
 - adds setf-forms corresponding to any changed DEFVARS.
 - inserts IN-PACKAGE wherever it occurs

It's by no means perfect, but I actually _very_ rarely have to do 
any manual amendments to the patches automatically created with this 
program.
-- 
  (espen)
From: Martin Ginkel
Subject: Re: Automatic generation of patches.
Date: 
Message-ID: <boaj7t$pgq$1@gwdu112.gwdg.de>
Espen Vestre wrote:
> I use a fairly naive "lisp diff" program that roughly does the 
> following:
> 
>  - constructs the set-difference between the two programs (testing
>    with a function which is roughly EQUALP)
>  - adds dummy methods for any _removed_ methods (alternatively, one
>    could add forms that actually removed those methods)
>  - adds setf-forms corresponding to any changed DEFVARS.
>  - inserts IN-PACKAGE wherever it occurs
> 
> It's by no means perfect, but I actually _very_ rarely have to do 
> any manual amendments to the patches automatically created with this 
> program.

Send links ;-)!

I would like to include CVS into the process of diff-generation, but 
that is probably not too hard.
The deleted methods problem is already solved by a delete-method macro 
(working by name, quals and lamdas).

The  main things, I need to compute are the lists of changed definitions 
and the order of patching (probably from defsystem).

	Martin