【正文】
dmin Training 169。 Polarion Software GmbH 2022 76 Tagging Why Tagging? ? Why do we need tags? ? Mark a release state of a product. ? Mark a snapshot of the current development. ? Typical Release names: ? Release , Release , PRODUCT etc. ? A Tag name must be unique to mark all ponents of the given product (source code and documentation) and is used to reproduce the state of the tag in the future. Subtrain SVN Admin Training 169。 Polarion Software GmbH 2022 77 Tagging Why Tagging? ? If we take a look at the architecture chapter we really don?t need a special tag. We only need to write down the revision number. ? But human beings have other requirements. ? They like to have selfexplanatory tag names which are more handy. ? But the question is: ? Where to put the tag information in the repository? Subtrain SVN Admin Training 169。 Polarion Software GmbH 2022 78 To create a release tag just copy … …anyway you have the revision number … tags Project 1 Root Release 1 Tagging Tagging by Copy trunk Subtrain SVN Admin Training 169。 Polarion Software GmbH 2022 79 Tagging Tagging by Copy via TortoiseSVN ? Create a tag for the trunk development via TortoiseSVN: ? Context Menu Branch/Tags (You have to be in your working copy): Subtrain SVN Admin Training 169。 Polarion Software GmbH 2022 80 Tagging Tagging by Copy via TortoiseSVN ? Create a tag for the trunk development via TortoiseSVN: Or via ReposBrowser and context menu Copy to Branching Why Branching Creating Branches Using Branches Subtrain SVN Admin Training 169。 Polarion Software GmbH 2022 82 Branches Why Branching? ? Assume the following situation: ? You have created a great product and it has been delivered to your customer. ? Before you delivered the product you have created a tag, let us name it ?Release ― ? Your current development crew is working on Release with new features. ? And now Murphy?s Law caught you: ? Your customer calls you and reports that he has found a bug in your software. Subtrain SVN Admin Training 169。 Polarion Software GmbH 2022 83 Branches Why Branching? ? The development has continued after the release of RELEASE ? You want to fix the bug to satisfy your customer! ? In your current development you have enhanced many of the product‘s functions but you don?t want to deliver a product with more features and you haven?t finished testing yet. ? How to solve this situation? Main line of development RELEASE Subtrain SVN Admin Training 169。 Polarion Software GmbH 2022 84 Branches Why Branching? ? Based on the tag you?ve created during the delivery you can check out the exact state of the delivery. ? You create a Branch to fix the bug in the software. ? After you have fixed the bug you can tag the Branch and deliver another version to the customer. ? Your customer is satisfied that you fixed the bug so fast. ? You haven?t disturbed the current development. RELEASE BUGFIX_BRANCH RELEASE Subtrain SVN Admin Training 169。 Polarion Software GmbH 2022 85 Branches Creating Branches branches trunk Calc Root Paint mycalc branch branches trunk Subtrain SVN Admin Training 169。 Polarion Software GmbH 2022 86 ? Based on your pany‘s policy you may have subdirectories under the branches directory in the repository: ? branches/releasecandidates ? branches/subprojects ? branches/userbranches This differs much from pany to pany. Branches Using Branches Subtrain SVN Admin Training 169。 Polarion Software GmbH 2022 87 ? You would like to work on the branch to fix the bug. ? You can do it in two ways: ? Check out a plete new working copy from the branch. ? Or switch your current working copy to the particular branch. Branches Using Branches RELEASE BUGFIX_BRANCH RELEASE Subtrain SVN Admin Training 169。 Polarion Software GmbH 2022 88 Branches Using Branches ? Create a branch from a release tag via TortoiseSVN: ? Context Menu Copy to… Subtrain SVN Admin Training 169。 Polarion Software GmbH 2022 89 Branches Using Branches Subtrain SVN Admin Training 169。 Polarion Software GmbH 2022 90 Branches Using Branches Subtrain SVN Admin Training 169。 Polarion Software GmbH 2022 91 ? Fix the bug through doing the necessary modifications and finally mit the changes to the branch. ? After having fixed the bug on the branch create a tag to mark the new release which can be delivered to the customer. ? Create the new Release Tag: svn copy m” Fixed Release ” Branches Using Branches Merging Merging from a Branch Merge Tracking Best Practices Subtrain SVN Admin Training 169。 Polarion Software GmbH 2022 93 Merging Merging From a Branch ? What‘s with the bug you39。ve fixed on the bugfixbranch? ? What about your current development? ? You have to merge the changes made in the branch back to the main line. RELEASE BUGFIX_BRANCH Merge back 267 RELEASE Subtrain SVN Admin Training 169。 Polarion Software GmbH 2022 94 Merging Merging From a Branch via TortoiseSVN ? Merging of a branch via TortoiseSVN: Subtrain SVN Admin Training 169。 Polarion Software GmbH 2022 95 Merging Merging From a Branch via TortoiseSVN ? Merging of a branch via TortoiseSVN: Subtrain SVN Admin Training 169。 Polarion Software GmbH 2022 96 Merging Merging From a Branch via TortoiseSVN ? Merging of a branch via TortoiseSVN: Subtrain SVN Admin Training 169。 Polarion Software GmbH 2022 97 Merging Merge Tracking ? Merge tracking: ? Subversion does not have any function to track merges which have been done . to prevent you to merge a branch a second time ? You have to do it on your own