Difference between revisions of "WorkingWithSVNBranches"
(Well, the template includes the category) |
|||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
{{Outdated}} | |||
(This began as a copy of [[WorkingWithCVSBranches]]; bear with us as we update it to reflect SVN) | (This began as a copy of [[WorkingWithCVSBranches]]; bear with us as we update it to reflect SVN) | ||
== Starting Work on an Existing Branch == | |||
* checking out a specific branch of MODULE into DIR | * checking out a specific branch of MODULE into DIR | ||
Line 7: | Line 9: | ||
svn checkout https://inkscape.svn.sourceforge.net/svnroot/inkscape/MODULE/branches/BRANCH DIR | svn checkout https://inkscape.svn.sourceforge.net/svnroot/inkscape/MODULE/branches/BRANCH DIR | ||
== Making Your Own Branch == | |||
:1. Copy the trunk to a new branch: | :1. Copy the trunk to a new branch: | ||
Line 17: | Line 19: | ||
svn checkout https://svn.sourceforge.net/svnroot/inkscape/inkscape/branches/MY_BRANCH_NAME inkscape-MY_BRANCH_NAME | svn checkout https://svn.sourceforge.net/svnroot/inkscape/inkscape/branches/MY_BRANCH_NAME inkscape-MY_BRANCH_NAME | ||
== Merging Your Changes == | |||
For svn, rewrite the following section with material from [http://svnbook.red-bean.com/en/1.4/svn.branchmerge.copychanges.html Copying Changes Between Branches] and [http://svnbook.red-bean.com/en/1.4/svn.branchmerge.commonuses.html Common Use-Cases]. | For svn, rewrite the following section with material from [http://svnbook.red-bean.com/en/1.4/svn.branchmerge.copychanges.html Copying Changes Between Branches] and [http://svnbook.red-bean.com/en/1.4/svn.branchmerge.commonuses.html Common Use-Cases]. | ||
Line 50: | Line 51: | ||
If you merge to another branch that you've never merged to before, you'll need to merge from [[BRANCH_START]] up through [[BRANCH_MERGE_3]] to catch up. | If you merge to another branch that you've never merged to before, you'll need to merge from [[BRANCH_START]] up through [[BRANCH_MERGE_3]] to catch up. | ||
Latest revision as of 04:40, 10 July 2016
This page is outdated. It is kept for historical reasons, e.g. to document specific decisions in Inkscape development.
(This began as a copy of WorkingWithCVSBranches; bear with us as we update it to reflect SVN)
Starting Work on an Existing Branch
- checking out a specific branch of MODULE into DIR
svn checkout https://inkscape.svn.sourceforge.net/svnroot/inkscape/MODULE/branches/BRANCH DIR
Making Your Own Branch
- 1. Copy the trunk to a new branch:
svn copy https://svn.sourceforge.net/svnroot/inkscape/inkscape/trunk https://svn.sourceforge.net/svnroot/inkscape/inkscape/branches/MY_BRANCH_NAME
- 2. Checkout this branch:
svn checkout https://svn.sourceforge.net/svnroot/inkscape/inkscape/branches/MY_BRANCH_NAME inkscape-MY_BRANCH_NAME
Merging Your Changes
For svn, rewrite the following section with material from Copying Changes Between Branches and Common Use-Cases.
TODO: Update for svn.
- 1. Commit your work and resolve any conflicts
- 2. Tag the revisions for this merge
cvs -z3 tag BRANCH_MERGE
- 3. Switch your working copy back to the branch you want to merge to (HEAD is the default if you don't specify a branch with -j)
cvs -z3 update -PAd -r OTHER_BRANCH
- 4. Merge the changes between BRANCH_START and BRANCH_MERGE into your working copy
cvs -z3 update -Pd -j BRANCH_START -j BRANCH_MERGE
- 5. Check for any conflicts and commit the changes
If you want to work on BRANCH some more, you'll need to switch your working copy back to BRANCH again.
For future merges, you'll need to tag the revisions for those merges with unique tags (e.g. BRANCH_MERGE_2, BRANCH_MERGE_3, etc...), and only merge the changes between the previous merge and the new one.
This is so you don't end up merging the same set of changes twice. Example:
First merge: -j BRANCH_START -j BRANCH_MERGE Second merge: -j BRANCH_MERGE -j BRANCH_MERGE_2 Third merge: -j BRANCH_MERGE_2 -j BRANCH_MERGE_3
If you merge to another branch that you've never merged to before, you'll need to merge from BRANCH_START up through BRANCH_MERGE_3 to catch up.