Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: [OT] Best Use of Subversion Branches in Perl Development

by perrin (Chancellor)
on Feb 02, 2007 at 05:55 UTC ( #597887=note: print w/ replies, xml ) Need Help??


in reply to [OT] Best Use of Subversion Branches in Perl Development

First, remember that "trunk" is just another branch in Subversion, and it has no significance whatsoever, so admonitions to be on a branch rather than on "trunk" are meaningless. What they're trying to say is, "Don't do your development work in the stable branch." I think that projects nearly always need one stable branch and one development branch, unless there is no stable release yet.

If the rest of the Parrot developers work in the trunk, there is no reason for you to work on a separate branch unless you are trying to make a large change which will be incompatible with other people's work if you commit it before it's all complete. It doesn't sound like that's the case. I think you could work in trunk.

If you do want to keep working in your branch, I think you should change your merge methodology a bit. For one thing, you don't want to merge from the point where your branch was created; you want to merge from the point where you last merged. You also should use tags, rather than trying to keep track of revision numbers or look them up in logs.

Here's a sample workflow:

  • Tag the trunk that you are about to merge into your branch:
    svn cp https://svn.perl.org/parrot/trunk https://svn.perl.org/parrot/t +ags/tools-merge-16
  • Merge everything from your last tag until this tag onto your branch:
    svn merge https://svn.perl.org/parrot/tags/tools-merge-15 https://svn. +perl.org/parrot/tags/tools-merge-16

There may still be some conflicts, but if you ever get conflicts on files that you personally have not modified, you should be worried. Conflicts are only supposed to happen when you and someone else touch the same lines or properties.


Comment on Re: [OT] Best Use of Subversion Branches in Perl Development
Select or Download Code
Re^2: [OT] Best Use of Subversion Branches in Perl Development
by hossman (Prior) on Feb 02, 2007 at 07:59 UTC
    First, remember that "trunk" is just another branch in Subversion, and it has no significance whatsoever, so admonitions to be on a branch rather than on "trunk" are meaningless. What they're trying to say is, "Don't do your development work in the stable branch."

    So, so true ... the most general way i can think of to express the sentiment is: "commit to a branch that is no more stable then the changes you are commiting"

    • if the "head" is an extremely stable line of code, only commit to it once you are confident your changes are fairly stable and won't need any more tweaks
    • if the "head" is where lots of iterative development is going on, then commit to it early and often
Re^2: [OT] Best Use of Subversion Branches in Perl Development
by jkeenan1 (Deacon) on Feb 02, 2007 at 18:31 UTC
    Thanks, everyone, for your rapid (as always) responses. Perrin, I had not previously had a reason to learn about tags. So I'll study up on them and see about implementing your suggestion.

    Thanks again.

    Jim Keenan
      Tags, branches, and the trunk are all the same to subversion; they are simply copies. To tag in subversion is to perform the same operation as creating a branch: svn copy. The difference between a tag and a branch is a semantic one. Branches are used for ongoing development. Tags are considered static snapshots.

      What is being suggested is that you create periodic snapshots of the trunk -- that way you don't have to remember the revision number of the previous time you merged in changes from the trunk; you simply remember the tag names.
Re^2: [OT] Best Use of Subversion Branches in Perl Development
by mugwumpjism (Hermit) on Mar 04, 2007 at 23:37 UTC
    This is one of the worst suggestions at tracking merging in subversion that I have ever read.
    $h=$ENV{HOME};my@q=split/\n\n/,`cat $h/.quotes`;$s="$h/." ."signature";$t=`cat $s`;print$t,"\n",$q[rand($#q)],"\n";
      How so?

        Because no tool in existence understands this crazy system, and it doesn't add anything to the existing conventions used by svk and svnmerge?

        $h=$ENV{HOME};my@q=split/\n\n/,`cat $h/.quotes`;$s="$h/." ."signature";$t=`cat $s`;print$t,"\n",$q[rand($#q)],"\n";
Re^2: [OT] Best Use of Subversion Branches in Perl Development
by blazar (Canon) on Mar 05, 2007 at 10:12 UTC

    I've only been using svn @ $work and never really got into it, so thanks for the extensive explanation. I've read all the thread in detail, and followed the links provided. Many interesting ideas here! Hopefully, I'm learning something.

    Regarding the specific issue being discussed here, since versioning control systems keep track of what's getting modified anyway, it seems strange that there's not a "selective" cp command that will copy one branch over another without overwriting files that have been modified in the destination one. If there were, then the OP would issue it before running the tests, resolve problems, and then merge.

      That wouldn't really be enough. You have to get the changes to the files you have modified as well. The svn merge command is pretty good at this though.
        That wouldn't really be enough. You have to get the changes to the files you have modified as well. The svn merge command is pretty good at this though.

        D'Oh! /me slaps his forehead. I found the reading of this thread stimulating, though, and I've started a new one, that I've been meditating about for some time now, somewhat related to these issues.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://597887]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2014-12-28 18:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (182 votes), past polls