Suggest branch name in Next Step
Summary: Is this correct for Mercurial? Test Plan: Saw it. Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D4957
This commit is contained in:
		| @@ -228,7 +228,7 @@ final class DifferentialRevisionViewController extends DifferentialController { | ||||
|  | ||||
|     $revision_detail = new DifferentialRevisionDetailView(); | ||||
|     $revision_detail->setRevision($revision); | ||||
|     $revision_detail->setDiff(reset($diffs)); | ||||
|     $revision_detail->setDiff(end($diffs)); | ||||
|     $revision_detail->setAuxiliaryFields($aux_fields); | ||||
|  | ||||
|     $actions = $this->getRevisionActions($revision); | ||||
|   | ||||
| @@ -69,13 +69,24 @@ final class DifferentialRevisionDetailView extends AphrontView { | ||||
|     if ($status == ArcanistDifferentialRevisionStatus::ACCEPTED) { | ||||
|       switch ($local_vcs) { | ||||
|         case PhabricatorRepositoryType::REPOSITORY_TYPE_MERCURIAL: | ||||
|         case PhabricatorRepositoryType::REPOSITORY_TYPE_GIT: | ||||
|           $next_step = phutil_tag('tt', array(), 'arc land'); | ||||
|           $bookmark = $this->getDiff()->getBookmark(); | ||||
|           $command = ($bookmark != '' | ||||
|             ? csprintf('arc land %s', $bookmark) | ||||
|             : 'arc land'); | ||||
|           break; | ||||
|  | ||||
|         case PhabricatorRepositoryType::REPOSITORY_TYPE_GIT: | ||||
|           $branch = $this->getDiff()->getBranch(); | ||||
|           $command = ($branch != '' | ||||
|             ? csprintf('arc land %s', $branch) | ||||
|             : 'arc land'); | ||||
|           break; | ||||
|  | ||||
|         case PhabricatorRepositoryType::REPOSITORY_TYPE_SVN: | ||||
|           $next_step = phutil_tag('tt', array(), 'arc commit'); | ||||
|           $command = 'arc commit'; | ||||
|           break; | ||||
|       } | ||||
|       $next_step = phutil_tag('tt', array(), $command); | ||||
|     } | ||||
|     if ($next_step) { | ||||
|       $properties->addProperty(pht('Next Step'), $next_step); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 vrana
					vrana