Tags:
create new tag
, view all tags

Bug: Diff should suppress META:TOPICINFO

The latest diff changes are flexible. There is one usability issue. Every time the first line, META:TOPICINFO, gets shown as changed. Which is true since it does change with every revision (kind of a cache to show revision info quickly).

Showing META:TOPICINFO in diff is just duplicating information and eating screen real estate, so it should be removed.

Test case

Click on the Diff link on any topic that has more then one revision.

Environment

TWiki version: Latest Alpha, TWiki.org
TWiki plugins: N/A
Server OS: N/A
Web server: N/A
Perl version: N/A
Client OS: N/A
Web Browser: N/A

-- PeterThoeny - 08 May 2004

Follow up

Removing META:TOPICINFO lines from a unified diff output can be done with this pseudo code:

  • for each @@ diff section that has META:TOPICINFO lines:
    • remove lines that start with -%META:TOPICINFO{ or +%META:TOPICINFO{
    • remove whole @@ diff section if there are no other changes, e.g. no more lines starting with - or +

Example unified diff output where only META:TOPICINFO changed:

-bash-2.05b$ diff -u tt1 tt2
--- tt1 2004-05-08 14:09:26.000000000 -0700
+++ tt2 2004-05-08 14:09:52.000000000 -0700
@@ -1,4 +1,4 @@
-%META:TOPICINFO{author="PeterThoeny" date="1079599860" format="1.0" version="1.81"}%
+%META:TOPICINFO{author="FooBar" date="1079599860" format="1.0" version="1.82"}%
 line 2
 line 3
 line 4
@@ -7,7 +7,7 @@
 line 7
 line 8
 line 9
-line 10
+line 10 - change
 line 11
 line 12
 line 13

Example unified diff output where META:TOPICINFO and second line changed:

bash-2.05b$ diff -u tt1 tt3
--- tt1 2004-05-08 14:09:26.000000000 -0700
+++ tt3 2004-05-08 14:10:00.000000000 -0700
@@ -1,5 +1,5 @@
-%META:TOPICINFO{author="PeterThoeny" date="1079599860" format="1.0" version="1.81"}%
-line 2
+%META:TOPICINFO{author="FooBar" date="1079599860" format="1.0" version="1.82"}%
+line 2 - change
 line 3
 line 4
 line 5
@@ -7,7 +7,7 @@
 line 7
 line 8
 line 9
-line 10
+line 10 - change
 line 11
 line 12
 line 13

Something simiar can be done for context diff (diff -c)

Also, it looks like the diff code change is not yet done for RcsLite

-- PeterThoeny - 08 May 2004

Why do you consider this a bug not a "FeatureEnhancementRequest"?

  • Reasons: (1) It shows information that is already displayed in each diff section (user and date); (2) it shows internal cache information; (3) the old implementation filtered it out -- PeterThoeny - 08 May 2004
    • Thanks. I accept (3) is a good reason. -- MRJC

-- MartinCleaver - 08 May 2004

Sadly, I actually like seeing the META:TOPICINFO as I can see it when I scroll quickly - and its a confirmation that things are as i expect.

I agree that this needs to be optionally turned off (with off as a default) - as it should also be possible to turn off the FORM:FIELDS part fo the diff..

I wouldn't delay CairoRelease for it though..

I'll do it unless someone else gets there first

-- SvenDowideit - 09 May 2004

Hmm, I think a diff should show exactly what changed, excluding the FORM:FIELDS would change the semantics. I see the TOPIC:INFO as a special case, internal cache information that should be suppressed.

-- PeterThoeny - 09 May 2004

Fix record

Done for CairoRelease:

  • The META:TOPICINFO is now removed from the diff
  • This fix is in SVN

Pending for DakarRelease:

  • Remove adjacent unchanged lines
  • Remove whole diff if no change left
    • is this possibly confusing? (mmm, replace changeless diff with explaination "no detectable changes made" -- SD
    • good point, probably so. Sidenote: Older TWiki versions actually used a nify feature of RCS: The top revision got automatically removed if you re-saved a topic that looks exactly the same as the previous revision. This feature is now gone since the time we cache the topic info. -- PTh
  • Possibly add switch to turn this on/off (although I find this overkill)
    • turn what on/off? -- SD
    • Switch to remove topic info or not (I prefer the current mode of always removed) -- PTh

-- PeterThoeny - 08 Aug 2004

Will one of you please decide what you are going to do about this?

-- CrawfordCurrie - 14 Apr 2005

As far as i'm concerned, the changes made to Cairo are all that is required. so i'm putting this to done.

-- SvenDowideit - 30 Apr 2005

Edit | Attach | Watch | Print version | History: r14 < r13 < r12 < r11 < r10 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r14 - 2005-04-30 - SvenDowideit
 
  • 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-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.