[darcs-users] How to look at older versions of a file

Gaetan Lehmann gaetan.lehmann at jouy.inra.fr
Thu Dec 1 08:51:21 UTC 2005


On Thu, 01 Dec 2005 06:35:06 +0100, Alberto Bertogli  
<albertogli at telpin.com.ar> wrote:

> On Wed, Nov 30, 2005 at 11:10:57PM +0000, Daniel Carrera wrote:
>> Richard A. Smith wrote:
>> >darcs unpull
>> >
>> >You can then select the patches you want to back out and the copy of  
>> the
>> >file you desire will be the version you are interested in.
>>
>> What would be really nice is to output the contents of one specific file
>> as it was before patch xyz was applied. I think that's what Rob wants,
>> and it's certainly something I would want.
>>
>> Is there a way to do this?
>
> Yes. You can do "darcs annotate file -p patch" and parse the annotate
> output. If you just want the file contents, write a script that parses  
> the
> XML output and show you the "clean" file.
>
> If you need sample code, you can find it in darcsweb's annotate parsing.
>
>
> Oh, well, it's too tempting; the script is attached =P
>
> darcs annotate --xml-output filename -p "Patch description" | ./ann2ascii
>
> will do the trick.
>
> I haven't tested it a lot, and could be cleaner; but I guess it's useful
> as an example.
>

This feature should be implemented in "darcs query" if it does not exist  
elsewhere.
Any volunteer ? :-)

-- 
Gaëtan Lehmann
Biologie du Développement et de la Reproduction
INRA de Jouy-en-Josas (France)
tel: +33 1 34 65 29 66    fax: 01 34 65 29 09
http://voxel.jouy.inra.fr




More information about the darcs-users mailing list