-
Notifications
You must be signed in to change notification settings - Fork 6
SvnUpdate
We are keeping the source code for our assignments in the subversion (svn) source control management system. When you click on the "Browse Source" button on the Trac website, it is letting you navigate our subversion repository.
Occasionally we make changes to the assignment source code after the assignment has been passed out. This happened with Homework 2, for example. You can always get the latest version of the code via subversion. To do so, you cd to your homework directory and use the svn update
command to bring your working copy of the homework up-to-date with the repository.
BUT... please make a backup copy of your existing files and read below carefully before you begin!
However, if you've modified the files in your working copy, you are likely to get a "conflict" between your version and the repository's latest version (indicated by a line marked 'C
' during the svn update
.) Information on resolving any conflicts is given in the Subversion Book. Simply put, subversion copies your version of the file to the same directory with the suffix .mine
, and modifies the working copy of the file to contain both your changes and the conflicting changes from the repository. You need to edit (or overwrite) the now-conflicted working copy of the file to resolve any conflicts. To find the the conflict sections, search for <<<<<<<
inside the file.
Example:
rhombus [50] ~/Hw2/MyStuff > svn update
C gistget.c
Updated to revision 53.
rhombus [51] ~/Hw2/MyStuff > ls
README gist_private.h gistget.c.r52 randomboxes
cali.txt gistget.c gistget.c.r53 randomboxes25
geo_ops.c gistget.c.mine install.sh* setup.sql
rhombus [52] ~/Hw2/MyStuff > vi gistget.c
rhombus [53] ~/Hw2/MyStuff > ./install.sh
Here I was able to see that gistget.c had conflicts because of the 'C
' reported for it from svn update
(if it had successfully merged changes from the repository with my changes it would have said 'M
'; if I had not made any changes it would have said 'U
'). I edited gistget.c until I was satisfied. I then used the special Homework2 "install.sh" script to get the all files into the right place in the postgresql directory.