【文章內(nèi)容簡介】
Admin Training 169。 Polarion Software GmbH 2022 33 The Working Cycle Check What Was Changed via TortoiseSVN ? Check what has changed in the WC via TortoiseSVN: ? Context Menu Diff Subtrain SVN Admin Training 169。 Polarion Software GmbH 2022 34 The Working Cycle Warning WARNING ? Never move, delete, copy files or create directories without the Subversion mands: ? svn move ? svn delete ? svn copy ? svn mkdir ? Easy if using TortoiseSVN as it is integrated directly in Windows Explorer Subtrain SVN Admin Training 169。 Polarion Software GmbH 2022 35 The Working Cycle Pristine Copy ? How does the revert operation work? ? Subversion holds a plete ―pristine‖ copy of the checked out working copy in its ―.svn‖ directory structure. ? Every operation can be rolled back: ? add ? remove ? copy ? delete ? mkdir ? … ? But only as long as it is unmitted. Team Work I Multiple Working Copies Managing Conflicts Subtrain SVN Admin Training 169。 Polarion Software GmbH 2022 37 Team Work I Multiple Working Copies ? Team work means several people work on the same project. ? Each team member will have to change either source code or documentation etc. ? Each team member has to check out the plete project or parts of it. Subtrain SVN Admin Training 169。 Polarion Software GmbH 2022 38 Team Work I Multiple Working Copies ? Check out the actual state of the project from the repository. (WC working copy) Subtrain SVN Admin Training 169。 Polarion Software GmbH 2022 39 Team Work I Conflicts ? Sally and Harry check out the same project from the repository. Harry Sally checkout p1 checkout p1 Subtrain SVN Admin Training 169。 Polarion Software GmbH 2022 40 Team Work I Conflicts ? Sally and Harry check out the same project from the repository. Subtrain SVN Admin Training 169。 Polarion Software GmbH 2022 41 Team Work I Conflicts ? Both begin to edit the same file in their copies and their changes overlap. Harry Sally Subtrain SVN Admin Training 169。 Polarion Software GmbH 2022 42 Team Work I Conflicts ? Sally changes the README file. Subtrain SVN Admin Training 169。 Polarion Software GmbH 2022 43 Team Work I Conflicts ? Sally mits her work first. Harry Sally mit Subtrain SVN Admin Training 169。 Polarion Software GmbH 2022 44 3 Team work I Conflicts ? Sally mit‘s her changes first. Subtrain SVN Admin Training 169。 Polarion Software GmbH 2022 45 3 Team work I Conflicts ? Harry has changed the README file as well. Subtrain SVN Admin Training 169。 Polarion Software GmbH 2022 46 Team Work I Conflicts ? Harry tries to mit his work after Sally. Commit will show a message: ?Out of date...― Harry Sally Subtrain SVN Admin Training 169。 Polarion Software GmbH 2022 47 Team Work I Conflicts ? Harry tries to mit his changes too: Subtrain SVN Admin Training 169。 Polarion Software GmbH 2022 48 Team Work I Conflicts ? Harry has to update his local working copy to get Sally?s changes. Import the changes from the Repository into the local WC using svn update mand。 the overlapping file will be flagged as conflict. C Harry Sally Subtrain SVN Admin Training 169。 Polarion Software GmbH 2022 49 Team Work I Conflicts ? Harry updates his WC: Subtrain SVN Admin Training 169。 Polarion Software GmbH 2022 50 Team Work I Conflicts ? U: File was Updated (received changes from the server). ? A: File or directory was Added to your working copy. ? D: File or directory was Deleted from your working copy. ? R: File or directory was Replaced in your working copy。 that is, file was deleted and a new item with the same name was added. While they may have the same name, the repository considers them to be distinct objects with distinct histories. ? G: File received new changes from the repository, but your local copy of the file contained your modifications. Either the changes did not intersect, or the changes were exactly the same as your local modifications, so Subversion has successfully merGed the repository39。s changes into the file without a problem. ? C: File received Conflicting changes from the server. The changes from the server directly overlap your own changes to the file. No need to panic, though. This overlap needs to be resolved by a human (you)。 Subtrain SVN Admin Training 169。 Polarion Software GmbH 2022 51 Team Work I Conflicts ? How to solve a conflict? ? No tool is able to handle the conflict. ? Only humans are capable of understanding and making the necessary intelligent choices. ? The two members (in the example) have to discuss the conflict as well as possible solutions. Subtrain SVN Admin Training 169。 Polarion Software GmbH 2022 52 Team Work I Conflicts ? How does Subversion support you? ? Subversion outputs a C during the update and remembers that the file is in a state of conflict. ? If Subversion considers the file to be of a mergeable type, it places conflict markers ?― or ?― —special strings of text which delimit the ―sides‖ of the conflict—into the file to demonstrate visibly the overlapping areas (Subversion uses the svn:mimetype property to decide if a file is capable of contextual, linebased merging). Subtrain SVN Admin Training 169。 Polarion Software GmbH 2022 53 Team Work I Conflicts ? The contents of the file with a conflict: Subtrain SVN Admin Training 169。 Polarion Software GmbH 2022 54 Team Work I Conflicts ? The contents of the conflict support files: Subtrain SVN Admin Training 169。 Polarion Software GmbH 2022 55 Team Work I Conflicts ? How does Subversion support you? ? For every conflicted file Subversion places up to three extra unversioned files in your working copy: 1. – This is your file as it existed in your working copy before you updated your working