How to stay friends with SVN in the Ganga project

Here is the reading: http://svnbook.red-bean.com

Access

Command line:

export SVNURL=svn+ssh://svn.cern.ch/reps/ganga

Web access: http://svnweb.cern.ch/world/wsvn/ganga

The layout of Ganga SVN repository

  • /branches : freely accessible, all CVS branches are here
  • /tags/private : freely accessible (read/write/delete)
  • /tags/packages : you may only add tags here, no delete/modify/commit
  • /tags/Ganga-X-Y-Z: release tags, writable by the release manager only
  • /trunk : same access permissions as for CVS HEAD

That is to say that you can only commit to trunk in the packages that you have access to, and in the branches (anywhere). You cannot commit in tags directory.

Checkout from trunk

svn co $SVNURL/trunk/ganga

Get information about your working copy

  • svn info
  • svn status
  • svn status -uv

List available tags

  • svn ls  $SVNURL/tags/packages : all package tags
  • svn ls  $SVNURL/tags : all release tags

Example: svn ls  $SVNURL/tags/packages | grep Ganga-Base

Commit/tag

If you can't remember your TAG-X-Y name or PKG_PATH, look them up on the Ganga tags page. Note for newcomers: the submitted tag version displayed on the tags page needs to be incremented, and that value then used when you run the svn cp command below.

To commit and tag your changes, call:

cd PKG_PATH
svn commit
svn update
svn cp . $SVNURL/tags/packages/TAG-X-Y

If you don't commit then you will create a tag which corresponds to your local working copy and which is not on the trunk (until you commit).

Note: running the update is important. Otherwise you may get errors with svn cp

List modified files between a tag and a trunk

svn diff  $SVNURL/tags/packages/TAG-X-Y $SVNURL/trunk/ganga/PKG_PATH | grep Index:

Example: svn diff  $SVNURL/tags/packages/Ganga-Base-23-16   $SVNURL/trunk/ganga/python/Ganga | grep Index:

List changes between a release tag and what is in the trunk (alternative to the above)

Get the revision number of the release tag: svn info  svn+ssh://svn.cern.ch/reps/ganga/tags/Ganga-5-4-1

Last Changed Rev: 2789

Make a log between HEAD of the TRUNK and release revision:

cd ~/Ganga/install/TRUNK/python/Ganga
svn log -rHEAD:2789

Revert a commit which was made by mistake

Don't panic - just use this to "undo" a commit through reverse merging:

svn merge -r COMMITTED:PREV file

-- JakubMoscicki - 20-Oct-2009

Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r5 - 2011-01-28 - MichaelJohnKenyonExCern
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    ArdaGrid All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2022 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback