https://bugzilla.wikimedia.org/show_bug.cgi?id=39637

       Web browser: ---
             Bug #: 39637
           Summary: diff3 error message logged when undoing an edit at end
                    of file
           Product: MediaWiki
           Version: 1.20-git
          Platform: PC
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: Unprioritized
         Component: History/Diffs
        AssignedTo: [email protected]
        ReportedBy: [email protected]
    Classification: Unclassified
   Mobile Platform: ---


Problem: I host a public MW and it causes the following message to repeatedly
appear in my Apache error.log file:
/usr/bin/diff3: No newline at end of file

At least one situation I've been able to track down which commonly triggers
this "error" is anytime someone attempts to "undo" an edit, which is prior to
the most recent edit, which was at the bottom of the page in the revision in
which it was made.

Minimal example: On a fresh 1.20 install, I create a new page "X" with content
"a". Then I edit page "X" to add a newline and "b". Then another edit to add a
newline and "c". Now if I click "undo" on the second ("b") edit, with "tail -f
/var/log/apache2/error.log" running in another window, I immediately see the
diff3 error appear.

Hack solution: If I make the following mydiff3 function:

#!/bin/bash
diff3 $* |& grep -v "No newline at end of file"

and point wgDiff3 to mydiff3, then (naturally) the error no longer appears in
my log files, and the wiki appears to continue to function as expected.

Severity: I have not been able to find any circumstances where this reported
diff3 "No newline" error causes any unexpected behavior with MW's "undo"/merge
functionality. At this point, the worst consequence I see of this bug is that
it fills my Apache error logs to an extent that gets in the way of me noticing
other errors and bugs.

Relevant system info:
diff3 (GNU diffutils) 3.0
Server version: Apache/2.2.16 (Debian)
Observed this bug in MW 1.15.5 and current 1.20-git

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to