#require 'helix_web_services_client/models/change' class HelixWebServicesClient # List changelists in the system # # options: # - :max: cap the number of results # - :status: :pending, :submitted, or :shelved (see Change) # - :user: The perforce login to check out # - :files: Depot path pattern to restrict changes to def changes(options = nil) arr = execute_method_no_body(:get, '/perforce/v1/changes', options) arr.map { |obj| Models::Change.new(obj) } end # Returns the Change indicated by the change number or model. # # If there are files submitted with the change, the change.files field # should be filled out. def change(change) change_id = change.is_a?(Models::Change) ? change.change : change arr = execute_method_no_body(:get, "/perforce/v1/changes/#{change_id}") Models::Change.new(arr.first) end # Creates a new changelist, that can be used for a few different tasks. # # Uses the Change model generally, but the reality is that you can # create a fairly simple hash for most of the definition. The two important # fields of this hash are: # # - description: The Change.description # # - files: An array of Change::File instances, which can also be hashes # # The Change::Files can be represented with the following fields: # # - depot_file: The depot path # # - action: One of 'upload', 'move', or 'branch' # # - from_depot_file: if action is 'move' or 'branch', the source file # # - content: The file content for 'upload' actions # # - require_version: Optional value for 'upload' actions, if set, will # fail the upload if the current file version is not # this version. def create_change(change) change = Models::Change.new(change) unless change.is_a?(Models::Change) execute_method_with_body(:post, '/perforce/v1/changes', nil, change.to_internal_hash) end end
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#6 | 15622 | tjuricek |
Move source code to 'source/' subdirectory of branch. build/ will remain where it is. |
||
#5 | 15240 | tjuricek |
Set api level via request path on all Helix Versioning Engine methods. This will allow migration of applications to different P4D versions. Our internal methods (like project API) should attempt to handle backward compatibility similarly. P4WEBAPI-118 |
||
#4 | 15132 | tjuricek | Provde a basic submit -e mechanism on classic perforce workspaces. | ||
#3 | 15110 | tjuricek | Revise changes methods for new p4 connection handling, add server specs, remove model references in client, and update asciidoc documentation. | ||
#2 | 15077 | tjuricek |
Add new 'model' technique, revised branch spec operations, test Auth::Middleware. The Ruby client now does *not* strictly type anything, but extends OpenStruct with helper methods to help deal with inconsistent data formats. See the OpenModel class documentation for more details. The Auth::Middleware class is also *finally* implemented as well. This does not take into account all possible variations of server behavior (yet), but that will happen in follow-up work. |
||
#1 | 13808 | tjuricek | Finish converting most of the core p4d API into the new monolithic system. | ||
//guest/perforce_software/helix-web-services/main/p4_web_api/clients/ruby/p4_web_api_client/lib/p4_web_api_client/client/changes.rb | |||||
#1 | 13412 | tjuricek |
Initial version of the web-services mainline. This is a collection of several projects, that will likely often get released together, though many of them may not always be relevant. See the README for more information. |