Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Subversion working practises.

Subversion working practises.

Scheduled Pinned Locked Moved The Lounge
questioncsharpsysadminhelptutorial
19 Posts 6 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Simon P Stevens
    wrote on last edited by
    #1

    This week we switched over to subversion (from source safe). :-D I spent yesterday reconfiguring the build server (cruise control .net) to work from subversion. Thing is, the build server runs with the trunk. Today I branched the trunk to start work on some new features that have been requested, so when I commit changes to my branch the build server doesn't do anything. Is this a common problem? Should I change my build server to run on the branch we are currently working on. But then what if different devs are working on different branches? Should we have multiple build servers instead, one for each major development branch and one for the trunk? Or do I just accept this, and encourage devs to regularly merge back down to the trunk so things get built. I'm wondering if we should have a standard "unstable" branch, and two build servers. one for unstable branch and one for the trunk. Disclaimer: This isn't a programming question, I know how to do these things, I'm just not sure which is the best process. I'm interested in what other people are doing.

    Simon

    S J R P 4 Replies Last reply
    0
    • S Simon P Stevens

      This week we switched over to subversion (from source safe). :-D I spent yesterday reconfiguring the build server (cruise control .net) to work from subversion. Thing is, the build server runs with the trunk. Today I branched the trunk to start work on some new features that have been requested, so when I commit changes to my branch the build server doesn't do anything. Is this a common problem? Should I change my build server to run on the branch we are currently working on. But then what if different devs are working on different branches? Should we have multiple build servers instead, one for each major development branch and one for the trunk? Or do I just accept this, and encourage devs to regularly merge back down to the trunk so things get built. I'm wondering if we should have a standard "unstable" branch, and two build servers. one for unstable branch and one for the trunk. Disclaimer: This isn't a programming question, I know how to do these things, I'm just not sure which is the best process. I'm interested in what other people are doing.

      Simon

      S Offline
      S Offline
      Stuart Dootson
      wrote on last edited by
      #2

      Simon Stevens wrote:

      I'm wondering if we should have a standard "unstable" branch, and two build servers. one for unstable branch and one for the trunk.

      That's what I'd probably go for - allow any developer to stage into the unstable branch, but control access to the trunk so you know you're merging a 'good' (as in buildable and (possibly) fully passing tests?) version of the build into it.

      Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

      S 1 Reply Last reply
      0
      • S Stuart Dootson

        Simon Stevens wrote:

        I'm wondering if we should have a standard "unstable" branch, and two build servers. one for unstable branch and one for the trunk.

        That's what I'd probably go for - allow any developer to stage into the unstable branch, but control access to the trunk so you know you're merging a 'good' (as in buildable and (possibly) fully passing tests?) version of the build into it.

        Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

        S Offline
        S Offline
        Simon P Stevens
        wrote on last edited by
        #3

        Thanks. It just seems like a bit of overkill for a department with 3 developers (including me). :laugh:

        Simon

        S R 2 Replies Last reply
        0
        • S Simon P Stevens

          This week we switched over to subversion (from source safe). :-D I spent yesterday reconfiguring the build server (cruise control .net) to work from subversion. Thing is, the build server runs with the trunk. Today I branched the trunk to start work on some new features that have been requested, so when I commit changes to my branch the build server doesn't do anything. Is this a common problem? Should I change my build server to run on the branch we are currently working on. But then what if different devs are working on different branches? Should we have multiple build servers instead, one for each major development branch and one for the trunk? Or do I just accept this, and encourage devs to regularly merge back down to the trunk so things get built. I'm wondering if we should have a standard "unstable" branch, and two build servers. one for unstable branch and one for the trunk. Disclaimer: This isn't a programming question, I know how to do these things, I'm just not sure which is the best process. I'm interested in what other people are doing.

          Simon

          J Offline
          J Offline
          James Brown
          wrote on last edited by
          #4

          one approach is this: Have seperate 'trunk' and 'release' branches. Your build server would build out of /release. All development and updates occurs in /trunk. If a developer wants to make small changes they'd do that in /trunk. If a major change is taking place - i.e. experimental changes that might have a major impact, the developer would create their own branch, and merge back into /trunk when they're done. When you want to cut a new release, you 'svn' copy /trunk over into /release (keeping the svn history in the process) - or choose which bits of /trunk you want to release (or even an interim release-candidate) This way your release process is highly controlled and you can easily revert back to known released versions at any time without having to worry about the mess that can occur in trunk with multiple developers merging in their separate branches.


          http://www.catch22.net

          S 1 Reply Last reply
          0
          • S Simon P Stevens

            This week we switched over to subversion (from source safe). :-D I spent yesterday reconfiguring the build server (cruise control .net) to work from subversion. Thing is, the build server runs with the trunk. Today I branched the trunk to start work on some new features that have been requested, so when I commit changes to my branch the build server doesn't do anything. Is this a common problem? Should I change my build server to run on the branch we are currently working on. But then what if different devs are working on different branches? Should we have multiple build servers instead, one for each major development branch and one for the trunk? Or do I just accept this, and encourage devs to regularly merge back down to the trunk so things get built. I'm wondering if we should have a standard "unstable" branch, and two build servers. one for unstable branch and one for the trunk. Disclaimer: This isn't a programming question, I know how to do these things, I'm just not sure which is the best process. I'm interested in what other people are doing.

            Simon

            R Offline
            R Offline
            Rage
            wrote on last edited by
            #5

            Simon Stevens wrote:

            when I commit changes to my branch the build server doesn't do anything

            How did you handle that before ? I can't see why moving from SS to SVN should affect the way you can build on the build servers.

            S 1 Reply Last reply
            0
            • J James Brown

              one approach is this: Have seperate 'trunk' and 'release' branches. Your build server would build out of /release. All development and updates occurs in /trunk. If a developer wants to make small changes they'd do that in /trunk. If a major change is taking place - i.e. experimental changes that might have a major impact, the developer would create their own branch, and merge back into /trunk when they're done. When you want to cut a new release, you 'svn' copy /trunk over into /release (keeping the svn history in the process) - or choose which bits of /trunk you want to release (or even an interim release-candidate) This way your release process is highly controlled and you can easily revert back to known released versions at any time without having to worry about the mess that can occur in trunk with multiple developers merging in their separate branches.


              http://www.catch22.net

              S Offline
              S Offline
              Simon P Stevens
              wrote on last edited by
              #6

              That is essentially what I have set up currently. (Although slightly different names) The sticking point though, is what branch does the build server run on. It's currently set to run on what you are calling the "release" branch. but this means we don't get the benefit of continuous builds and automated unit test runs on our development branch. So I basically need 2 build servers don't I? Or is there a happy medium somewhere. (We only have 3 devs, including me, so 2 build servers seems like overkill)

              Simon

              J 1 Reply Last reply
              0
              • S Simon P Stevens

                That is essentially what I have set up currently. (Although slightly different names) The sticking point though, is what branch does the build server run on. It's currently set to run on what you are calling the "release" branch. but this means we don't get the benefit of continuous builds and automated unit test runs on our development branch. So I basically need 2 build servers don't I? Or is there a happy medium somewhere. (We only have 3 devs, including me, so 2 build servers seems like overkill)

                Simon

                J Offline
                J Offline
                James Brown
                wrote on last edited by
                #7

                Ah I see... yes in that case you'd need two build servers. Definitely seems like overkill for 3 devs - but it'd scale well if you grow in size, and it shouldn't be any overhead for you once it's set up. Does seem excessive though. Maybe just one build server that has both trunk + release brances checked out, and the server builds one, then the other, all on the same box?


                http://www.catch22.net

                S 1 Reply Last reply
                0
                • R Rage

                  Simon Stevens wrote:

                  when I commit changes to my branch the build server doesn't do anything

                  How did you handle that before ? I can't see why moving from SS to SVN should affect the way you can build on the build servers.

                  S Offline
                  S Offline
                  Simon P Stevens
                  wrote on last edited by
                  #8

                  :-D We didn't branch with SS. (Branching is SS is confusing, and apparently temperamental, so we just didn't do it. It was one of the arguments for switching to svn - support for proper reliable branching) All development was just done, and checked straight in to the main branch, so the build server just built that.

                  Simon

                  R 1 Reply Last reply
                  0
                  • S Simon P Stevens

                    This week we switched over to subversion (from source safe). :-D I spent yesterday reconfiguring the build server (cruise control .net) to work from subversion. Thing is, the build server runs with the trunk. Today I branched the trunk to start work on some new features that have been requested, so when I commit changes to my branch the build server doesn't do anything. Is this a common problem? Should I change my build server to run on the branch we are currently working on. But then what if different devs are working on different branches? Should we have multiple build servers instead, one for each major development branch and one for the trunk? Or do I just accept this, and encourage devs to regularly merge back down to the trunk so things get built. I'm wondering if we should have a standard "unstable" branch, and two build servers. one for unstable branch and one for the trunk. Disclaimer: This isn't a programming question, I know how to do these things, I'm just not sure which is the best process. I'm interested in what other people are doing.

                    Simon

                    P Offline
                    P Offline
                    Phil Martin
                    wrote on last edited by
                    #9

                    Wow, I can't believe someone else is using CruiseControl.Net - I thought I was the only one! This is our setup:

                    • Surround SCM to manage our code, but the concepts are the same

                    • We have one constant task, ConfigGenerator

                    • ConfigGenerator runs a CCNet plugin which runs a csscript[^] which does three things:

                    • generates our known builds, such as the trunk

                    • queries the issue tracker for what code changes are currently active.

                    • using the same named issue for a branch, we now know what branches are in active testing or need building.

                    • For each of these we write out a block to the config.xml file

                    • After all this, CruiseControl.Net reads in the new config xml file, and recognises there are new builds to be done.

                    The benefits for this are:

                    • We can easily have per branch build scripts, thus building earlier versions as well as current
                    • People can sandbox all individual development
                    • We have our intranet also link to cc.net, which allows us to single click and publish a download to a web site to allow customers to access urgent interim builds.
                    • Regression test CC.Net projects are automatically generated along side branch CC.Net projects. That means they can be run independantly of all others.
                    • Our trunk remains clean and known good almost all of the time. People can check in willy nilly to their own branch at no risk.
                    • In general it's awesome.
                    S 1 Reply Last reply
                    0
                    • S Simon P Stevens

                      Thanks. It just seems like a bit of overkill for a department with 3 developers (including me). :laugh:

                      Simon

                      S Offline
                      S Offline
                      Stuart Dootson
                      wrote on last edited by
                      #10

                      Simon Stevens wrote:

                      It just seems like a bit of overkill for a department with 3 developers (including me).

                      That's cause it probably is - you didn't say there were only three of you :-) I was thinking more along hte lines of 10-20!

                      Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

                      1 Reply Last reply
                      0
                      • J James Brown

                        Ah I see... yes in that case you'd need two build servers. Definitely seems like overkill for 3 devs - but it'd scale well if you grow in size, and it shouldn't be any overhead for you once it's set up. Does seem excessive though. Maybe just one build server that has both trunk + release brances checked out, and the server builds one, then the other, all on the same box?


                        http://www.catch22.net

                        S Offline
                        S Offline
                        Simon P Stevens
                        wrote on last edited by
                        #11

                        James Brown wrote:

                        Maybe just one build server that has both trunk + release brances checked out, and the server builds one, then the other, all on the same box?

                        Yeah, I thought about that, but I don't think it will work. They'll basically be checked out into two separate folders, and it will end up with references getting crossed over. on the dev pc you have: c:\source\project1\bin c:\source\project2\bin project 2 references a project 1 binary. Everything works fine, you check it in. on the build server: c:\source\project1\bin c:\source\project2\bin c:\releasebranchsource\project1\bin c:\releasebranchsource\project2\bin project 2 reference in the release source branch will be pointing at c:\source\project1\bin, so the build of the release branch will end up pointing to the other branch. Maybe it won't, maybe I'm wrong and it will work fine. But there are definitely parts of the build process that are script files that rely on the full path being the same. Maybe that's the problem though, maybe I should be changing those script files to work independent of paths. Thanks for the help though, I'll look into it.

                        Simon

                        1 Reply Last reply
                        0
                        • P Phil Martin

                          Wow, I can't believe someone else is using CruiseControl.Net - I thought I was the only one! This is our setup:

                          • Surround SCM to manage our code, but the concepts are the same

                          • We have one constant task, ConfigGenerator

                          • ConfigGenerator runs a CCNet plugin which runs a csscript[^] which does three things:

                          • generates our known builds, such as the trunk

                          • queries the issue tracker for what code changes are currently active.

                          • using the same named issue for a branch, we now know what branches are in active testing or need building.

                          • For each of these we write out a block to the config.xml file

                          • After all this, CruiseControl.Net reads in the new config xml file, and recognises there are new builds to be done.

                          The benefits for this are:

                          • We can easily have per branch build scripts, thus building earlier versions as well as current
                          • People can sandbox all individual development
                          • We have our intranet also link to cc.net, which allows us to single click and publish a download to a web site to allow customers to access urgent interim builds.
                          • Regression test CC.Net projects are automatically generated along side branch CC.Net projects. That means they can be run independantly of all others.
                          • Our trunk remains clean and known good almost all of the time. People can check in willy nilly to their own branch at no risk.
                          • In general it's awesome.
                          S Offline
                          S Offline
                          Simon P Stevens
                          wrote on last edited by
                          #12

                          ccnet rocks, I can't believe more people don't use it. I love having it auto run a full build, all unit tests and fxcop reports any time I check in any changes. It's a step beyond nightly builds that I find really helpful. and I love the instant feedback to the cctray app. So basically, you have a custom plugin that regenerates your ccnet.config file any time it detects changes, and creates different ccnet projects for each branch? Cool. I think my main problem is our build process is totally dependant on the path it is in. If I copied all the source and scripts to a different directory the build wouldn't work. OK. I think I might work on making things path independent, then I can just have the build server build multiple branches.

                          Simon

                          P 1 Reply Last reply
                          0
                          • S Simon P Stevens

                            ccnet rocks, I can't believe more people don't use it. I love having it auto run a full build, all unit tests and fxcop reports any time I check in any changes. It's a step beyond nightly builds that I find really helpful. and I love the instant feedback to the cctray app. So basically, you have a custom plugin that regenerates your ccnet.config file any time it detects changes, and creates different ccnet projects for each branch? Cool. I think my main problem is our build process is totally dependant on the path it is in. If I copied all the source and scripts to a different directory the build wouldn't work. OK. I think I might work on making things path independent, then I can just have the build server build multiple branches.

                            Simon

                            P Offline
                            P Offline
                            Phil Martin
                            wrote on last edited by
                            #13

                            Yep, you summarised it far better than I. The automatic generation thing is so great. It just means that everybody's individual work is built in precisely the same process as the full release builds. We have confidence in giving interim builds to special clients because we know it's just like a full build, just manually tested less. CCNet rocks. It's not the only system out there, but we like it. Oh, and just for reference, we only have 3 or 4 developers in our team, so it's the same size as you. And it's a perfect fit for us. The next step for us with CruiseControl is to separate the regression tests and builds on to a separate machine, and start toying with ways of doing concurrent builds with confidence. You are right - the first step is path independence. We achieved that by stick nearly everything in to source control. One check out is 95% of the way to getting a complete build.

                            S 1 Reply Last reply
                            0
                            • S Simon P Stevens

                              :-D We didn't branch with SS. (Branching is SS is confusing, and apparently temperamental, so we just didn't do it. It was one of the arguments for switching to svn - support for proper reliable branching) All development was just done, and checked straight in to the main branch, so the build server just built that.

                              Simon

                              R Offline
                              R Offline
                              Rage
                              wrote on last edited by
                              #14

                              OK. I am not doing any SW development at the moment. In my previous company, the build server got the path of the branch as parameter and could build any branch. There was a simple web interface for all developers to customize the build, including the path.

                              S 1 Reply Last reply
                              0
                              • P Phil Martin

                                Yep, you summarised it far better than I. The automatic generation thing is so great. It just means that everybody's individual work is built in precisely the same process as the full release builds. We have confidence in giving interim builds to special clients because we know it's just like a full build, just manually tested less. CCNet rocks. It's not the only system out there, but we like it. Oh, and just for reference, we only have 3 or 4 developers in our team, so it's the same size as you. And it's a perfect fit for us. The next step for us with CruiseControl is to separate the regression tests and builds on to a separate machine, and start toying with ways of doing concurrent builds with confidence. You are right - the first step is path independence. We achieved that by stick nearly everything in to source control. One check out is 95% of the way to getting a complete build.

                                S Offline
                                S Offline
                                Simon P Stevens
                                wrote on last edited by
                                #15

                                Phil Martin... wrote:

                                You are right - the first step is path independence. We achieved that by stick nearly everything in to source control. One check out is 95% of the way to getting a complete build.

                                Yeah, all our build scripts and 3rd party stuff are all source controlled too. I'm assuming most of our build scripts can be changed fairly easily, it's just a matter of working through them. So the .net references thing (here[^]) won't cause a problem then? We have a library project that contains an assembly that most other projects reference. Thanks for the suggestions.

                                Simon

                                P 1 Reply Last reply
                                0
                                • R Rage

                                  OK. I am not doing any SW development at the moment. In my previous company, the build server got the path of the branch as parameter and could build any branch. There was a simple web interface for all developers to customize the build, including the path.

                                  S Offline
                                  S Offline
                                  Simon P Stevens
                                  wrote on last edited by
                                  #16

                                  That's an interesting idea. Thanks. I'll look into it.

                                  Simon

                                  1 Reply Last reply
                                  0
                                  • S Simon P Stevens

                                    Phil Martin... wrote:

                                    You are right - the first step is path independence. We achieved that by stick nearly everything in to source control. One check out is 95% of the way to getting a complete build.

                                    Yeah, all our build scripts and 3rd party stuff are all source controlled too. I'm assuming most of our build scripts can be changed fairly easily, it's just a matter of working through them. So the .net references thing (here[^]) won't cause a problem then? We have a library project that contains an assembly that most other projects reference. Thanks for the suggestions.

                                    Simon

                                    P Offline
                                    P Offline
                                    Phil Martin
                                    wrote on last edited by
                                    #17

                                    Again we handle this by sticking it all in source control, and when CC.net does a checkout for building, it grabs everything it needs to do a build in isolation. We can still branch at different spots, but the way we have it all set up is if a branch is taken at a child spot, it grabs the code from the parent branch for the rest of the tree. We made this decision based on our priorities of quality over efficiency. I'm sure we could have come up with a way of sharing builds across branches to speed up compile time. But we weighed it up, and it was more important to us to have a absolutely definitely known good build rather than one that takes 5 minutes instead of 10. Not sure if that helps or not though.

                                    S 1 Reply Last reply
                                    0
                                    • S Simon P Stevens

                                      Thanks. It just seems like a bit of overkill for a department with 3 developers (including me). :laugh:

                                      Simon

                                      R Offline
                                      R Offline
                                      Russell Jones
                                      wrote on last edited by
                                      #18

                                      It's still not such a bad idea to keep development, test and production code apart. It stops a lot of the issues where one person's change stops everyone else's from working. VirtualBox or VMWare would mean that you don't have to have multiple physical boxen. If you're testing hard you can always recover some resources by shutting down the virtual instances that you are not using.

                                      1 Reply Last reply
                                      0
                                      • P Phil Martin

                                        Again we handle this by sticking it all in source control, and when CC.net does a checkout for building, it grabs everything it needs to do a build in isolation. We can still branch at different spots, but the way we have it all set up is if a branch is taken at a child spot, it grabs the code from the parent branch for the rest of the tree. We made this decision based on our priorities of quality over efficiency. I'm sure we could have come up with a way of sharing builds across branches to speed up compile time. But we weighed it up, and it was more important to us to have a absolutely definitely known good build rather than one that takes 5 minutes instead of 10. Not sure if that helps or not though.

                                        S Offline
                                        S Offline
                                        Simon P Stevens
                                        wrote on last edited by
                                        #19

                                        It does. Thanks. I think I just need to experiment a bit, and get my builds totally independent of path/location etc. Cheers.

                                        Simon

                                        1 Reply Last reply
                                        0
                                        Reply
                                        • Reply as topic
                                        Log in to reply
                                        • Oldest to Newest
                                        • Newest to Oldest
                                        • Most Votes


                                        • Login

                                        • Don't have an account? Register

                                        • Login or register to search.
                                        • First post
                                          Last post
                                        0
                                        • Categories
                                        • Recent
                                        • Tags
                                        • Popular
                                        • World
                                        • Users
                                        • Groups