Re: Making branches
"Roger Binns" <[email protected]>
| Newsgroups | gmane.comp.mobile.bitpim.devel |
|---|---|
| Message-ID | <004501c648da$422bb970$3501a8c0@rogersqyvr14d3> |
> How do I merge changes from the trunk into my branch You should at least read that bit of the subversion book so you understand what is going on. > I've tried to use the merge tool in tortoisesvn but it does not do anything > useful. It does - you just didn't feed it the right information. Assuming you want to do the whole src directory: - Get the log history and revision graph for src in your checked out branch - You'll see it was made at rev 2900, so the changes we want to merge are from 2901 to now of src - Right click and choose merge on the src directory - In the from URL, put https://svn.sourceforge.net/svnroot/bitpim/trunk/bitpim/src - For the from revision, put 2901 - For the end URL, we want the same thing - We'll use the head revision for the end Hit Dry Run and you will see what would happen if the merge went ahead. In this case you will see it would all go fine, except for gui.py where you'll have to resolve conflicts. (Note that subversion knows about conflicts and will mark the file as such. You need to right click and resolve when you are done.) Since everything seems right, hit Merge. Check your working copy and make any changes as appropriate and then commit. It initially all seems counter-intuitive, but it does make sense. Your working copy needs to be where you want the changes to happen (ie the target of the merge). You then tell Subversion where you want the changes to come from. (We could each have 10 branches so it has no idea). You also have to tell it what revision number to start at and what revision number to stop at. The relevant changes are applied to your working copy, but not committed. Subversion will do the right thing even if you renamed files or the branch you grabbed stuff from renamed files. When you do your commit, include the revision numbers. Your message will be something like "merged changes from trunk/bitpim/src rev 2901 to rev 2929". (You can find the current revision number by running "svnversion .") The next time you need to do a merge, look in the log messages and you'll see that you need to start at 2930. (Be careful of off by one errors!) Currently you have to track which changesets have been merged manually by putting the numbers in commit messages. A future version of subversion will allow this information to be tracked by subversion directly. If you are wondering what all those big expensive commercial version control systems do, they give a gui and let you cherry pick which changesets to apply and where, and remember that they have been applied. That gets to be nice to have if you have a lot of branches and changes you need to move amongst them. Roger ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642