Jump to content

Plastic CLI inconsistency ('Pipe' commands not consistent with running normal commands, getstatus inconsistent with status)


Recommended Posts

I am working on a blender addon that should help users by checking out/adding exported files and the current blender file on the plastic workspace automatically.

For that, I planned to use the cli "cm" commands.
In some situations I need to get the status, add or checkout multiple files. And I want to do that at once, to make it quick.

Looking at the documentation, I can do that by piping multiple files after running one of the command followed by a "-".
It seems to work fine, but my problem is that it seems to be inconsistant with running cm commands normally. And just fails for example when trying to add a file that is not in the repository.

Some example:

>cm add "C:/File/Not/In/Repository.txt"
C:/File/Not/In/Repository.txt is not in a workspace.

>cm add - 
The selected items are about to be added. Please wait ...
Error: AssertForNullParams has found an empty string.

Which leads me to a second issue:
I thought I could check the status of the file to check if it is in the workspace. The issue here is that I can only user the 'getstatus' command using the 'pipe' method, and getstatus on a file that is not in the workspace returns 'the item C:/File/Not/In/Repository.txt is private.'

The 'getstatus' command behavior is also inconsistent with the 'status' command that would correctly output  'C:/File/Not/In/Repository.txt is not in a workspace.'


It would be amazing if a pass on the cli commands could be done, and unify all this. 'pipe' commands should have the same behaviour/output as running the command on a single file. getstatus should probably output the same as the status message.

It would help users create tools for plastic.

Link to comment
Share on other sites

  • 3 weeks later...


The "cm add --help" command has a "--ignorefailed" flag. I'm guessing if this can be helpful for you.

You mention the "cm getstatus" command but I think the command that makes more sense is "cm status --help". It shows the changes in the workspace and allows to se different flags like "--changed" to show only the items you need based on the status.

Please let us know if it helps. 



Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...