radiantmatrix has asked for the wisdom of the Perl Monks concerning the following question:
I know this is slightly off-topic for PerlMonks, as it's more a general programming-process question and not in any way Perl-specific. However, I also think it's the best place for me to get a considered answer; and that the answer might be beneficial to PerlMonks novices as well.
I've long used source control -- mostly CVS -- for the obvious benefits. The most common benefit I get is the ability to solve those "damn, it was working yesterday, what changed?" moments.
My organization has a very good policy that you can't break the build -- that is, you only check in changes that have passed the current test suite. This is a good and useful policy for a myriad of reasons.
However, when I'm working on new features or particularly nasty bugs, I quickly found that I wanted to save particular points of my work -- perhaps when I got something promising working, or right before trying something experimental. Keeping track of commented-out code became unwieldy rather quickly as well.
So I developed the following approach -- but, I feel like I'm missing some obvious or easier solution to the problem. I'm curious about how other Monks might solve the same challenges.
Currently, our org has a CVS repository server called 'repoman'. I've set up my own server for development purposes ('devon'). When I work on a change, I:
- cvs co code from repoman into the "official copy" directory.
- cvs co the same project from devon into the "working copy" directory
- rsync the official copy to the working copy, one-way (update the working copy), and excluding the CVS directories.
- cvs commit the working copy to devon
- Make some changes, but maybe still have some broken code
- cvs commit to devon, goto 5 while code doesn't pass all tests.
- Once code is working, rsync working copy back to "official copy"
- cvs commit to repoman
I keep thinking there has to be a better solution to this that I'm just missing. What is it?
Ramblings and references
The Code that can be seen is not the true Code
I haven't found a problem yet that can't be solved by a well-placed trebuchet
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: How to best control non-working code with source control?
by pc88mxer (Vicar) on Apr 11, 2008 at 17:50 UTC | |
Re: How to best control non-working code with source control?
by kyle (Abbot) on Apr 11, 2008 at 18:02 UTC | |
Re: How to best control non-working code with source control?
by merlyn (Sage) on Apr 11, 2008 at 17:46 UTC | |
Re: How to best control non-working code with source control?
by tirwhan (Abbot) on Apr 12, 2008 at 08:30 UTC | |
Re: How to best control non-working code with source control?
by arc_of_descent (Hermit) on Apr 14, 2008 at 09:25 UTC | |
Re: How to best control non-working code with source control?
by sundialsvc4 (Abbot) on Apr 14, 2008 at 19:35 UTC | |
by radiantmatrix (Parson) on Apr 15, 2008 at 18:02 UTC |