r17 - 14 Apr 2008 - 22:51:52 - KennethLavrsenYou are here: TWiki >  Codev Web > DiffAttachments
Tags:
, create new tag
This is a small patch that will show you the diffs of attachments. I wrote it with the idea that you could see the differences between various versions of an attached perl script.

There's a problem with binary files. I'm not totally familiar with the way that twiki implements diff, but on my system, diffing two binary files with GNU diff (v2.8.1) returns the message that "binary files foo and bar differ". The diff that twiki uses actually tries to diff the binaries and garbage is printed to the screen. I haven't thought of a way to work around that yet.

In any case, I find it useful. Perhaps someone smarter than me can massage it so that it will handle binary files correctly. These patches are against the latest stable version of TWiki (sorry, can't remember the code name). Please let me know if the patch is screwed up. It seemed to work for me when I tested it.

Category: TWikiPatches

-- AlexChiang - 09 Aug 2003

If there is any chance that this patch can be re-done using -u to give us context that would be great. We should consider it anyway though

-- SvenDowideit - 09 May 2004

I am attaching 3 context patches, respectively for lib/TWiki/Store.pm, bin/attach, and bin/rdiff. These are diffs against the unmodified Feb 2003 release.

-- AlexChiang - 26 Jul 2004

It should be possible to convert popular binary attachment format files (such as MS Word, Powerpoint, PDF, etc.) to HTML in order to facilitate using vanilla diff tools. Google already has the technology to display binary files like these in best effort HTML.

-- NiallMurray - 18 Aug 2005

How does this patch translate to versions 4.x.x ? Or is there already some way to do attachment diffs that I don´t know about?

-- MikkoLaakso - 11 Apr 2007

Eeeeek, another forgotten patch. I'd like to suggest it for the next release - can someone do me a favour and ask me about it in a month? (in case i forget again)

-- SvenDowideit - 11 Apr 2007

SvenDowideit, consider yourself asked.

-- JohnRouillard - 11 May 2007

Sven, did you see this?

-- JohnRouillard - 14 May 2007

I miss this feature as well, would be really useful.

-- MikkoLaakso - 20 May 2007

sven is too busy with user changes to work on this. if someone else would like to take on the task of bring the code patch up-to-date, then this could be something that ships for 4.2. otherwise, i would support its inclusion in a 4.2.1 release.

-- WillNorris - 25 May 2007

This proposal did not make the deadline for Freetown. The target is now Georgetown.

I am convinced noone will look at it for quite a while.

I am stopping the 14-day clock by raising this concern.

I would like to know how the feature will handle binary files such a jpegs, gifs, MS Word docs etc etc. A diff is not worth much unless it is a text file. I would not want to see a feature that produces garbage output for most files.

-- KennethLavrsen - 28 May 2007

This proposal has been waiting for answers to the concern I raised.

How will this feature handle non-text attachments? I cannot see that the attached patches address this.

If this can obvious issue can be handled in the spec (e.g. do not show a diff link unless the extension is one of a known list) then I have no further reservations against the proposal.

Is there still an interest in driving this proposal or do we just park it?

-- KennethLavrsen - 14 Apr 2008

 
Topic attachments
I Attachment Action Size Date Who Comment
elsepatch Store.pm.patch manage 1.3 K 26 Jul 2004 - 23:29 AlexChiang part 1 of 3
elsepatch attach.patch manage 1.2 K 26 Jul 2004 - 23:31 AlexChiang part 2 of 3
elsetwiki patch.twiki manage 6.0 K 09 Aug 2003 - 08:06 AlexChiang patch to diff attachments
elsepatch rdiff.patch manage 1.6 K 26 Jul 2004 - 23:32 AlexChiang part 3 of 3
Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r17 < r16 < r15 < r14 < r13 | More topic actions
 
Powered by TWiki
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback SourceForge.net Logo