Changes between Version 1 and Version 2 of CaffeinatedSubversion


Ignore:
Timestamp:
01/18/11 12:25:12 (13 years ago)
Author:
jdreed
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • CaffeinatedSubversion

    v1 v2  
    11This page is intended to explain enough about Subversion to work with the Debathena repository.  For more information on Subversion, see O'Reillys "Version Control with Subversion", available at [http://svnbook.red-bean.com/], or though the MIT Libraries' subscription to [http://libraries.mit.edu/get/safari Safari (Touchstone authentication required)] 
    22 
    3 ==Getting started== 
     3== Getting started == 
    44 
    55Normally, you would use the Subversion URL `svn+ssh://svn.mit.edu/athena/trunk` to work with Subversion.  However, this requires write access to the repository.  If you don't have write access, you'll only be able to check out the code, not commit anything, and you'd use the URL `svn://debathena.mit.edu/athena/trunk` instead. 
     
    77Changes in subversion are identified with revision numbers (e.g. r12345).  This revision number applies to the entire repository, even though the actual change likely only affected a few files. 
    88 
    9 ==Initial checkout== 
     9== Initial checkout == 
    1010 
    1111Identify a location in your filesystem for your working copy of the source, and change to that directory.  Then, checkout the source with the following command: 
     
    1414This will create a directory called `athena` in the current directory, with the Athena source tree inside that directory.  That directory is called a *working copy*.   
    1515 
    16 ==Getting an update from the server== 
     16== Getting an update from the server == 
    1717 
    1818Before making changes, you'll want to ensure you have the latest copy of the code.  `svn update` will get you the latest copy of the code.   
     
    2727In this example, foo.c is a new file, bar.c was changed ("updated"), and baz.c was deleted.  It's possible you'll encounter conflicts at some point, but that will be covered later. 
    2828 
    29 ==Making changes== 
     29== Making changes == 
    3030 
    3131Most text editors are aware of when you're editing files inside a working copy.  Emacs, for example, won't create "twiddle files" (`filename~`) because it assumes Subversion will keep track of your changes. 
    3232 
    33 ===Adding or removing files=== 
     33=== Adding or removing files === 
    3434 
    3535If you create new files or directories, you'll need to ensure Subversion is aware of them.  You can wait until just prior to the commit to do this, or you can do it as you go.   To add files or directories use `svn add`: 
     
    4545`svn del subdir` 
    4646 
    47 ==Reviewing your changes== 
     47== Reviewing your changes == 
    4848 
    4949To view information about what files have been changed, use `svn status`.  By default, it will display status on the current location in the repository, or you can specify a directory or file, or with no arguments 
     
    6262In this example, bar.c has been changed and will be committed.  foo.c is a new file, which has been added with `svn add`, and quux.c has been deleted with `svn del`.  The directory `subdir` exists in the filesystem, but is not under version control.  If it's part of the package, you'll need to add it with `svn add`.  The file `baz.c` should exist, but doesn't.  If you delete a file with `rm`, you'll also need to `svn del` the file so Subversion knows it's gone.   Additional information about the output format of `svn status` is available in the documentation, or with `svn help status`. 
    6363 
    64 ===Diffs=== 
     64=== Diffs === 
    6565 
    6666If you want actual diffs, you can use the `svn diff` command.  Like `svn status`, it can take optional file specifiers, or display all diffs. 
    6767 
    68 ==Reverting changes== 
     68== Reverting changes == 
    6969 
    7070If you realize that you didn't want to make changes, you can revert a file's changes.  Without any arguments, `svn revert` will revert your entire working copy, and won't ask for confirmation, so use it with care. 
     
    7272`svn revert foo.c` 
    7373 
    74 ==Committing your Changes== 
     74== Committing your Changes == 
    7575 
    7676Before committing, make sure your working copy is up to date with `svn update`. 
     
    8585^(That's two single-quotes, i.e. an empty string)^ 
    8686 
    87 ===Reverting a commit=== 
     87=== Reverting a commit === 
    8888 
    8989If you want to revert a commit that you've already made, you can't use `svn revert`.  Instead, you need to merge the changes back in to the current working copy, and then re-commit it.