https://bugzilla.wikimedia.org/show_bug.cgi?id=28202
Summary: getDiff() not differentiating between connection error
and empty diff.
Product: MediaWiki extensions
Version: any
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: Normal
Component: CodeReview
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
CodeRepository::getDiff() returns the diff as a string, or a numeric constant
if it is unable to get the diff for any reason. The constant describes the
reason the diff failed.
Currently the function can't tell the difference between an SVN/connection
failure and an empty diff, and so returns self::DIFFRESULT_NoDataReturned in
both cases.
The code should be updated so that it can tell the difference and return (e.g.)
DIFFRESULT_ConnectionError if there was a connection failure, and
DIFFRESULT_NoDataReturned if the diff is genuinely empty.
Brion had some suggestions about how this might be implemented, in
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/80822#c13364. Here is the
relevant excerpt:
Re: the "can't tell difference between connection failure and empty diff", I
think we can remedy that in the SubversionAdaptor classes:
* SubversionAdaptorPecl looks like it should throw an exception on failure, so
already good?
* SubversionAdaptorShell should check the return code; a failure should give a
non-zero return which we can parley into a nice exception ;)
* SubversionProxy should throw an exception on a bad return, but that could
depend on whether the proxy actually returns an HTTP error code on error
--
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