Sync offline changes to a workspace into Perforce

I am trying to figure out what commands I need to run in order to get the changes to a workspace (add, edit, delete) into Perforce when the changes were made to the local system.

I have another version control system that holds the files for which I am trying to:

  1. Get Changeset from other system
  2. Write Changelist to the local system
  3. Tell Perforce to create a change list for all the Add's, Edit's and Delete's in the folder
  4. Check them in

I can achieve #1 and #2 using a PowerShell Adapter for the TFS Integration Platform, but how do I achieve #3 and #4?

I have tried Working Disconnected From The Perforce Server and it has not worked for me. Whatever commands I need to call need to be run from PowerShell.

I can however call a PowerShell command for each of the changes "Add | Edit | Delete" individually if I need to but it would be nice if I could just call one set of commands after all of the changes have been made locally.

I effectively want to achieve the same as the "Reconcile Offline Work" command in the UI.

I have had a stab at it with the following PowerShell run at the following time:

I am hoping that his is all there is to it, and I know that I still need to take into account Branches and Renames, but does anyone have a better way?

Upvotes: 1

Views: 1135

Answers (1)

Bryan Pendleton
Bryan Pendleton

Reputation: 16359

The approach described in Working Disconnected From The Perforce Server is the right approach; you just need to work through the details to run it from PowerShell (or automate it using some other approach, which you then in turn invoke from PowerShell).

Upvotes: 1

Related Questions