terrycloth: (evil)
terrycloth ([personal profile] terrycloth) wrote2009-03-27 10:17 am

How to screw up your build without triggering a merge conflict.

Step 1: Have a bunch of functions that no one's using. Keep them out of the build like so:

#if NOT_NEEDED
function A
function B
function C
#endif //NOT_NEEDED

Step 2: Person A needs functions A and B. Their local build now looks like this:

function A
function B
#if NOT_NEEDED
function C
#endif //NOT_NEEDED

Step 3: Person B needs functions B and C. Their local build now looks like this:

#if NOT_NEEDED
function A
#endif //NOT_NEEDED
function B
function C

Both people check in. The second person is worried that someone else checked in to the same file, but hey, no merge conflicts!

Through the wonders of automatic merge software, you get:

function A
#endif //NOT_NEEDED
function B
#if NOT_NEEDED
function C

...and now you lose the rest of the file from that point on. Fortunately, this is likely to break the build, so it's not going to cause any *subtle* problems. }:P

(Also, I didn't actually check in, I just sync'd and did an overnight build, so it only broke me locally. Still...)

Post a comment in response:

(will be screened)
(will be screened if not validated)
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting