mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-22 14:52:40 +01:00
Remove some old code handling the absence of the file.uploadhash
Conduit method
Summary: The `file.uploadhash` method was added a long time ago (in D4899). It should be safe to assume that this method exists on most installs. Test Plan: N/A Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: epriestley Differential Revision: https://secure.phabricator.com/D11118
This commit is contained in:
parent
f8be9d7737
commit
f86a70f411
1 changed files with 26 additions and 38 deletions
|
@ -2504,17 +2504,6 @@ EOTEXT
|
||||||
|
|
||||||
echo pht('Uploading %d files...', count($need_upload))."\n";
|
echo pht('Uploading %d files...', count($need_upload))."\n";
|
||||||
|
|
||||||
// Now we're ready to upload the actual file data. If possible, we'll just
|
|
||||||
// transmit a hash of the file instead of the actual file data. If the data
|
|
||||||
// already exists, Phabricator can share storage. Check if we can use
|
|
||||||
// "file.uploadhash" yet (i.e., if the server is up to date enough).
|
|
||||||
// TODO: Drop this check once we bump the protocol version.
|
|
||||||
$conduit_methods = $this->getConduit()->callMethodSynchronous(
|
|
||||||
'conduit.query',
|
|
||||||
array());
|
|
||||||
$can_use_hash_upload = isset($conduit_methods['file.uploadhash']);
|
|
||||||
|
|
||||||
if ($can_use_hash_upload) {
|
|
||||||
$hash_futures = array();
|
$hash_futures = array();
|
||||||
foreach ($need_upload as $key => $spec) {
|
foreach ($need_upload as $key => $spec) {
|
||||||
$hash_futures[$key] = $this->getConduit()->callMethod(
|
$hash_futures[$key] = $this->getConduit()->callMethod(
|
||||||
|
@ -2546,7 +2535,6 @@ EOTEXT
|
||||||
echo pht("Uploaded '%s' (%s).", $name, $type)."\n";
|
echo pht("Uploaded '%s' (%s).", $name, $type)."\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
$upload_futures = array();
|
$upload_futures = array();
|
||||||
foreach ($need_upload as $key => $spec) {
|
foreach ($need_upload as $key => $spec) {
|
||||||
|
|
Loading…
Reference in a new issue