Page MenuHomePhabricator

CodeReview diff weirdness for branching revs
Open, LowPublicFeature

Description

When viewing revisions that create branches, the diff display should ideally be hidden, but displays error messages instead.

In r49081, a rev resulting from svn mkdir, there is no diff to show, resulting in the "Failed to load diff." error message.

In r49082, a rev resulting from svn copy, the diff would probably be huge, resulting in the "Diff load failed. :(" error message. This one took considerably longer to appear than the previous one.

Of course this isn't a huge issue, but since failures aren't cached, it's wasting resources.


Version: unspecified
Severity: enhancement

Details

Reference
bz18283

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 10:32 PM
bzimport set Reference to bz18283.
bzimport added a subscriber: Unknown Object (MLST).
  • Bug 19178 has been marked as a duplicate of this bug. ***

Wonder if we can create a "list" of non temporary failures. ie there is no diff, so we can just cache that...

We have a bit more of a clue of why a diff failed now..

I guess we can cache some as permanent failures (ie it will never load correctly)

public static function getDiffErrorMessage( $error ) {

		switch( $error ) {
			case self::DIFFRESULT_BadRevision:
				return 'Bad revision specified.';
			case self::DIFFRESULT_TooManyPaths:
				return 'Too many paths returned to diff';
			case self::DIFFRESULT_NoDataReturned:
				return 'No data returned for diff';
			case self::DIFFRESULT_NotInCache:
				return 'Not in cache';
			default:
				return 'Unknown';
		}

}

But probably some more work needs doing...

Aklapper changed the subtype of this task from "Task" to "Feature Request".Feb 4 2022, 11:01 AM
Aklapper removed a subscriber: wikibugs-l-list.