From c66954af262f11319fb32bf249b39f69167b3696 Mon Sep 17 00:00:00 2001 From: Joshua Spence Date: Tue, 10 Feb 2015 18:34:43 +1100 Subject: [PATCH] Fix a TODO Summary: Rename `DifferentialChangesetParser::WHITESPACE_IGNORE_ALL` to `DifferentialChangesetParser::WHITESPACE_IGNORE_MOST`. Test Plan: Browsed a diff with a few different settings for "Whitespace changes". Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: epriestley Differential Revision: https://secure.phabricator.com/D11715 --- .../controller/DifferentialRevisionViewController.php | 2 +- .../parser/DifferentialChangesetParser.php | 11 ++++------- .../view/DifferentialRevisionUpdateHistoryView.php | 2 +- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/applications/differential/controller/DifferentialRevisionViewController.php b/src/applications/differential/controller/DifferentialRevisionViewController.php index 5a2e4dd79d..43a21e73e9 100644 --- a/src/applications/differential/controller/DifferentialRevisionViewController.php +++ b/src/applications/differential/controller/DifferentialRevisionViewController.php @@ -235,7 +235,7 @@ final class DifferentialRevisionViewController extends DifferentialController { $whitespace = $request->getStr( 'whitespace', - DifferentialChangesetParser::WHITESPACE_IGNORE_ALL); + DifferentialChangesetParser::WHITESPACE_IGNORE_MOST); $arc_project = $target->getArcanistProject(); if ($arc_project) { diff --git a/src/applications/differential/parser/DifferentialChangesetParser.php b/src/applications/differential/parser/DifferentialChangesetParser.php index 8ff90a256f..e181993836 100644 --- a/src/applications/differential/parser/DifferentialChangesetParser.php +++ b/src/applications/differential/parser/DifferentialChangesetParser.php @@ -105,10 +105,7 @@ final class DifferentialChangesetParser { const WHITESPACE_SHOW_ALL = 'show-all'; const WHITESPACE_IGNORE_TRAILING = 'ignore-trailing'; - - // TODO: This is now "Ignore Most" in the UI. - const WHITESPACE_IGNORE_ALL = 'ignore-all'; - + const WHITESPACE_IGNORE_MOST = 'ignore-most'; const WHITESPACE_IGNORE_FORCE = 'ignore-force'; public function setOldLines(array $lines) { @@ -499,11 +496,11 @@ final class DifferentialChangesetParser { case self::WHITESPACE_IGNORE_FORCE: break; default: - $whitespace_mode = self::WHITESPACE_IGNORE_ALL; + $whitespace_mode = self::WHITESPACE_IGNORE_MOST; break; } - $skip_cache = ($whitespace_mode != self::WHITESPACE_IGNORE_ALL); + $skip_cache = ($whitespace_mode != self::WHITESPACE_IGNORE_MOST); if ($this->disableCache) { $skip_cache = true; } @@ -539,7 +536,7 @@ final class DifferentialChangesetParser { $whitespace_mode = $this->whitespaceMode; $changeset = $this->changeset; - $ignore_all = (($whitespace_mode == self::WHITESPACE_IGNORE_ALL) || + $ignore_all = (($whitespace_mode == self::WHITESPACE_IGNORE_MOST) || ($whitespace_mode == self::WHITESPACE_IGNORE_FORCE)); $force_ignore = ($whitespace_mode == self::WHITESPACE_IGNORE_FORCE); diff --git a/src/applications/differential/view/DifferentialRevisionUpdateHistoryView.php b/src/applications/differential/view/DifferentialRevisionUpdateHistoryView.php index e37e952d8f..f6c5910ab7 100644 --- a/src/applications/differential/view/DifferentialRevisionUpdateHistoryView.php +++ b/src/applications/differential/view/DifferentialRevisionUpdateHistoryView.php @@ -206,7 +206,7 @@ final class DifferentialRevisionUpdateHistoryView extends AphrontView { $options = array( DifferentialChangesetParser::WHITESPACE_IGNORE_FORCE => 'Ignore All', - DifferentialChangesetParser::WHITESPACE_IGNORE_ALL => 'Ignore Most', + DifferentialChangesetParser::WHITESPACE_IGNORE_MOST => 'Ignore Most', DifferentialChangesetParser::WHITESPACE_IGNORE_TRAILING => 'Ignore Trailing', DifferentialChangesetParser::WHITESPACE_SHOW_ALL => 'Show All',