mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-25 08:12:40 +01:00
Allow lines to be specified as comma delimited number ranges for arc browse
Summary: Ref T5971. We lose validation of the line ranges, but I don't think that's a huge issue. Test Plan: Ran `arc browse README`, `arc browse README:3`, and `arc browse README:3,6-7` Reviewers: btrahan, epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: epriestley, Korvin Maniphest Tasks: T5971 Differential Revision: https://secure.phabricator.com/D10352
This commit is contained in:
parent
e336b04aa1
commit
f21262048f
1 changed files with 4 additions and 4 deletions
|
@ -144,10 +144,10 @@ EOTEXT
|
|||
// If we fail, try to resolve them as paths.
|
||||
|
||||
foreach ($things as $key => $path) {
|
||||
$line = null;
|
||||
$lines = null;
|
||||
$parts = explode(':', $path);
|
||||
if (count($parts) > 1) {
|
||||
$line = (int)array_pop($parts);
|
||||
$lines = array_pop($parts);
|
||||
}
|
||||
$path = implode(':', $parts);
|
||||
|
||||
|
@ -173,8 +173,8 @@ EOTEXT
|
|||
$base_uri = $this->getBaseURI();
|
||||
$uri = $base_uri.$path;
|
||||
|
||||
if ($line) {
|
||||
$uri = $uri.'$'.$line;
|
||||
if ($lines) {
|
||||
$uri = $uri.'$'.$lines;
|
||||
}
|
||||
|
||||
$uris[] = $uri;
|
||||
|
|
Loading…
Reference in a new issue