Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

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

by xdg (Monsignor)
on Feb 02, 2007 at 23:16 UTC ( #598030=note: print w/ replies, xml ) Need Help??


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

I have to second this, as SVK takes care of a lot of merge tracking for you. It does requires some different thinking as it replicates a repository to your computer and then manages the synchronization from there. See the SVK Wiki for more details and some guides.

In SVK, people seem to usually make a local branch on their computer rather than a branch in the repository and work there. It might work like this:

# create a location for remote and local mirrors $ svk mkdir //mirror $ svk mkdir //local # establish the mirror to a remote repo $ svk mirror https://some_repo.url/ //mirror/some_repo # sync the head revision to your mirror $ svk sync -s HEAD # create the local branch $ svk cp -m "branching" //mirror/some_repo/trunk //local/some_repo # check it out $ svk co //local/some_repo # hack hack hack $ cd some_repo $ $EDITOR bar.pm # check in changes to the branch $ svk ci -m "log message" # merge in changes from the trunk (same as svk up -sm) # this does a smart merge from where the last copy was made $ svk pull # hack hack hack and check in changes # merge branch back into the trunk $ svk push

I think you can also do this entirely on a remote branch, too, like this (though there are other ways):

# create a location for mirrors $ svk mkdir //mirror # establish the mirror to a remote repo $ svk mirror https://some_repo.url/ //mirror/some_repo # sync the head revision to your mirror $ svk sync -s HEAD # create the branch $ svk cp -m "branching" //mirror/some_repo/trunk //mirror/some_repo/br +anches/foo # check it out $ svk co //mirror/some_repo/branches/foo # hack hack hack $ cd foo $ $EDITOR bar.pm # update from branch (but sync first) $ svk up -s # check in changes to the branch $ svk ci -m "log message" # merge in changes from the trunk (same as svk up -sm) # this does a smart merge from where the last copy was made $ svk pull # hack hack hack and check in changes # merge branch back into the trunk $ svk push

-xdg

Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.


Comment on Re^2: [OT] Best Use of Subversion Branches in Perl Development
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (11)
As of 2014-07-10 17:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (214 votes), past polls