patchfs fix for unified diffs
Pavel Roskin
proski at gnu.org
Tue Oct 14 04:18:34 UTC 2003
On Mon, 13 Oct 2003, Oskar Liljeblad wrote:
> Hello
>
> This patch fixes a bug in MC's patchfs.
> Without the patch the linux kernel 2.4.21 patch
> (ftp://ftp.kernel.org/pub/linux/kernel/v2.4/patch-2.4.21.gz)
> could not be viewed because it contained a few lines which
> confused the patchfs parser:
>
> --- Sym = Symetric: both link partners are allowed to send PAUSE frames
> --- SymOrRem = SymetricOrRemote: both or only remote partner are allowed
> - to send PAUSE frames
>
> You'd get some dialog saying that the unified diff couldn't
> be parsed. This patch fixes that by parsing @@-lines in
> the diff and that way counting number of lines in each hunk.
> All lines in the hunk are then ignored instead of being parsed.
I like the idea, but I'm afraid your implementation is incomplete. There
are more cases when the file is split into parts by looking at at the
separators only. Let's see:
list - fixed in your patch
copyout - fixed in your patch
rm - not fixed
copyin - not fixed
Is there any reason to handle rm and copyin differently? Maybe it's
better to put this code in one place? Also, context diffs need this fix
too, if I understand correctly.
--
Regards,
Pavel Roskin
More information about the mc-devel
mailing list