Source code branching and .NET

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Source code branching and .NET

      Hi,

      I have a question about source code branching and .NET projects. If you have different branches for your code say your main branch and a publish branch how do you manage the .NET project file. I have been thinking how you would get around not having to have multiple project files one for each branch. The problem with having multiple .NET project files is you have to maintain them all. Is there a way to have one .NET projects file that works for all your branches.

      Cheers
      Scotte
    • RE: Source code branching and .NET

      This is a good question, and one I wish to hear the answer to as well. I know you can have several projects open in the same Workspace ("Solution"), but that's not really a solution.
      -Larrik Jaerico

      www.LarrikJ.com
    • RE: Source code branching and .NET

      Kain, is right (voice of experience)
      Each branch should be able to live on its own.

      What system are you using (Source Safe, CVS, Perforce) maybe specific advice would help you
    • I'm wondering which is easier to manage branches in - CVS, Perforce, SVN? SourceSafe is a joke - I've already had it go corrupt on me once and I won't do it again.
      "Your job is not to die for your country. Your job is to make some other poor sod die for his."
    • RE: Source code branching and .NET

      Thanks for the suggestions.

      I was going with the idea of a project file per branch, but was wondering how to keep maintenance of the project files to a minimum if possible, like adding new files. Actually this probably would not be such a problem as I guess you can integrate the project files as they are just xml files anyway.

      The question was a general one, I have had experience of using sourcesafe, alienbrain, perforce and subversion.

      I personally think alienbrain and perforce are both very easy to use. Subversion is a good choice considering it is free. I agree sourcesafe is not very good for large projects, it has also corrupted my source files in the past.
    • RE: Source code branching and .NET

      Integrating project files from multiple branches can be tricky, sometimes - so when it needs to happen its a good idea to get another programmer looking over your shoulder.

      Dare I suggest a code review???

      And, Kain is right - branch everything, including the project file.
      Mr.Mike
      Author, Programmer, Brewer, Patriot
    • Um - well - they don't. SourceSafe can't handle anything as big was WindowsXP or MSOffice. Tens of thousands of source code files and hundreds of developers, with something like 3-5 cascading branch lines that separate main line development from the gold master is much bigger job than SourceSafe was ever even designed for.

      They call their internal system Source Depot - and while you can't buy it from Microsoft you can buy something that has extremely similar performance characteristics - Perforce.
      Mr.Mike
      Author, Programmer, Brewer, Patriot
    • Hey guys - I've heard Subversion handles branching pretty smoothly. Any opinions? I have a linux box that I'm only using for an email server at the moment, but I could probably go off the deep end and install Subversion on it while I'm at it....

      Not that I'm a big linux guru or anything, but I finally found a brief rundiown on sendmail in "The 100% Red Hat Fedora Linux 3 Bible" that demystified it for me and now I'm feeling a little cocky. I thought at one time that I was going to start developing on linux - but I was having too much trouble getting started with all of the different flavors and I already had too much on my plate. I guess some day I'll go back to it, start building all of my projects on SDL.

      Oops - rambled....

      Rich
      "Your job is not to die for your country. Your job is to make some other poor sod die for his."
    • Originally posted by MRom
      branching and tagging in Subversion are done by just a svn copy command.


      Dunno - sounds kinda complex to me....

      That rocks. I'm gonna have to install it.

      Rich
      "Your job is not to die for your country. Your job is to make some other poor sod die for his."
    • I'm developing on Linux at the moment (I don't even have a compiler installed on Windows right now), and I love it.

      I've only used CVS, and I wasn't the one to set it up. The person who did set it up made you have to go through some serious steps to use it, for security, so my experience with it is actually a bit limited.
      -Larrik Jaerico

      www.LarrikJ.com
    • Ok if you have a new project file for each branch and you have several project files on the go say one for PS2, XBOX and PSP and your code is located in different directories for each branch then it becomes a large task to keep all the project files for all the branches up to date.

      I may have not understood the way branching works and if so I apologise, but if you had to add new source files to one of the branches then you would have a lot of project files to update.

      I was just wondering what other developers did in this situation.
    • Branches are meant to provide a copy of the source that you can mess with, without breaking other branches. So, if you are adding a source file, you don't WANT to add it to the other branches and project files. THAT happens when branches are merged back together, which is an alien process to me.
      -Larrik Jaerico

      www.LarrikJ.com
    • You mean you wish it was an alien process - one that aliens would come down and do for you!

      I think I'm going to install Subversion and create a project with branches just to see how merging is done. It might be like "I'm going to hit myself in the foot with a brick to see how it feels," but I'm gonna try it!

      Rich
      "Your job is not to die for your country. Your job is to make some other poor sod die for his."
    • In theory merging isn't that bad, if you don't have many conflicts. But then again, that would somewhat defeat the point of making a branch in the first place. I've done some "small scale" merging with Subversion (by that I mean it was a small project and only about 2-3 source files had to have conflicts resolved). It's no harder than any other merge in any other version control system. The complexity of the merge is directly related to how much you changed in the branch versus what's already in the branch you're merging to.