Should code in source control be in production or dev mode

max105

Golden Member
Nov 10, 2000
1,139
0
76
We're currently using VSS as our source control repository. All of our code in VSS are checked-in with the development flag turned on. Obviously, we have to remember to turn that flag off everytime we deploy code to production. I could see it making development easier since every time I get latest the code will already be in development mode.

Is it better to turn the development flags off by default in VSS to make code deployments easier? Or is it better to leave development flags on and turn them off when we deploy? I'm already leaning one way but I just wanted to get other people's opinions and thoughts.
 

Crusty

Lifer
Sep 30, 2001
12,684
2
81
I use the App.config files for this, my 'release' branch simply has a different App.config file than the trunk which points the app to the production database, uses a different logging setup, etc.

Although, you didn't say you were using .NET, so this only applies there.
 

Cogman

Lifer
Sep 19, 2000
10,278
126
106
This all depends on how often you are pushing new versions/updating. If you are just starting a product and don't see a release for a couple of months, then dev mode is best. If your product is released and you are doing something like weekly updates, then production mode is probably best.
 

max105

Golden Member
Nov 10, 2000
1,139
0
76
We're a ColdFusion shop. I suppose it's possible we could create a branch too for our purposes. Is this how it's normally done at other companies?
 

max105

Golden Member
Nov 10, 2000
1,139
0
76
This all depends on how often you are pushing new versions/updating. If you are just starting a product and don't see a release for a couple of months, then dev mode is best. If your product is released and you are doing something like weekly updates, then production mode is probably best.

No, this is our "legacy" product that's been around for probably 5-6 years. Since this is a customer facing app, we can sometimes go through a couple releases the same week if there's a client demand. Otherwise, we probably do bi-weekly releases if we follow our own schedule.
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
13
81
www.markbetz.net
We use build configurations for this. Each build configuration has a post-build step that copies/renames the .config files for the debug (local dev), dev (dev server), test, and release environments.
 

DaveSimmons

Elite Member
Aug 12, 2001
40,730
670
126
We also use build configurations for this, for Visual Studio / C++. Most apps just have Release and Debug builds but one has four different sets of Release / Debug configurations with different preprocessor defines for C++ and the resource file.
 

max105

Golden Member
Nov 10, 2000
1,139
0
76
It sounds like I should just have config/build files take care of the final prod/dev mode of the application.

Even if you have config files for your build processes to manage the final application state, what is the default state when your code is in source control? Are these config files stored in source control?
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
13
81
www.markbetz.net
It sounds like I should just have config/build files take care of the final prod/dev mode of the application.

Even if you have config files for your build processes to manage the final application state, what is the default state when your code is in source control? Are these config files stored in source control?

The "default state" would be whatever build configuration was selected when the .sln file was last checked in. In practice that is always "debug" for developers working on code locally, and since we build out to our dev, test, and production servers using cruise control it just selects the proper build configuration that it needs for a given environment. Works pretty well.
 

Noriaki

Lifer
Jun 3, 2000
13,640
1
71
usually we try to keep trunk/master in a state that's "mostly functional" as in ready to hit an acceptance test and then have release branches/tags.

Once trunk/master passes an acceptance test, you merge to your release branch.

So, short answer: both
 

Noriaki

Lifer
Jun 3, 2000
13,640
1
71
sounds like you're doing releases often enough that you might not have a full formal acceptance test process, I still suggest having specific branches to release from and don't release directly from trunk.

I have never actually used VSS, so I don't know how well branching and merging works in it though.
 

Leros

Lifer
Jul 11, 2004
21,867
7
81
You work in a development branch, eventually getting into production quality. Then you copy it into another branch. That branch never gets changed, unless you're pushing updates for old version.
 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |