Question
I seek advice on how to set up the directory tree
of TWiki so as to make it easiest to use CVS.
TWiki's default directory tree,
containing the "special" twiki/data
and twiki/pub directories,
is awkward to CVS.
Alternatively, this may be seen as a suggestion
that the default structure be made more CVSable.
More generically, that twiki do a better job
of separating highly variable stuff
(the sort of thing Sun puts in /var)
from less changeable stuff.
Note: this is separate from the issue of whether TWiki
should use CVS for the topic pages.
That would make things easier, but nnot solve the problem
In the background section below
I attach parts of a page from my local installation describing some such issues.
Environment
| TWiki version: |
|
| TWiki plugins: |
|
| Server OS: |
|
| Web server: |
|
| Perl version: |
|
| Client OS: |
|
| Web Browser: |
|
--
AndyGlew - 20 Aug 2003
Background: CVSing Local TWiiki Installation
Since I (
AndyGlew) am anal retentive,
I version control everything.
In particular, I am CVS'ing the local installation of TWiki
that I have made at my company.
This has some special considerations,
in part because TWiki uses
RCS files,
and because the twiki/data and twiki/pub
directories need to be exposed to the web
in different ways, whereas the rest of the
twiki installation does not.
Reconciling TWiki's RCS with Installation CVS
This is slightly wierd, because TWiki version controls its wiki pages using
RCS.
Checking these files into CVS results in *,v,v files in the CVS repository.
(I used -I! to do the original CVS import.)
To my surprise, this doesn't seem to be causing too many problems.
Note: TWiki uses
RCS for the twiki/data directories
(and maybe the twiki/pub attachments).
Of course, the TWiki source itself is version controlled using CVS.
Also, all local installation scripts, etc, are CVS'ed.
Towards TWiki CVS
In my dreams, I would like to move towards having TWiki version control its files
using CVS, not
RCS.
There has been discussion at twiki.org about doing this,
but nothing is available yet.
Other wikis have been CVS based, but none as fully featured as CVS.
Why? Well, I'd like to use one version control system for the entire project.
Also, I
hope that important data will get placed under TWiki,
and I just plain always version control important data.
Other special considerations for CVSing
(1) cvs is good. I cvs my twiki installation
(2) but, the twiki/data area for twiki pages,
and the twiki/pub area where attachments are stored,
are "special", in the annoying sense.
a) the twiki/data/Webs use
RCS files.
I have checked the
RCS ,v files into CVS
with no apparent ill effects, but it is still
a worry
b) both the twiki/data and the twiki/pub
areas have special requirements for file permissions,
that CVS does not maintain. After CVS'ing them,
I typically need to rsh to a machine that I can run
sudo on and change the ownerships and groups.
Not doing this causes an annoying problem whereby edits
are lost the first time the file is editted after
a cvs checkout.
c) the twiki/pub area needs to be in an htdoc area
so that stuff can be accessed by the apache webserver
- gifs, attachments, etc. (As installed by me, twiki/pub
is a symlink to /proj/wiki/www to a directory mapped
by the Apache webserver.)
d) the twiki/data and twiki/pub areas change frequently,
since this is where users post wiiki pages and attachments.
I do not need to check in all such changes.
However, I do need to check in some changes, such as
particular 'system admin" type changes. And I prefer to
use my one true version control tool, CVS, to do so.
So, I am in a quandary. I sometimes want to cvs twiki/data
and twiki/pub, but not always; and the special considerations
make cvs more awkward to use.
I was hoping that I could make recursively traversing into
these areas not the default, but I cannot see how to
do so. CVS traverses symlinks.
I may, later, set the dataDir variable in TWiki.pm,
which may at least allow me to separate the twiki/data
and twiki/pub not to be subtrees of the standard twiki
installation. Then I can type cvs to the standard twiki
isntallation, and expect it to work.
(I'm putting that off pending some refactorings that
should minimize the number of places that know the tree
structure.)
Overall, however, you must take care with CVS commands.
As of 20 Aug 2003, my local tree looks like
twiki-stuff
install - local, conventionally CVS'ed
wrappers - local, conventionally CVS'ed
twiki - standard
bin - conventionally CVS'ed
lib - conventionally CVS'ed
data - "special", awkward to CVS
pub - some "special", awkward to CVS, some ordinary
- symlinked elsewhere
Basically, you should use regular CVS commands,
especially not cvs ci,
in any parent of the special directories twiki/data
and twiki/pub,
because it might cause permissions problems.
AndyGlew
Answer
I am not an expert. I just wonder, why you use another CVS for
/data and
/pub - it's already in
RCS, right?
DataAndCodeSeparation talks about different approach - have no idea if it is something relevant to what you need.
--
PeterMasiar - 21 Aug 2003