Subversion admin

From Emergent

Jump to: navigation, search

These are operations only to be performed by core developers.

Contents

Creating tags for specific revisions of the code

Tags make important revisions easier to remember and access -- they are basically cheap copies or links of a given revision of the code. A prototypical subversion repo will look like this:

   /project
    /branches
    /tags
    /trunk

Where your code goes in the trunk directory and tags go in the tags directory. Tags are used for each public release, and perhaps prior to other major potentially disruptive changes. Just make a cheap copy of your model and put it in the tags directory. It's called a cheap copy because it's really just a pointer to that revision.

svn copy http://grey.colorado.edu/svn/emergent/emergent/trunk http://grey.colorado.edu/svn/emergent/emergent/tags/4.0.15

(Updated to use http: instead of assuming local files which is no longer valid for most machines, making a tag of the current release, 4.0.15)

Tags of specific revisions

TODO: I don't understand the bit about modifying configure.ac -- isn't this going back in time to grab the -r revision so it won't care what the current file has??

Before you create a tag, make sure to update AC_INIT in configure.ac with the correct version. Then replace REVISION and TAGNAME below. They should be, for example, 1665 and emergent.1b1, respectively.

svn copy -r REVISION file:///usr/local/svn/emergent/emergent/trunk file:///usr/local/svn/emergent/emergent/tags/TAGNAME

How to move a tag

If you need to update a tag to a new revision for bug fixes and the like, just repeat the step above with the new REVISION. Since we are dealing with cheap copies, subversion will only copy over the files that have actually changed between the specified revisions.

How to create a subversion branch

Relevant portion from svnbook: http://svnbook.red-bean.com/en/1.1/svn-book.html#svn-ch-4-sect-2.1

Subversion won't create actual copies of all the files. If you and another person are both making edits to the same file in different branches, then there will be two lines of development for that file.

So, to get started, make a "copy" of head in the branch folder. Give it a descriptive name as well (again, always on lab machine):

svn cp file:///usr/local/svn/emergent/emergent/trunk file:///usr/local/svn/emergent/emergent/branches/NEW_BRANCH

Then switch to the branch copy (presumably in your local already-checked-out svn directory):

svn switch http://grey.colorado.edu/svn/emergent/emergent/branches/NEW_BRANCH

Prove to yourself that you aren't in the main copy by examining the full URL of your current location relative to the repository

  • svn info

Reverting to a previous revision

svn merge -r HEAD:PREV file

Personal tools