Basic operations in Hatteras' cmd line environment

In my last VSTS/Hatteras post, I introducted working folder mappings and cloakings. Now that you've seen how to map files from the repository to your local machine, I'll talk about some other basic features, syncing, adding, editing, and checking in.

Syncing is done with the “get” command. You can use the /r option to do a recursive get, and the /force option to force a download/refresh of all requested files regardless of whether you already have the latest version. For example, to get the latest versions of all the .cs files from the current folder down, you can say:

    h get /r *.cs

Adding is done with the “add” command. Just specify the file(s) and/or folder name(s) and optionally the /r flag to do a recursive add. I'll dig into our recursion design a bit more in a future post. If you specify a folder name without the /r option, only the folder is added to the repository. To add a couple of files, you'd say:

    h add main.cs class1.cs

Editing, or checking out is done with the “edit” command (or alternatively the “checkout“ alias). Again, the command takes a filespec, clarifying which files you want to check out, and optionally a /r option for a recursive checkout. You can also add the /lock option to prevent others from checking the file in or out while you are editing it. For example:

    h edit main.h /lock:checkin

Finally, once you've finished making your changes, you can use the checkin command to commit your delta:

    h checkin main.h main.cs class1.cs

This is all pretty straightforward stuff, but it's necessary foundation for some of the more interesting examples I'll cover in future posts. Questions are always welcome, of course.

-Jason