Using the command line how can I reset my workspace so that it becomes an exact replica of server version of changeset I'm on? More specifically, how to get rid of all pending changes, all added and removed files, and everything not yet committed to Plastic? Note that cm unco --all
does not remove "private" files.
Asked
Active
Viewed 2,234 times
1

Jonas Bötel
- 4,452
- 1
- 19
- 28
1 Answers
2
I'm currently using an ugly hack:
FOR /f "tokens=*" %%a in ('cm status --short --private') DO DEL /F /Q "%%a"
cm unco --all --dependencies
Which works okay, however a recent change to cm status
causes it to print an extra Finding changed files took too long. Perf tips: https://www.plasticscm.com/download/help/statusperfhintschanged
at the end, which throws off the for
loop. I haven't found a way to suppress the warning message.

Jonas Bötel
- 4,452
- 1
- 19
- 28
-
Please include the following parameter "--machinereadable" in your "cm status" command. It should allow you to parse the output. – Carlos Alba Zamanillo Oct 15 '18 at 09:03
-
@CarlosAlbaZamanillo Thanks but the --machinereadable flag does the exact opposite of what I need. It overrides the --short flag and prints a whole lot of extra information per line unrelated to what I'm trying to do. I'm calling this from a Windows batch script, so preferably no parsing. – Jonas Bötel Oct 15 '18 at 09:12
-
It shouldn't ovwerwrite the parameters. It offers a parseable output to be used in scripts and it removes the performance tips.We can switch the conversation to a support ticket to discuss the details and possible improvements: support@codicesoftware.com – Carlos Alba Zamanillo Oct 15 '18 at 11:08