HomeSealhub

Deprecate "PhutilExecPassthru->execute()" in favor of "resolve()"

Description

Deprecate "PhutilExecPassthru->execute()" in favor of "resolve()"

Summary: Fixes T13660. See also D21703. The most desirable modern API here is "resolve()", so deprecate the similar "execute()".

Test Plan:

  • Grepped for callsites.
  • Ran arc patch --trace in a Git working copy and saw the updated "git apply" in the trace output.
  • Used this test script (changing the method and the command invoked) to confirm that success and error behavior is identical in "resolve()" and "execute()", except that "execute()" now emits a deprecation warning:
<?php

require_once 'support/init/init-script.php';

$err = id(new PhutilExecPassthru('lsx'))->execute();
var_dump($err);

Reviewers: cspeckmim

Reviewed By: cspeckmim

Maniphest Tasks: T13660

Differential Revision: https://secure.phabricator.com/D21705

Details

Provenance
epriestleyAuthored on Jul 21 2021, 19:07
kuba-orlikPushed on Jan 24 2022, 10:17
Parents
R118:ac365c3ee509: Refactor how Mercurial runs commands that require extensions
Branches
Unknown
Tags
Unknown

Event Timeline