]> khamidou — GitHub mirrors - arcanist.git/commit
Move Conduit file upload logic into a separate class
authorepriestley <git@epriestley.com>
Wed, 27 May 2015 17:25:53 +0000 (10:25 -0700)
committerepriestley <git@epriestley.com>
Wed, 27 May 2015 17:25:53 +0000 (10:25 -0700)
commit877e7b63884d69745fcc1e695fdf1b86ccb2d7a4
tree4024758c98f454c7430458c1c9073d05eee37db7
parent407af00ef61347091446f8f0b47259c358bae92f
Move Conduit file upload logic into a separate class

Summary:
Ref T8259. Currently, `arc upload` uses new logic but `arc diff` uses older logic internally. This prevents `arc diff` from uploading files larger than 4MB to newer servers.

Split the upload logic apart so the two upload pathways can share it. Callers now build a list of FileDataRefs and hand them to an Uploader for upload.

Test Plan:
Ran `arc upload` on:

  - One file.
  - Several files.
  - Small files.
  - Big files.
  - Directories.
  - Unreadable files.
  - Files full of random data.
  - The same file over and over again.
  - The same big file over and over again.
  - Artificially broke `file.allocate` and redid some of the simple cases (large/chunked aren't expected to work in this case).

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: joshuaspence, epriestley

Maniphest Tasks: T8259

Differential Revision: https://secure.phabricator.com/D13016
src/__phutil_library_map__.php
src/upload/ArcanistFileDataRef.php [new file with mode: 0644]
src/upload/ArcanistFileUploader.php [new file with mode: 0644]
src/workflow/ArcanistUploadWorkflow.php