diff --git a/src/configuration/ArcanistSettings.php b/src/configuration/ArcanistSettings.php --- a/src/configuration/ArcanistSettings.php +++ b/src/configuration/ArcanistSettings.php @@ -6,27 +6,32 @@ return array( 'default' => array( 'type' => 'string', - 'help' => + 'help' => pht( 'The URI of a Phabricator install to connect to by default, if '. 'arc is run in a project without a Phabricator URI or run outside '. - 'of a project.', + 'of a project.'), 'example' => '"http://phabricator.example.com/"', ), 'base' => array( 'type' => 'string', - 'help' => + 'help' => pht( 'Base commit ruleset to invoke when determining the start of a '. 'commit range. See "Arcanist User Guide: Commit Ranges" for '. - 'details.', + 'details.'), 'example' => '"arc:amended, arc:prompt"', ), + 'generated-paths' => array( + 'type' => 'list', + 'help' => pht('Paths that are generated.'), + 'example' => '["(^src/__phutil_library_map__.php$)"]', + ), 'load' => array( 'type' => 'list', 'legacy' => 'phutil_libraries', - 'help' => + 'help' => pht( 'A list of paths to phutil libraries that should be loaded at '. 'startup. This can be used to make classes available, like lint or '. - 'unit test engines.', + 'unit test engines.'), 'example' => '["/var/arc/customlib/src"]', 'default' => array(), ), @@ -59,114 +64,115 @@ 'lint.engine' => array( 'type' => 'string', 'legacy' => 'lint_engine', - 'help' => + 'help' => pht( 'The name of a default lint engine to use, if no lint engine is '. - 'specified by the current project.', + 'specified by the current project.'), 'example' => '"ExampleLintEngine"', ), 'unit.engine' => array( 'type' => 'string', 'legacy' => 'unit_engine', - 'help' => + 'help' => pht( 'The name of a default unit test engine to use, if no unit test '. - 'engine is specified by the current project.', + 'engine is specified by the current project.'), 'example' => '"ExampleUnitTestEngine"', ), 'arc.feature.start.default' => array( 'type' => 'string', - 'help' => + 'help' => pht( 'The name of the default branch to create the new feature branch '. - 'off of.', + 'off of.'), 'example' => '"develop"', ), 'arc.land.onto.default' => array( 'type' => 'string', - 'help' => + 'help' => pht( 'The name of the default branch to land changes onto when '. - '`arc land` is run.', + '`%s` is run.', + 'arc land'), 'example' => '"develop"', ), 'arc.land.update.default' => array( 'type' => 'string', - 'help' => + 'help' => pht( 'The default strategy to use when arc land updates the feature '. - 'branch. Supports \'rebase\' and \'merge\' strategies.', + 'branch. Supports "rebase" and "merge" strategies.'), 'example' => '"rebase"', ), 'arc.lint.cache' => array( 'type' => 'bool', - 'help' => - "Enable the lint cache by default. When enabled, 'arc lint' ". - "attempts to use cached results if possible. Currently, the cache ". - "is not always invalidated correctly and may cause 'arc lint' to ". - "report incorrect results, particularly while developing linters. ". - "This is probably worth enabling only if your linters are very slow.", + 'help' => pht( + 'Enable the lint cache by default. When enabled, `%s` attempts to '. + 'use cached results if possible. Currently, the cache is not always '. + 'invalidated correctly and may cause `%s` to report incorrect '. + 'results, particularly while developing linters. This is probably '. + 'worth enabling only if your linters are very slow.', + 'arc lint', + 'arc lint'), 'example' => 'false', 'default' => false, ), 'history.immutable' => array( 'type' => 'bool', 'legacy' => 'immutable_history', - 'help' => + 'help' => pht( 'If true, arc will never change repository history (e.g., through '. 'amending or rebasing). Defaults to true in Mercurial and false in '. - 'Git. This setting has no effect in Subversion.', + 'Git. This setting has no effect in Subversion.'), 'example' => 'false', ), 'editor' => array( 'type' => 'string', - 'help' => + 'help' => pht( "Command to use to invoke an interactive editor, like 'nano' or ". - "'vim'. This setting overrides the EDITOR environmental variable.", + "'vim'. This setting overrides the EDITOR environmental variable."), 'example' => '"nano"', ), 'https.cabundle' => array( 'type' => 'string', - 'help' => + 'help' => pht( "Path to a custom CA bundle file to be used for arcanist's cURL ". "calls. This is used primarily when your conduit endpoint is ". - "behind https signed by your organization's internal CA.", + "behind https signed by your organization's internal CA."), 'example' => 'support/yourca.pem', ), 'https.blindly-trust-domains' => array( 'type' => 'list', - 'help' => 'List of domains to blindly trust SSL certificates for. '. - 'Disables peer verification.', + 'help' => pht( + 'List of domains to blindly trust SSL certificates for. '. + 'Disables peer verification.'), 'example' => '["secure.mycompany.com"]', 'default' => array(), ), 'browser' => array( 'type' => 'string', - 'help' => - 'Command to use to invoke a web browser.', + 'help' => pht('Command to use to invoke a web browser.'), 'example' => '"gnome-www-browser"', ), 'events.listeners' => array( 'type' => 'list', - 'help' => 'List of event listener classes to install at startup.', + 'help' => pht('List of event listener classes to install at startup.'), 'example' => '["ExampleEventListener"]', 'default' => array(), ), 'http.basicauth.user' => array( 'type' => 'string', - 'help' => - 'Username to use for basic auth over http transports', + 'help' => pht('Username to use for basic auth over http transports'), 'example' => '"bob"', ), 'http.basicauth.pass' => array( 'type' => 'string', - 'help' => - 'Password to use for basic auth over http transports', + 'help' => pht('Password to use for basic auth over http transports'), 'example' => '"bobhasasecret"', ), 'arc.autostash' => array( 'type' => 'bool', - 'help' => + 'help' => pht( 'Whether arc should permit the automatic stashing of changes in '. 'the working directory when requiring a clean working copy. '. 'This option should only be used when users understand how '. 'to restore their working directory from the local stash if '. - 'an Arcanist operation causes an unrecoverable error.', + 'an Arcanist operation causes an unrecoverable error.'), 'example' => 'false', 'default' => false, ), diff --git a/src/workflow/ArcanistDiffWorkflow.php b/src/workflow/ArcanistDiffWorkflow.php --- a/src/workflow/ArcanistDiffWorkflow.php +++ b/src/workflow/ArcanistDiffWorkflow.php @@ -494,6 +494,7 @@ $this->updateLintDiffProperty(); $this->updateUnitDiffProperty(); $this->updateLocalDiffProperty(); + $this->updateGeneratedDiffProperty(); $this->resolveDiffPropertyUpdates(); $output_json = $this->getArgument('json'); @@ -2360,6 +2361,18 @@ $this->updateDiffProperty('local:commits', json_encode($local_info)); } + /** + * Update generated paths for the diff. + * + * @task diffprop + */ + private function updateGeneratedDiffProperty() { + $paths = $this->getWorkingCopy()->getProjectConfig('generated-paths'); + + if ($paths) { + $this->updateDiffProperty('arc:generated', json_encode($paths)); + } + } /** * Update an arbitrary diff property.