Wherever there is a conflict, Subversion inserts the line >. This is the file as it was in Dracula's working copy before he did the Subversion update.įinally, Subversion modifies the file in question, moons.txt, to show Dracula's changes and the changes from the repository side by side. This is the most up-to-date revision from the repository that includes Wolfman's changes. It is the file as it was in Dracula's local copy before he started making changes, i.e., the starting point for his work. When it detects the conflict, Subversion creates three temporary files to help Dracula resolve it. ![]() Wolfman opens moons.txt…Īt the same time, Dracula opens the file (which is already out of date compared to the master copy)… ![]() Once he is done, Subversion will let him commit to create Revision 12. There is an actual conflict in the file.ĭracula has to edit his copy of the file to resolve the conflict: Name Orbital Radius Orbital Period Mass Radius This time, though, when Dracula does an update, he doesn't just get the two lines Wolfman added to create Revision 10. Once again, when Dracula tries to do a commit… He also inserts a line at the top of the file, but not the same one as Wolfman: Name Orbital Radius Orbital Period Mass Radius While he is doing this, though, Dracula starts editing his copy. For once, Wolfman is quicker off the mark he adds a line to the file… Name Orbital Radius Orbital Period Mass Radius At this point, they both decide to add measurement units to the columns in moons.txt. Wolfman's working copy is now in sync with the master at Revision 10, but Dracula's is one behind at Revision 9. He can now go ahead and commit his changes to create Revision 10. Since it merged Dracula's changes automatically, all Wolfman sees is the lines he added. He adds two lines to the bottom of the file…Įverything is OK until he clicks the "Commit button", when Subversion tells him that his commit failed because his starting point is out of date.Īfter doing an update, he asks SmartSVN to display the differences between his copy and the master. His edits are based on Revision 8, because he hasn't done an update to get Revision 9 yet. …he clicks "Commit" and voila-the repository is at Revision 9. …and then tells SmartSVN to commit his change.Īfter entering a comment to describe his work… Wolfman's changes are still in his working copy, and only in his working copy.īut since those changes now reflect the most recent revision in the repository, he can go ahead and commit them. This does not mean that Wolfman's changes have been committed to the repository-Subversion only does that when it's ordered to. Luckily, Dracula edited a line that Wolfman didn't change, so Subversion can merge the differences automatically. Wolfman has to update his working copy to get Dracula's changes before he can commit. ![]() Wolfman's changes were based on revision 8 of the file, but the repository is now at revision 9. Name Orbital Radius Orbital Period Mass RadiusĪ few minutes after Dracula's commit, Wolfman tries to commit his changes to the repository.īut Subversion won't let him. This is probably the most important episode of this lecture, which is in turn one of the most important in this course, so we'll give you a quick preview of what we're going to do, then go through those steps using SmartSVN.Īt the end of our previous episode, Dracula and Wolfman had both synchronized their working copies of the monsters repository with the master, so that all three are at Revision 8.ĭracula edits his copy to change Amalthea's radius from a single number to a triple to reflect its irregular shape: Name Orbital Radius Orbital Period Mass RadiusĪmalthea 181.4 0.498179 0.075 131 x 73 x 67ĭracula commits first, creating Revision 9 of moons.txt in the repository.Īs he's doing this, Wolfman is editing his copy to add information about two other minor moons, Himalia and Elara. In this episode, we will show you what to do when your changes overlap with someone else's. ![]() Hello, and welcome to the third episode of the Software Carpentry lecture on version control.
0 Comments
Leave a Reply. |