1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-26 00:32:41 +01:00

Allow specifying root in arc inlines

Summary: Simplifies editor bindings.

Test Plan:
  $ arc inlines --root W:/devtools/phabricator/

Reviewers: epriestley

Reviewed By: epriestley

CC: vii, aran, Korvin

Differential Revision: https://secure.phabricator.com/D3229
This commit is contained in:
vrana 2012-08-09 17:37:47 -07:00
parent 45fc4c992c
commit 239b90a076

View file

@ -43,6 +43,10 @@ EOTEXT
"Display inline comments for a specific revision. If you do not ". "Display inline comments for a specific revision. If you do not ".
"specify a revision, arc will look in the commit message at HEAD.", "specify a revision, arc will look in the commit message at HEAD.",
), ),
'root' => array(
'param' => 'directory',
'help' => "Specify a string printed in front of each path.",
),
); );
} }
@ -99,12 +103,13 @@ EOTEXT
} }
} }
$root = $this->getArgument('root');
ksort($inlines); ksort($inlines);
foreach ($inlines as $file => $file_inlines) { foreach ($inlines as $file => $file_inlines) {
ksort($file_inlines); ksort($file_inlines);
foreach ($file_inlines as $line => $line_inlines) { foreach ($file_inlines as $line => $line_inlines) {
foreach ($line_inlines as $content) { foreach ($line_inlines as $content) {
echo "{$file}:{$line}:{$content}\n"; echo "{$root}{$file}:{$line}:{$content}\n";
} }
} }
} }