visual-studio-2010visual-studio-2012mksmks-integrity

How can I manipulate MKS sandboxes and members through Visual Studio?


As with most other versioning systems some brilliant individual, or group thereof, has established an extention to Visual Studio so that a developer may manage the state of their files directly with the application they work most often in.

Sadly, MKS doesn't really have that kind of Open-Source following, nor does the user base of the application weigh heavily with the developers out there.

I'm kind of setting myself up for an answer here, but it was a refreshing note here in the office when my coworker opened this can of worms...turned out many of our developers already had some of these in their personal toolboxes...these are some of the commands we came up with.


Solution

  • To start, there is a rather easy way to add custom tools to the menus in Visual Studio :

    Tools --> External Tools This dialog is pretty much a wizard to set up quick command line options in the application that you can later refer to when adding a menu option to a tool bar or flyout.

    Note that the order of the list of Menu Contents will be crucial in figuring out which item in Visual Studio to add to your menu/toolbar. For instance ::

    External Tools Dialog

    When you access your Tool Customization dialog, the Command will be listed under Category 'Tools' and will be enumerated with the following format :: 'External Command XX' where XX is the number corresponding to the position of your command in the list. (eg MKS-AddMember would be 'External Command 3')

    OK...now that that's behind us, let me list out a few different MKS commands that translated well for us. These will act as the Arguments in the External Tools dialog...

    These can all be run from your command line prompt. The executable is (usually) at C:\Program Files (x86)\Integrity\IntegrityClient10\bin\si.exe

    Checkout Member :: co -g --sandbox="$(ItemDir)\project.pj" "$(ItemPath)"

    Add Member :: add -g --createSubprojects --sandbox="$(ItemDir)\project.pj" "$(ItemPath)"

    View History :: viewhistory -g --sandbox=”$(ItemDir)\project.pj” “$(ItemPath)”

    Diff Two Files :: difffiles -g “$(ItemPath)”

    Revert :: revert -g --sandbox="$(ItemDir)\project.pj" "$(ItemPath)"

    You can also get creative and find other commands by running “si -?” from a command line.

    Post more findings here of things you find useful!