CmdRunner power!
The CmdRunner library is a tiny c# project that allows you to create porcelain applications using the cm shell strength.
What is the "cm shell" feature?
The cm shell utility is able to execute cm commands like flash! It opens a shell interface where you can start issuing cm commands!
Test it! First run four or five cm lrep lonely commands, not a big deal... Now try to issue cm shell and then type lrep & enter, lrep & enter, lrep & enter, lrep & enter... much faster!! Ain’t it cool?
Using the CmdRunner
library you will be able to use this incredible speed running cm commands and create small or big utilities for your daily work with Plastic SCM.
Some examples
- If you want to list all the changesets inside the default repository, you just need to write something like this:
- You can also perform write operations. This example will return 0 or 1 regarding if the checkout operation was successful or not:
- After the checkin you may want to modify the file and finally commit it:
- You can go further! For example, you can create your own c# replication scheduler. Launch replication operations is as simple as this:
You only have to surround the cm commands with your stuff and you will able to create everything you can want!
Every single cm command you can imagine can be executed by our CmdRunner. Some of our plugins are using this library to work. So can create big things
You can download the CmdRunner source code and easy examples.
The Visual Studio solution can be opened with VS 2010. The CmdRunnerExample
project contains code examples to start playing.
Have fun!
0 comentarios: