Best practice for migrating code from Devo to Prod.

If you are having a problem using Vault, post a message here.

Moderator: SourceGear

Post Reply
jtrigger

Best practice for migrating code from Devo to Prod.

Post by jtrigger » Tue Oct 26, 2004 9:56 am

I was wondering if anyone might be willing to describe how they handle migrating code through their various environments. We have a multi-tiered setup for our evelopment. The developers code on their local machines and then check the code into the devo source tree to be compiled on a central box for integration testing. The code is then promoted to a model office environment where the end users test and give buyoff on the product. After it has been approved it is then migrated to production. What is the best way to handle this? This is a large project with about 5 different developers all working on different areas of the project. We need to allow each developer to be able to migrate 1 file at a time through the entire process if they need to, but if multiple developers have items in the MO environment and only some are approved for prod we need to be able to only promote those that are approved. This is a .Net app that is all currently housed in a single solution that has a single project.

Any recommendations would be much appreciated.

Jtrigger

Post by Jtrigger » Tue Oct 26, 2004 6:12 pm

I got this reply from another forum I posted this question to:

Much of this can be handled depending on what promotion features are
available in your VCS. Or maybe I'm not understanding the problem.

In Team Coherence for example, I define promotion levels. In your case there
would be a Model Office level and a Production level. Anything checked into
the VCS automatically starts at the bottom (unnamed) level. Moving to the
next level requires an explicit action on my part in TC. I can promote
entire folders or individual files. I can create views on these promotion
levels and tie them to user security so that certain views/users only ever
see files at a certain promotion level. Files can be demoted individually
as well and a demoted file goes all the way back to the bottom of the
promotion ladder.


Can Vault do this?

jeremy_sg
Posts: 1821
Joined: Thu Dec 18, 2003 11:39 am
Location: Sourcegear
Contact:

Post by jeremy_sg » Wed Oct 27, 2004 7:35 am

Unfortunately, the answer is "yes, sorta". Vault doesn't have any built-in handling for the workflow that you're describing. I know that at least one customer has used the Vault API to write an app to migrate files from a Dev repository to a Prod repository.

That said, you could get an aproximation of what you want by using branches and merge branches. Consider this case:

$/dev/src (is a branch of)
$/modeloffice/src (is a branch of)
$/production/src

Merge Branches could then be used to migrate changes between the branches. Merge Branches can migrate the changes made in folders, but can't pick out individual files for merging.

Also note that Vault is a linear version control system, so if you have the following case for a file:

$/dev/src/file.cs (Version 10)
$/modeloffice/src/file.cs (last merged from Version 8 of dev)

There is no way for Vault to merge in Version 10 without also including the changes that made up Version 9. If Version 9 depends on changes made elsewhere in dev, you will need to make sure to merge those changes as well.

I would like to see more support for the kind of workflow that you are describing, but I can't predict when it will bubble to the top or what features it will have when it does come out.

TDG

Share/PIN Limitations

Post by TDG » Sat Nov 06, 2004 9:22 pm

I have the same problem with trying to promote code from one level (ie. Dev, QA, Prod) to another. Normally, one would be best off using a folder share between levels and then pinning all of the files in the "to" folder. The problem is that if you need to promote a "tweak" that involves a single file or two, you cannot unpin the individual files to allow them to be promoted to the shared folder - you have to unpin the entire folder. The problem with this is that you will inadvertantly pick up any other updates that have been made in the "from" folder - as well as the desired fixes. The only alternative to this seems to be branch between levels and then merge in any "tweaks". But this is more painful than it should be.

I don't think that the version control setup that I've described is particularly unique - I've seen other posts describing the same setup and also looking for a way to do painless promotion. A nice solution would be if Vault could allow the unpinning and repinning of individual files within a pinned folder. This is the one VSS feature that Vault seems to be missing.

Post Reply