Click here to Skip to main content
11,575,882 members (55,422 online)
Click here to Skip to main content

Source Control for Visual Studio – Get Started in Minutes

, 26 Oct 2009 CPOL 12K 23
Whether you’re a lone developer or a billion dollar enterprise, as soon as you start developing software you should use a source control tool. Unlike other solutions on the market, PureCM offers an enhanced integration into Visual Studio to make life easier for developers. Free for 2 users.

Editorial Note

This article is in the Product Showcase section for our sponsors at CodeProject. These reviews are intended to provide you with information on products and services that we consider useful and of value to developers.

Keep it Simple

Whether you’re a lone developer, a small team or a billion dollar enterprise, as soon as you start developing software you should use a source control tool. Although this statement is widely supported [1], many developers still relate source control to weeks of implementation horror and heavyweight processes that get in their way of working.

Click here to get your free download >>

Click here to learn more about PureCM features >>

This thinking often originates from past experience, using a sledgehammer to crack a nut. This does not need to be true anymore. From a developer’s point of view, source control is much about the challenges listed in the diagram below [1].

challenges_fin.jpg

Once you move to the team or organisation level, the coordination between teams will add new challenges. This is why it makes sense to start off with an easy to use solution that can scale once you take it to the team or organisation level. Yes, you could add more issues the bigger and more complex your projects get, but let’s start bottom up.

Your Source Control Solution Explained

PureCM is built on a client/server architecture to combine simple administration and high reliability with ease of use. As such, project data is stored in a centralized PureCM repository, which can sit on any machine. Typically, this is a server machine that gets backed up regularly, but you could also use your client machine if you are working on a small project on your own.

A PureCM repository can hold one or many projects, which are represented as streams and stored in a secure database. Each stream contains all the files and folders for a single project. So if you would like to create a branch or release for the project, simply create a child stream from the project stream. Since the parent <-> child relationships are maintained it is simple to merge changes between streams.

streams_fin.jpg

As a developer, you get your own local copy from the repository to work on; your “workspace”. Having your own workspace offers many advantages, such as the ability to try different changes without affecting the server version, or testing them before they get applied. Additionally, workspaces allow multiple developers to work concurrently on the same project, both with and without permanent server connection.

The files and folders in your workspace can be created as read-only or writable. In the former case (typically known from VSS), you will need to checkout a file before being able to edit it. You can do so either using one of PureCM’s IDE integrations, its Windows Explorer plugin, GUI or command line client. If you prefer being able to edit files straight away in any tool, create writable workspaces. In this case (typically known from CVS or SVN), PureCM will automatically detect changes, which you can group in changesets and submit to the server once you have finished your task(s).

Finally, PureCM facilitates task-based development, as one or more file changes needed to complete a task are grouped in a ‘Changeset’. This will automatically create an audit trail, as a project progresses as a sequence of submitted changesets, i.e. completed tasks. To preserve database integrity, any transaction in PureCM is applied atomically, thus completely or not at all.

Click here to learn more about PureCM features >>

Optimised for Visual Studio

Unlike other solutions on the market, PureCM’s 2009-2 release brings most GUI operations into Visual Studio 2005 and above, such as shelving, merging changes from other branches, or visually comparing server and workspace content. This makes it possible for developers to work exclusively in Visual Studio (VS). Of course, PureCM also supports older versions of VS via its MSSCCI, which allows you to perform basic actions such as checkout, checkin or view history within your IDE.

Many of the features mentioned so far might sound unfamiliar to Visual Source Safe (VSS) users, but this excellent Code Project article explains them by comparing VSS to the Team Foundation Server (TFS). Let me explain how to get started with PureCM, so you can get all these features and more in a much more lightweight and simple solution – which is free for 2 users.

How to Get Started

You will need to install two PureCM components to get started: The PureCM client and server. Both have to be installed on their target machines and can be downloaded from the PureCM website. The client installer includes both the Visual Studio integration and the Windows Explorer plugin, so there is no need for a separate installation.

Once you’re done with the installation, you can add your existing project to PureCM. The easiest way to do so might be using Visual Studio or the Explorer plugin. If you have an existing project in Visual Studio, simply click on “Add to PureCM”.

add2pcm_fin.jpg

This will create a new stream, containing all your project data. Once you have added your project to PureCM, anybody wanting to work on this project can get his private copy by clicking on ‘Get Solution’, which will automatically create a local workspace. Thereafter, you can simply use ‘Open Project’ to access the files. Using ‘Get Solution’ again would create another workspace, which might be useful for separate testing or review purposes.

How do I work in Visual Studio? Of course, you get all the familiar views and controls, but there are a few new ones that help you to perform the source control tasks. The first is the ‘Workspace Explorer’, which complements the logical project view of the ‘Solution Explorer’ with the physical view of your local workspace. Note that the latter includes all files in your workspace, not just the ones included in a Visual Studio solution. This can be very helpful for other project files under source control, e.g. to work on build scripts.

vs_explorer_fin.jpg

The workspace explorer also allows you to access advanced PureCM operations mentioned above, such as visual compare, shelving or merging.

You will also get a toolbar for day-to-day operations such as ‘Update to latest’ (get the latest changes from the server) or ‘Submit’ (send your local changes to the server). Note that the ‘Checkout’ command will NOT get the latest version from the server as in VSS, allowing the user to decide himself at what point he wants to update his local workspace.

vs_toolbar_fin.jpg

Finally, there is the ‘Changesets’ view, which allows you to group your current checkouts into changesets. This is very helpful when working on more than one task, e.g. because an urgent bug fix is needed. It is a simple way of keeping track of what you are working on. Below ‘Local Changesets’, you can also see all changesets that were submitted to the server by anyone working on the same project as you. This will help you to decide when to update your workspace to get these changes.

vs_changesets_fin.jpg

Once you have finished your changes, update your workspace to get the changes from your colleagues. PureCM will automatically integrate them and prompt conflicts if there are any. Then submit your changes by confirming the submit dialogue. Once submitted to the server, the changes become available to your colleagues and will thus appear under ‘Submitted Changesets’.

vs_submit_fin.jpg

Summary

This was but a short introduction into PureCM’s impressive feature set, focusing on its powerful yet easy to use Visual Studio integration. Using such a tight IDE integration makes source control as seamless as it can get. As a developer, you get a private sandbox and full transparency, avoid human error and rework without adding complexity to your workflow. This result is not just better quality, but higher productivity, too.

Many additional aspects such as branching and merging, creating project snapshots, or sharing components between projects have not been covered in detail. Visit our website to learn more about additional features and download our free team trial to get a hands–on experience. And for up to 2 users, PureCM is free indefinitely.

Click here to get your free download >>

Why not comment on this article and your trial? Happy coding!

About PureCM

PureCM is a Software Configuration Management (SCM) solution that controls and tracks changes to digital assets. PureCM facilitates and speeds up development in team environments using the powerful concept of task-based development. Complete with integrated Issue Management functionality, PureCM can be tailored to any development and change management process.

Both the PureCM client and server are available across multiple platforms such as Windows, Linux, and Mac. Offering native integration with Visual Studio® and Eclipse, PureCM is easy to use and easy to deploy, and thus particularly well-suited for today’s dynamic SD teams.

Sources

[1] http://devreview.com/version-control-for-solo-developers

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Kenji Sulzberger
United Kingdom United Kingdom
No Biography provided

You may also be interested in...

Comments and Discussions

 
Questionsubversion import? Pin
Atanas Palavrov5-Nov-09 11:57
memberAtanas Palavrov5-Nov-09 11:57 
GeneralSource Safe Pin
sebichondo4-Nov-09 21:37
membersebichondo4-Nov-09 21:37 
Generalsource control Pin
emerging2-Nov-09 20:56
memberemerging2-Nov-09 20:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.150624.2 | Last Updated 26 Oct 2009
Article Copyright 2009 by Kenji Sulzberger
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid