added
Purpose
Instruct the P4ALTSYNC agent to update a file with placeholder state information.
Input to agent
Key |
Value |
---|---|
altSync | added
|
client | The client workspace name |
port | The P4PORT the client used to connect to the server |
user | The P4USER the client used to connect to the server |
path | The local syntax path of the file to create a placeholder for |
clientFile | The client syntax path of the file to create a placeholder for |
depotFile | The depot syntax path of the file to create a placeholder for |
rev | The revision number of the file to create a placeholder for |
digest | The server’s digest for depotFile (this is the MD5 of the file as it’s stored on the server) - Only if the server has a digest to send |
fileSize | The size of the file on the client in bytes (this might differ from the fileSize returned from p4 fstat ) |
writable | true for writable, or false for read-only |
executable | true for executable, or false for not executable |
keywords |
If |
lineEnd | The line ending to hydrate text files with (p4 print -L unix/win/mac ) |
utf8bom | The UTF8 BOM setting to use when hydrating utf8 type files (p4 print -B0/1/2 ) |
charset |
The charset to hydrate unicode type files with ( Note: this might be the charset’s numeric form, but |
The command might or might not include additional keys.
Action for the agent to perform
The target file should already exist, but might not have the correct state if the P4ALTSYNC agent maintains state with hydrated files: use this information to update the state.
The charset
, utf8bom
, lineEnd
and keywords
flags are provided for the P4ALTSYNC agent to store so that the hydration (likely via p4 print
) can be performed in the same way that the action invoking the add
command would have written the file if P4ALTSYNC were not in use.
Output from the agent
Key |
Value |
---|---|
result | Boolean true for success |
error | Description of what went wrong (applicable only if the result is boolean false or the string literal "error") |
Example of input and output
{"altSync":"added","client":"vfs-cmr5","clientFile":"//vfs-cmr5/2013/2013-12-13/P1020326.JPG","depotFile":"//depot/2013/2013-12-13/P1020326.JPG","digest":"6939819742BB416BFD89512C66B58975","fileSize":5147136,"path":"e:\\temp\\vfs\\cmr5\\2013\\2013-12-13\\P1020326.JPG","port":"perforce:1666","rev":1,"user":"npoole","writable":true,"executable":false}
{"result":true}