You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

As of February 10 2010 the Petacache code has resided in a Subversion repository accessible from Lab 1 at

/reg/g/npa/svnrepo

Unlike a CVS repository you can't just cd to that directory and expect to see a meaningful repository structure; the actual files are entered into a small database only the container files of which are visible.

Each commit operation creates a new revision of the entire repository which is assigned a number. It doesn't matter how many files are affected by the commit. Moves, deletions and renames also create new revisions.

Each project is a top-level name in the repository and has three "subdirectories" under it: trunk, branches and tags. Ordinary development occurs under trunk. A branch or a tag is defined by copying a trunk revision (normally the latest) to a named subdirectory under branches or tags.

svn copy file:///reg/g/npa/svnrepo/foo/trunk file:///reg/g/npa/svnrepo/foo/tags/V01-20-04

svn copy file:///reg/g/npa/svnrepo/foo/trunk file:///reg/g/npa/svnrepo/foo/branches/experimental5

As you can see Subversion doesn't really know what branches and tags are. The division into trunk, branches and tags is a common developer convention. It's possible to check out a branch or a tag, make changes and commit just as for the trunk. Committing to tags should be done only to add required bug fixes to previously released software. Branches should be treated as fully independent lines of development which are eventually either abandoned or merged back into the trunk.

Subversion copies are "smart" in the sense that they produce references back to the original; only subsequent changes made to a copy get stored there. A copy in effect produces a snapshot of the original source tree which is unaffected by subsequent changes to the original.

To check out code in the usual arrangment

cd work
svn checkout file:///reg/g/npa/svnrepo/release/trunk release
cd release
svn checkout file:///reg/g/npa/svnrepo/release/rce/trunk rce
svn checkout file:///reg/g/npa/svnrepo/release/rceapp/trunk rceapp
svn checkout file:///reg/g/npa/svnrepo/release/rceusr/trunk rceusr
svn checkout file:///reg/g/npa/svnrepo/release/quarks/trunk quarks
svn checkout file:///reg/g/npa/svnrepo/release/sofi/trunk sofi
svn checkout file:///reg/g/npa/svnrepo/release/petacache/trunk petacache

To check out release Vxx-yy-xx substitute tags/Vxx-yy-xx for trunk.

Subversion can set so-called attributes of files such as whether to expand keywords such as $Author$ or whether to convert endline characters to native format in check-out files. Normally you want both of those inhibited for binary files. Luckily it's possible to give Subversion a configuration file enabling it to do a good job telling whether a new file is binary or not. Attached to this page is a file that you should place in ~/.subversion/config.

  • No labels