create new tag
, view all tags
Here's an idea. I am guessing this would be implemented as a plugin. I'll describe the idea to begin.

Each page as it grows contains contributions from all kinds of people. Some I know to be good and some I know to be bad. I have this situation with someone who trashed a topic I felt very strongly about. I'm printing the diffs on the topic and back tracking. Another set of reference experiences are using the incredibly useful X-windows versions of diff. tkdiff is a tool that is very useful. There's a few other cool diff utilities that give change bars in different ways.

Now in a TWiki context we already have the diffs from the RCS. That's wonderfully useful. However in cases like the above situation I'm dealing with a feature that shows which author wrote which line of a topic would be very very useful. Basically assign a color code to each author of a topic, put the assignment in a little box at the top and then show the topic with colored change bars along the left side depending on who wrote that line. Implementation wise most of the code for coloring the lines and displaying them is probably reusable from the diffs functionality (rdiff script) that already works. It's just a matter of pulling the RCS data and author data together and grinding through the RCS line by line to get a final product. Perhaps the result can be cached for future speed when requesting topic authors and when the topic hasn't changed.

From a user interface perspective this feature could go in several different places. It would probably vary from skin to skin. On the GNU skin it would fit well on the "more" page. On the default skin it might be another button at the bottom next to "diffs" that says "authors" or something.

-- GrantBow - 29 Dec 2002

Related Topics: BetterMarkup BetterColors BetterIndicators


This is basically what cvs annotate does (also in Subversion as 'blame', which explains what it is used for smile ). Not sure how easy this is to do in RCS, but anything's possible really.

One issue with doing this is that TWiki pages often have one line per paragraph, making it hard to see changes within a long para. It might be possible to do WordDiff to make this work better.

-- RichardDonkin - 29 Dec 2002

I've been thinking of doing this for some time. As Algorithm::Diff is already in TWiki and we have a generalised interface to version control (well almost) it should be a relatively simple algorithm to extact the required information (though I'm not sure what one would do on the word level changes). I agree the how this is displayed should be controlled by the skin. My thoughts were:

  • need a way of selecting which diff type you want to see
  • be able to skin the appearance of different diff types

-- JohnTalintyre - 31 Dec 2002

Thanks for renaming this topic, Richard. I think RCS natively uses a unit of lines for diffs and that's all I was thinking about, just a color to the left of each line that matches who did the last edit. I'm glad to hear this "shouldn't" be too difficult from a code perspective. I for one would find this very useful from time to time. It's not something I would use every day, but it will DEFINATELY come in handy when I need to seek out "blame!" wink

I also just added related topics to the top of the page.

-- GrantBow - 04 Jan 2003

One low-tech workaround for this is to copy a phrase from the offending line, then hit the Diffs link and do a search within the page for the phrase - should make it reasonably easy to find the author, though of course real change bars would be nicer.

I don't think this feature will be very usable without WordDiff, though - for example, the previous paragraph is rendered as 3 lines in my browser, but is only one line in the raw topic file. Imagine if a long paragraph is updated by several people, including an innocuous change by the last person - that person would get the 'blame' for an undesirable change elsewhere in the long para...

-- RichardDonkin - 05 Jan 2003

That's a good point Richard. However with a (relatively easy to implement) line diff algorithm at least a rough idea can be established for the last one to edit a line. I still think this would be very useful.

-- GrantBow - 07 Jan 2003

Edit | Attach | Watch | Print version | History: r10 < r9 < r8 < r7 < r6 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r10 - 2008-08-25 - TWikiJanitor
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.