| | 1 | = SVN Conflicts Activity = |
| | 2 | ''This lab will require about 15 minutes to complete.'' |
| | 3 | |
| | 4 | This activity is carried out in pairs. Select a partner and find a lab where you can work at adjacent workstations. You may use whichever Subversion client you wish. You should look at each other's monitor to observe the effect of the commands |
| | 5 | |
| | 6 | You will be using the SVNtutorial branch of the repository you created in previous exercises. |
| | 7 | |
| | 8 | || Step || Developer X || Developer Y || |
| | 9 | || ---- || ------------------------------------------------------------ || ----------------------------------------------------------- || |
| | 10 | || 1 || In the SVNtutorial folder use a text editor to create a new file named ''song`XXYY`.txt'' where ` XX ` is the first developer's initials and ` YY ` is the second developer's initials. Copy and paste these four lines into the file: [[BR]][[BR]]`Row, row, row your boat, Gently down the stream,Merrily, merrily, merrily, merrily,Life is but a dream. `[[BR]][[BR]]Save the file. || || |
| | 11 | || 2 || Use the Subversion status command to verify the file's status is "unversioned". || || |
| | 12 | || 3 || Use the subversion add command to place the file under subversion control. || || |
| | 13 | || 4 || Commit the file with an appropriate log message. || || |
| | 14 | || 5 || || Verify the SVNtutorial folder exists. || |
| | 15 | || 6 || || Issue the subversion update command. The song file should appear with developer x's name as author. || |
| | 16 | || 7 || Edit song file and modify line 1: Change "boat" to "raft" || || |
| | 17 | || 8 || Issue the subversion update command. Right-click on the song file and choose "Update". Commit the file with an appropriate log message. || || |
| | 18 | || 9 || || Edit song file and modify line 2: Change "stream" to "river" || |
| | 19 | || 10 || || Issue the subversion update command. Since modifications are on different lines there's no conflict and status still says "modified". || |
| | 20 | || 11 || || View the contents of the file to see "boat" has been changed to "raft" in line 1. || |
| | 21 | || 12 || || Commit the file with an appropriate log message. || |
| | 22 | || 13 || Edit song file and modify line 2: Change "Gently" to "Swiftly" || || |
| | 23 | || 14 || Issue the subversion update command. The status says "conflicted" because both changes are to the same line of the file. || || |
| | 24 | || 15 || If you try to commit the file now, you get an error: `'song.txt' remains in conflict` || || |
| | 25 | || 16 || Edit the file and observe where SVN has flagged the conflict.` Row, row, row your raft, <<<<<<< .mine Swiftly down the stream, ======= Gently down the river, >>>>>>> .r9 Merrily, merrily, merrily, merrily, Life is but a dream.` Modify the file, retaining BOTH "Swiftly" and "river" in line 2. Remove the other comments. Save the file. Right-click on the song file and choose "resolve conflicts". Right-click on the song file and choose "Update". Right-click on the song file and choose "Commit". Enter an appropriate log message. || || |
| | 26 | || 17 || || Issue the subversion update command. || |
| | 27 | || 18 || || View the contents of the file to see the merged contents. || |
| | 28 | || 19 || || Open a terminal window and move to the Sandbox folder. || |
| | 29 | || 20 || || Enter: svn log `songXXYY.txt` Observe the Subversion log entries. || |
| | 30 | || 21 || || If you neglected to enter log messages, return to step 1 and perform the entire activity over, and include log messages. || |
| | 31 | || 22 || || || || || || || |