From: vrana Date: Fri, 10 Aug 2012 00:37:47 +0000 (-0700) Subject: Allow specifying root in `arc inlines` X-Git-Tag: conduit-6~171 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=239b90a07694ac9e36d33b02c703f76df0de4277;p=arcanist.git 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 --- diff --git a/src/workflow/ArcanistInlinesWorkflow.php b/src/workflow/ArcanistInlinesWorkflow.php index 771d778e..030a92cf 100644 --- a/src/workflow/ArcanistInlinesWorkflow.php +++ b/src/workflow/ArcanistInlinesWorkflow.php @@ -43,6 +43,10 @@ EOTEXT "Display inline comments for a specific revision. If you do not ". "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); foreach ($inlines as $file => $file_inlines) { ksort($file_inlines); foreach ($file_inlines as $line => $line_inlines) { foreach ($line_inlines as $content) { - echo "{$file}:{$line}:{$content}\n"; + echo "{$root}{$file}:{$line}:{$content}\n"; } } }