Jasinski Technical Wiki

Navigation

Home Page
Index
All Pages

Quick Search
»
Advanced Search »

Contributor Links

Create a new Page
Administration
File Management
Login/Logout
Your Profile

Other Wiki Sections

Software

PoweredBy

Branching, Tagging, and Merging - Subversion

RSS
Modified on Wed, Sep 25, 2013, 1:43 PM by Administrator Categorized as Visual Studio and Developer Tools

Overview

This article gives a walk-through of using the branching, tagging, and merging features in Subversions via the Tortoise SVN client for Windows.

  • WC: — this prefix indicates the root folder of your working copy (on your local drive)
  • RB: — this prefix indicates the root folder within the Subversion Repository Browser

Walk-Through

  1. Setup project repository
  2. Add folders: branches, tags, and trunk
  3. Create a local folder and get latest version of the code via SVN Update or SVN Checkout.
  4. Create YourName.html file in WC:/trunk folder
  5. Commit to SVN
  6. Revise YourName.html with content showing "YourName RC 1"; commit.
  7. Tag HEAD revision as "YourName RC 1"
    • Windows Explorer > right click "trunk" folder > Tortoise SVN > Branch/tag
    • From WC/URL = .../trunk
    • To path = "/tags/YourName-RC-001"
    • Create copy in the repository from = HEAD revision in the repository
    • OK button
    • Repo browser now shows "/tags/YourName-RC-001" folder (may have to refresh)
  8. Edit WC:/trunk/YourName.html; commit.
  9. Open RB:/trunk/YourName.html - you should see your latest changes
  10. Open RB:/tags/YourName-RC-001/YourName.html - you should see YourName-RC-001 content
  11. Get Latest - In Windows Explorer
    • Right click *root* folder (parent of branches, tags, and trunk) > SVN Update...
    • Should now see /tags/YourName-RC-001 folder
  12. Fix bug in YourName-RC-001
    • Windows Explorer > right click "/tags/YourName-RC-001" folder > Tortoise SVN > Branch/tag
    • From WC/URL = ".../tags/YourName-RC-001"
    • To path = "/branches/YourName-RC-001.1"
    • Create copy in the repository from = Specific revision in repository (accept default revision)
    • OK button
    • Repo Browser now shows "/branches/YourName-RC-001.1" folder (may have to refresh)
  13. Get latest
    • Windows Explorer > right click "/branches/YourName-RC-001.1" > SVN Update...
    • Should now see WC:/branches/YourName-RC-001.1 folder
  14. Edit WC:/branches/YourName-RC-001.1/YourName.html, adding content to indicate a bug fix for "YourName RC 1.1"
  15. Commit WC:/branches/YourName-RC-001.1
  16. Open RB:/branches/YourName-RC-001.1/YourName.html -- should see YourName RC 1.1 content
  17. Merge your branch back into trunk
    • WC:/trunk/YourName.html > right click > Tortoise SVN > Merge...
    • Merge Type = "Merge a range of revisions" > Next button
    • URL to merge from = RB:/branches/YourName-RC-001.1/YourName.html
    • Revision range to merge = leave blank
    • Working copy = leave as default
    • Next button
    • Test merge button
    • (accept defaults)
    • Merge button
  18. Open RB:/trunk/YourName.html - Should see YourName RC 1 content
  19. Open WC:/trunk/YourName.html - Should see YourName RC 1.1 content

ScrewTurn Wiki version 3.0.1.400. Some of the icons created by FamFamFam. Except where noted, all contents Copyright © 1999-2024, Patrick Jasinski.