Changes between Version 9 and Version 10 of Obsolete/Development/Templates/RepUpdate


Ignore:
Timestamp:
Sep 16, 2009, 4:09:09 PM (15 years ago)
Author:
/O=GRID-FR/C=FR/O=CNRS/OU=LAL/CN=Michel Jouvin
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Obsolete/Development/Templates/RepUpdate

    v9 v10  
    1212== Merging change from a production SCDB ==
    1313
    14 It is quite important not to break the history when a template is moved from one location to another or removed. And the trunk is not a direct copy of a real repository. To help updating the trunk from a real Quattor configuration database, you should use [source:templates/trunk/tools/directory-sync directory-sync] tool. '''This tool must be run from a local workspace of QWG [source:templates/trunk repository trunk]'''. This tool updates a trunk directory with the contents of a specified source, doing the following :
     14To help updating the trunk from a real Quattor configuration database (or vice versa), you should use [source:templates/trunk/tools/directory-sync directory-sync] tool. '''This tool must be run from a SVN working copy''' (for example, a local working copy of QWG [source:templates/trunk repository trunk]). This is very critical as the tool will '''delete everything''' from the directory to synchronize and rely on SVN for being able to revert the deletion.
     15
     16This tool updates a directory with the contents of a reference source, doing the following :
    1517 * For each directory existing both in QWG repository and in source tree :
    1618   * Removes all `.tpl` files from the destination directory (the directory to update).
     
    2022 * Show the differences with `svn status`
    2123
     24It accepts 2 parameters:
     25 1. directory to synchronize: '''must be''' a relative path specification.
     26 1. reference directory parent: the parent path where a directory with the '''same relative name''' is located and must be used as a reference source.
     27
     28''Note: because the second argument is not the source directory itself but a parent for a directory with the same relative name as the first parameter, when synchronizing a real configuration database with a QWG branch or trunk you must run this tool from `cfg` directory or one of its subdirectories.''
     29
     30It is quite important not to break the history when a template is moved from one location to another one. [source:templates/trunk/tools/directory-sync directory-sync] is not able to detect the move: it removes the original one and add the new one. If possible try to run manually a `svn mv` to keep track of the move.
     31
    2232To process a directory hierarchy, [source:templates/trunk/tools/directory-sync directory-sync]  must called from `find` command. Look at the [source:templates/trunk/tools/directory-sync comments] at the beginning of the script for the exact syntax. Here is an example, assuming your are at the top of QWG templates and your source tree is `/tmp/scdb` (last parameter of the command must be a directory containing the directories given to `find` that need to be relative) :
    2333{{{
     
    2535}}}
    2636
     37If you would like to do the opposite synchronization, to incorporate the QWG changes into your local database, assuming you have an up-to-date working copy of QWG templates in /tmp/qwg, you may use the following command from `/tmp/scdb/cfg`:
     38
    2739As you run this tool from a SVN workspace, you always have the opportunity to do a `svn revert` in case things went wrong...
     40{{{
     41find grid os standard -type d -not -path '*.svn*' -exec tools/directory-sync {} /tmp/qwg \;
     42}}}
     43
     44If you want to synchronize only `grid/glite-3.2` you could pass this directory as find first parameter and keep `/tmp/qwg`as the last `directory-sync` parameter, as the reference directory path will be built by merging both (`/tmp/qwq/grid.glite-3.2`).
    2845
    2946You need to fix manually the unexpected differences. Unexpected differences are all the templates that existed in the repository but no longer exist in the local workspace or all the templates copied from the source but not registered in the repository. There are 3 situations :