Re: New patchfs script



Hello!

> Hi. I've rewiten patchfs in Perl - now it can properly handle all
> patches in unified diff format (the most common format for patches).

Thank you!

> Methods supported: list, copyout

Please use "-w" (see the first line in uzip).  There are some warnings
with copyout.  Also, the size of the files is still 0:

$ perl -w ./patchfs list extfs_dirty.diff
-rw-r--r-- 1 proski proski 0 12-09-02 12:06 extfs.c
-rw-r--r-- 1 proski proski 0 12-09-02 12:06 extfs.h
$ perl -w ./patchfs copyout extfs_dirty.diff extfs.c extfs.c
Use of uninitialized value in string eq at ./patchfs line 50, <I> line 1.
Use of uninitialized value in print at ./patchfs line 69, <I> line 117.
$

I don't know if calculating the file sizes in "list" will slow it down.
Maybe we should fix the editor not to trust mc_stat() too much, but it was
already attempted.

I hope to put your script on CVS today and I'm ready to make fixes myself,
but I just want to give you are chance to do it right.

> I have some issues on my todo list (info about size, date), but I
> think this extfs is already ready for inclusion.

It's certainly an improvement over what we had.

> Entry to add to mc.ext:
>
> regex/\.(diff|patch)(\.(bz|bz2|gz|z|Z))?$
>         Open=%cd %p#patchfs

It would be great, but only after fixing file sizes.

> PS. The latest mc snapshot segfaults after pressing f4 to edit file.
> Don't have time to check if it's fixed in cvs.

Fixed.  My bad.  Classical chicken and egg problem (i.e. it's broken only
the first time) :-)

-- 
Regards,
Pavel Roskin



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