[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnu-arch-users] CVS interop; latest cscvs; Wiki index-by-applicatio

From: Harald Meland
Subject: Re: [Gnu-arch-users] CVS interop; latest cscvs; Wiki index-by-application?
Date: Wed, 29 Sep 2004 01:44:24 +0200
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

[John Meinel]

> Well, I went for the "CVS tree inside Arch tree" approach, and it
> seems to work pretty well.

Me too; however, the details of the approach I use seem to differ
somewhat from yours.

I use Miles Bader's tla-tools, which among other stuff includes the
script "tla-cvs-sync".

Steps to reproduce:

  1. Prepare CVS for synchronisation with Arch

     If possible, add '.arch-ids' and '.arch-inventory' to the
     repository-global 'cvsignore' file (the one living in the CVSROOT
     module).  Also add '{arch}' to the .cvsignore file in the topmost
     directory of the checked-out CVS tree(s).

     Otherwise, make sure the environment variable CVSIGNORE includes
     '{arch} .arch-ids .arch-inventory' whenever you're running cvs(1)
     in a checked-out tree.

     Additionally, this synchronisation method can attempt using
     cvs2cl(1) to produce sensible patch-log messages; if the CVS
     project you're syncing with already provides a changelog that is
     updated on *every* CVS commit, you can of course use that
     instead.  However, when working off a cvs2cl-produced changelog,
     you probably want to avoid adding that file to CVS (but it must
     be versioned in Arch); hence, either give it a name that is in
     cvs's default ignore list, or add the file name to .cvsignore or

  2. Prepare a directory for gatewaying CVS <-> Arch

       $ mkdir -p /sync/trees/live/here
       $ cd /sync/trees/live/here
       $ cvs -d CVSROOT-SPEC:/path/to/cvsroot co -kk -P CVS-MODULE
       $ cd CVS-MODULE
       $ tla init-tree address@hidden/PROJECT-NAME--cvs--0
     (Optional; I prefer 'tagline' over 'explicit', and want to avoid
      the hassle of changing tagging method later on:
       $ tla id-tagging-method tagline

     Edit {arch}/=tagging-method:
      * Add '\.cvsignore' to the "precious" category
      * (optional, my personal preference again:) Change the
        'untagged-source' directive to 'unrecognized'

     If the project doesn't have an always-updated changelog, produce
     one with cvs2cl:

       $ cvs2cl --revisions --tagdates --show-dead -S --no-wrap \
           -f ChangeLog.CVS -g -q
       $ tla add -i "`uuidgen`" ChangeLog.CVS

     The tla-cvs-sync script will run {arch}/=cvs-sync-make-log, if
     found, to produce Arch patch-log text.  My projects'
     =cvs-sync-make-log looks like this:



# --revisions:  Postfix each changed filename with "(x.yy)", indicating
#               the new revision number of that file.
#     Example:
#        * design/: account_tables.sql (1.1), code_value_tables.sql (1.1),
#          group_tables.sql (1.1), ou_tables.sql (1.1), person_tables.sql
#          (1.1):
# --tagdates:   Make a separate ChangeLog entry indicating the time each
#               new tag was done.
#     Example:
#       2003-06-02 15:37  tag REL_0_0_1
# --show-dead:  Indicate file revisions that correspond to file
#               deletion by appending "[DEAD]" to the revision number.
#     Example:
#        * design/mod_printer_accounting.sql (1.2[DEAD]):
# -S:           Add a blank line between the list of modified files and
#               the corresponding log message.  Without this option,
#               the first line of the log message would appear on the
#               same line as the last line of the file list.
# --no-wrap:    Don't do automatic line-wrapping of the log messages.
# -f ChangeLog.CVS:
#               Write output to "ChangeLog.CVS" rather than the default
#               filename ("ChangeLog").
# -g -q:        Pass the global option "-q" to cvs, i.e. make cvs more
#               less chatty.
CVS2CL_OPTS="--revisions --tagdates --show-dead -S --no-wrap \
  -f `tla tree-root`/ChangeLog.CVS -g -q"
cvs2cl $CVS2CL_OPTS

tla-changelogs-to-log --summary "Update from CVS"

     The brunt of the work is done by tla-changelogs-to-log, which is
     another script from Miles' tla-tools.

     If you (like me) prefers 'tagline', you *might* want to add extra
     rules to {arch}/=tagline-rules; these rules are used by
     'tla-update-ids' (yet another tla-tools script, which is used by
     the tla-cvs-sync script).

     Prior to creating the first Arch version of the tree, make sure
     all files are added:

       $ tla-update-ids

     Finally, import the tree (sans CVS-internal metadata) into Arch:

       $ tla import -S -L 'Import of current CVS repository into Arch'

 3. Perform CVS <-> Arch sync

    Whenever you want to synchronise CVS with Arch, run tla-cvs-sync
    in the tree you created above.

    I use a this wrapper script to run syncs from cron:


set -e


exec >> "$LOG" 2>&1


# Don't add any Arch control files to CVS.
CVSIGNORE='{arch} .arch-ids .arch-inventory ChangeLog.CVS'

echo "`date` ------------------------------------------"
echo '************************************************************************'

     My crontab entries looks like this:

  0 * * * *  $HOME/bin/tla-cvs-sync-wrapper /sync/trees/live/here/CVS-MODULE

> I get a few spurious CVS/Entries changes (the Entries file is
> updated without actually changing any other files), but aside from
> that, it works pretty well.

With the above method, the CVS metadata isn't versioned in Arch;
hence, I get no such conflicts.  I also get patch-log text that
corresponds pretty well with the actual changes in CVS, rather than
the somewhat minimalistic created by your "tla commit -s 'cvs-sync'".

reply via email to

[Prev in Thread] Current Thread [Next in Thread]