@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Hint 'arc' commands in Differential UI

Summary:
Point users toward 'arc amend', 'arc commit', 'arc patch' and 'arc export' since
no one is going to read 'arc help'.

There's kind of a tradeoff here where we're wasting a fair amount of UI space
for expert users with the patch/export hints but I think it's probably okay
since there's really no other way to figure out that these features exist.

Note that the "export" command given isn't complete (it needs --git or
--unified), but it will give you a useful error message when you run it, telling
you to specify --git or --unified. If it turns out users get confused by this,
let me know.

Test Plan:
Loaded a revision and looked at it. Faked it into 'accepted' status.

Reviewed By: tuomaspelkonen
Reviewers: tuomaspelkonen, aran, jungejason
CC: aran, tuomaspelkonen, epriestley
Differential Revision: 242

+23 -1
+22 -1
src/applications/differential/controller/revisionview/DifferentialRevisionViewController.php
··· 267 267 $properties = array(); 268 268 269 269 $status = $revision->getStatus(); 270 + $next_step = null; 271 + if ($status == DifferentialRevisionStatus::ACCEPTED) { 272 + switch ($diff->getSourceControlSystem()) { 273 + case PhabricatorRepositoryType::REPOSITORY_TYPE_GIT: 274 + $next_step = 'arc amend --revision '.$revision->getID(); 275 + break; 276 + case PhabricatorRepositoryType::REPOSITORY_TYPE_SVN: 277 + $next_step = 'arc commit --revision '.$revision->getID(); 278 + break; 279 + } 280 + if ($next_step) { 281 + $next_step = 282 + ' &middot; '. 283 + 'Next step: <tt>'.phutil_escape_html($next_step).'</tt>'; 284 + } 285 + } 270 286 $status = DifferentialRevisionStatus::getNameForRevisionStatus($status); 271 - $properties['Revision Status'] = '<strong>'.$status.'</strong>'; 287 + $properties['Revision Status'] = '<strong>'.$status.'</strong>'.$next_step; 272 288 273 289 $author = $handles[$revision->getAuthorPHID()]; 274 290 $properties['Author'] = $author->renderLink(); ··· 398 414 } 399 415 $properties['Commits'] = implode('<br />', $links); 400 416 } 417 + 418 + $properties['Apply Patch'] = 419 + '<tt>arc patch D'.$revision->getID().'</tt>'; 420 + $properties['Export Patch'] = 421 + '<tt>arc export --revision '.$revision->getID().'</tt>'; 401 422 402 423 return $properties; 403 424 }
+1
src/applications/differential/controller/revisionview/__init__.php
··· 26 26 phutil_require_module('phabricator', 'applications/draft/storage/draft'); 27 27 phutil_require_module('phabricator', 'applications/phid/constants'); 28 28 phutil_require_module('phabricator', 'applications/phid/handle/data'); 29 + phutil_require_module('phabricator', 'applications/repository/constants/repositorytype'); 29 30 phutil_require_module('phabricator', 'infrastructure/celerity/api'); 30 31 phutil_require_module('phabricator', 'infrastructure/env'); 31 32 phutil_require_module('phabricator', 'view/form/error');