mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-25 08:12:40 +01:00
Switch file uploader in "arc diff" to use ConduitEngine
Summary: Fixes T13498. Currently, `arc diff` may invoke the file upload flow using an older variation of the API. Both the modern and fallback clients build an Engine, so switching to the modern API is trivial. Test Plan: - Created a local commit with a 1MB binary file. - Ran `arc diff --only`. - Before patch: fatal on old API call. - After patch: clean upload. Maniphest Tasks: T13498 Differential Revision: https://secure.phabricator.com/D21043
This commit is contained in:
parent
97e050fce7
commit
18799c1829
2 changed files with 3 additions and 3 deletions
|
@ -5,7 +5,7 @@
|
||||||
*
|
*
|
||||||
* // Create a new uploader.
|
* // Create a new uploader.
|
||||||
* $uploader = id(new ArcanistFileUploader())
|
* $uploader = id(new ArcanistFileUploader())
|
||||||
* ->setConduitClient($conduit);
|
* ->setConduitEngine($conduit);
|
||||||
*
|
*
|
||||||
* // Queue one or more files to be uploaded.
|
* // Queue one or more files to be uploaded.
|
||||||
* $file = id(new ArcanistFileDataRef())
|
* $file = id(new ArcanistFileDataRef())
|
||||||
|
@ -77,7 +77,7 @@ final class ArcanistFileUploader extends Phobject {
|
||||||
* Upload files to the server.
|
* Upload files to the server.
|
||||||
*
|
*
|
||||||
* This transfers all files which have been queued with @{method:addFiles}
|
* This transfers all files which have been queued with @{method:addFiles}
|
||||||
* over the Conduit link configured with @{method:setConduitClient}.
|
* over the Conduit link configured with @{method:setConduitEngine}.
|
||||||
*
|
*
|
||||||
* This method returns a map of all file data references. If references were
|
* This method returns a map of all file data references. If references were
|
||||||
* added with an explicit key when @{method:addFile} was called, the key is
|
* added with an explicit key when @{method:addFile} was called, the key is
|
||||||
|
|
|
@ -2742,7 +2742,7 @@ EOTEXT
|
||||||
}
|
}
|
||||||
|
|
||||||
$uploader = id(new ArcanistFileUploader())
|
$uploader = id(new ArcanistFileUploader())
|
||||||
->setConduitClient($this->getConduit());
|
->setConduitEngine($this->getConduitEngine());
|
||||||
|
|
||||||
foreach ($need_upload as $key => $spec) {
|
foreach ($need_upload as $key => $spec) {
|
||||||
$ref = id(new ArcanistFileDataRef())
|
$ref = id(new ArcanistFileDataRef())
|
||||||
|
|
Loading…
Reference in a new issue