Procedure

Please read the whole procedure first to understand what's going on.

Dump SOURCE repository

First you should dump the whole source repository (making of partial dump is NOT possible) using svnadmin dump command.

svnadmin dump PATH_TO_SOURCE_REPO_IN_LOCAL_FS > SOURCE_REPO.dump
where PATH_TO_SOURCE_REPO_IN_LOCAL_FS is:
  • for $SVNOFF/afs/cern.ch/project/svn/reps/atlasoff
  • for $SVNGRP/afs/cern.ch/project/svn/reps/atlasgrp
  • for $SVNUSR/afs/cern.ch/project/svn/reps/atlasusr

Filter it out

cat SOURCE_REPO.dump | svndumpfilter --drop-empty-revs --renumber-revs --skip-missing-merge-sources include SOURCE_FOLDER > SOURCE_FOLDER.dump

Run realloc.py if needed

If svn folder is going to be moved to different location you should reallocate it in SOURCE_FOLDER.dump using realloc.py script which could be downloaded from $SVNUSR/cibak/svnRealoc/realloc.py URL. The usage is very simple, you have to specify two parameters:

  • source directory (as absolute path but WITHOUT leading backslash) as --src option parameter
  • destination directory (as absolute path but WITHOUT leading backslash) as --dest option parameter
cat SOURCE_REPO.dump | realloc.py --src SOURCE_FOLDER --dest DEST_FOLDER > DEST_FOLDER.dump

Load dump to the new location

Load dump to the DESTINATION repository using svnadmin load command:

svnadmin load [--parent PARENT_DIR] PATH_TO_DEST_REPO_IN_LOCAL_FS  < DEST_FOLDER.dump
where PATH_TO_DEST_REPO_IN_LOCAL_FS is one of PATH_TO_SOURCE_REPO_IN_LOCAL_FS of course!

Make sure that PARENT_DIR is created in DESTINATION repository before loading!

Chain it, please!

Dumping SOURCE repo, filtering it out and reallocation could be done in one command:

svnadmin dump PATH_TO_SOURCE_REPO_IN_LOCAL_FS | svndumpfilter --drop-empty-revs --renumber-revs --skip-missing-merge-sources include SOURCE_FOLDER | realloc.py --src SOURCE_FOLDER --dest DEST_FOLDER > DEST_FOLDER.dump

Clean up

Remove svn rights in SOURCE repository for SOURCE_FOLDER and copy them to the DESTINATION repository to DEST_FOLDER. Inform developers that SOURCE_FOLDER has been reallocated to the DESTINATION repository under DEST_FOLDER.

Example

Let's say somebody will ask you for moving $SVNUSR/cibak/devView package to $SVNGRP under /Institutes/AGH-UST. Also somebody will ask you to rename the package from devView to RTTWebPage.

  1. dumping, filtering and reallocationg
    svnadmin dump /afs/cern.ch/project/svn/reps/atlasusr | \
    svndumpfilter --drop-empty-revs --renumber-revs --skip-missing-merge-sources include cibak/devView | \
    realloc.py --src cibak/devView --dest RTTWebPage > rttWebPage.dump
    
  2. creation of destination parent directory (if not there already)
    svn mkdir $SVNGRP/Institutes/AGH-UST -m "top level directory for AGH-UST"
    
  3. loading
    svnadmin load --parent-dir /Institutes/AGH-UST /afs/cern.ch/project/svn/reps/atlasgrp < rttWebPage.dump
    
  4. removing rights and granting them is rather simple, isn't it? wink

      -- KrzysztofCiba - 03-Dec-2009

Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r2 - 2010-02-11 - KrzysztofCiba
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright &© 2008-2024 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