[Mediawiki-l] how to have diff show entire section, not just differences

Monahon, Peter B. Peter.Monahon at USPTO.GOV
Tue Oct 16 13:58:17 UTC 2007


(Starting from
http://lists.wikimedia.org/pipermail/mediawiki-l/2007-October/024031.htm
l)

>> Earlier: How can I set the default edit 
>> history diff to show the entire section 
>> being edited left and right, not just the few 
>> lines surrounding displayed differences?

> Response #1: ...hack up DifferenceEngine.php 
> to identify section breaks and add extra 
> stuff to output...

Peter Blaise responds: Thanks for the pointer on one place to study the
issue:

	...\mediawiki\includes\DifferenceEngine.php 

> Response #2: ... wikEd has a library for 
> embedding DIFFs into the page:
> http://en.wikipedia.org/wiki/User:Cacycle/wikEdDiff 

Peter Blaise responds: From that page: 

	"...Unchanged regions of the text are omitted from the
output..." 

	... so I have the same challenge with wikiEdDiff - how to show
the ENTIRE comparison?  So, I'm really trying to get a "comparison"
feature, not merely a "difference" feature.

COMPARE versus DIFF:

	I think I am looking for a "COMPARE article/section versions in
toto" function, rather than, or as a supplement to, the current "DIFF"
function, which has only minimal lines immediately before and after any
differences.  

DIFF DEPTH:

	I think, however, I'd like to also have a toggle for punctuation
and white space differences, versus text content, in a diff display, so
"mere" commas and other punctuation do not generate a diff report line,
if I so choose.  That would be a nice variable option in a "diff"
function - to control depth of diff analysis and display.  So far, I see
a potential for three or four desired options for diffs: 

	- punctuation and/or white space on/off, 
	- text on/off, 
	- total comparison on/off.

	That "total comparison" is the prime goal I am after at the
moment.  Right now, in MediaWiki, I note that it's as if options one and
two above are on, and option three above is off.  How to turn it on?

COMPARE ARTICLES:

	Hey, it's a database that never throws anything away!  What will
it take to compare anything in that history to anything else in that
history?  Others here may have ideas for enhanced choices they are
looking for in a history difference display, or even a comparison
between articles.  That is, wouldn't it be nice to compare live
MediaWiki articles, not just the historical editing differences
underneath only one article?

	"Why," you might well ask?  Well, I might well say ... when
cleaning up our wiki, I often come across articles that appear
redundant, maybe.  I have to read them both.  They appear to have
similar contents but slightly (or vastly) different names, say,
[[Chapter 700]] versus [[Chapter 0700]].  What are these?  Which, if
either, is most current?  Were these identical copies entered by
different people trying to superimpose their own different sense of
nomenclature order on the wiki?  I don't know!  The only way I can
figure out how to have MediaWiki help me compare them is to cut and
paste the contents of one article over the contents of the other
article, then do an edit history diff.  If I could only do a diff
between live articles first, then that would save a step.  

	Also, such a "diff" feature comparing live articles would have
nice benefits for the regular end-user, allowing them to see live
comparisons between any live pages of their own choice and control.  In
our case (law history), I can see a desire to compare current law pages
versus archive (old law) pages.  Again, "Why," you might well ask?  Well
... our wiki's prime namespace contains current legal decisions released
for comment on the discussion/talk pages.  Before commenting, people
would like to compare the current release to past releases so they don't
re-make old suggestions, like, "Why don't we do such-and-such?" and
another person may say, "We tried that last time and it failed, don't
you remember the prior version?"  It would be nice if the wiki, using
it's superlative database record keeping, offered to compare any stored
versions for the reader - an extension of the single-page "diff" feature
into an "any-pages" diff.  

	So, I'd like to create a wiki namespace for previous (retired)
law releases so these old pages do not come up in the current namespace
search or listings (why else hide articles in alternative namespaces?).
Putting old versions in separate namespaces would allow redundant
identical page names through time:

	[[1stEdition:Chapter 700]]
	[[2ndEdition:Chapter 700]]
	[[3rdEdition:Chapter 700]]

	But, my challenge is how to allow the visitor to compare two
live pages, one from each edition?

	Right now, I use the single-page "diff" feature by carefully
uploading (editing) the 4th edition copy first and put it into the main
namespace, then uploading (editing) the 5th edition copy right on top of
it.  I then have two, and only two, revisions in the diff history for
each article.  Great.  (Sort of ... for all my effort to upload the
entire older edition of the law, the older edition is lost down in the
single-page diffs, and is not searchable on it's own in it's own
namespace!  Drat!)  But, that takes care of the recent two versions of
that law release - versions I have ready access to original files.  But,
when I finally find and want to upload an even older edition from the
ancient, off-line archives, how do I then put that older version
*behind* the current earlier history rather than on top of the latest
version?  In other words, how to I edit the diff histories to put them
in the order I prefer?  Simple:

	- delete the entire page first and start from scratch!
	- upload 3rd edition
	- upload 4th edition on top of it
	- upload 5th edition on top of it

	Whew!

	Argh!

	But, then, after all that careful building, anyone can compare
any edition using the single-page edit-history diff feature.  And, of
course, the earlier, now buried editions are not searchable.

	... if I could merely upload each antique archive edition to
it's own namespace...

	... and if I had a live article comparison feature...

	... then the visitor could compare anything on their own!

	Thanks for reading through all this, and thinking about the
potential generated by the "diff" feature.  It's all just tools, and I
suppose we each are just building surprisingly different universes with
our various MediaWiki engines and extension tools.  If anyone has any
energies to keep pursuing this idea, please share here
(http://lists.wikimedia.org/mailman/listinfo/mediawiki-l), or on
http://www.MediaWiki.org/ and let's see where this goes.




More information about the MediaWiki-l mailing list