private $revisionID;
private $postponedLinters;
private $haveUncommittedChanges = false;
+ private $diffPropertyFutures = array();
public function getCommandSynopses() {
return phutil_console_format(<<<EOTEXT
$this->updateLintDiffProperty();
$this->updateUnitDiffProperty();
$this->updateLocalDiffProperty();
+ $this->resolveDiffPropertyUpdates();
$output_json = $this->getArgument('json');
$revision = $this->dispatchWillCreateRevisionEvent($revision);
- $future = $conduit->callMethod(
+ $result = $conduit->callMethodSynchronous(
'differential.createrevision',
$revision);
- $result = $future->resolve();
$revised_message = $conduit->callMethodSynchronous(
'differential.getcommitmessage',
* @task diffprop
*/
private function updateDiffProperty($name, $data) {
- $this->getConduit()->callMethodSynchronous(
+ $this->diffPropertyFutures[] = $this->getConduit()->callMethod(
'differential.setdiffproperty',
array(
'diff_id' => $this->getDiffID(),
));
}
+ /**
+ * Wait for finishing all diff property updates.
+ *
+ * @return void
+ *
+ * @task diffprop
+ */
+ private function resolveDiffPropertyUpdates() {
+ Futures($this->diffPropertyFutures)->resolveAll();
+ $this->diffPropertyFutures = array();
+ }
+
private function dispatchWillCreateRevisionEvent(array $fields) {
$event = $this->dispatchEvent(
ArcanistEventType::TYPE_REVISION_WILLCREATEREVISION,