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

New CVS Layout Tips And Techniques

Greetings, Folks!

To make life simpler, we have reorganized the CVS setup for Fedora
Docs.  Previously, there was one big module called "fedora-docs".
You checked that out of CVS and you had the all the documents from
the entire project.  While you could check out just the part you were
interested in, doing so was clumsy.  Adding a new document was
equally awkward.

With the CVS changes now in place, each document forms its own CVS
module and can be checked out individually.  Everything that used to
be in the "fedora-docs/" directory is now a top-level module.  The
"fedora-docs/" directory is no more; it is an ex-directory; it is
pining for the fjords ;-)  Sorry.

1) To see which modules exist (assuming that your $CVSROOT
   environment variable is properly set):

	$ cvs co -c

2) How do you access an existing document?

   First, create a working directory.  A "fedora-docs/" holding 
   directory isn't created automatically as before, so make:
   	a) yourself a playpen; and then
	b) get the overhead doc modules; and then
	c) get or create the document you want.

   Here is how it goes together:

   	$ mkdir my-docs-dir
	$ cd my-docs-dir
	$ cvs co docs-setup
	$ cvs co example-tutorial

   Note that the "docs-setup" actually gets four modules for you:
   "common", "css", "stylesheet-images", and "xsl".  You need these for 
   any document you view or create.

   Since each document you get from CVS can share a single "common/",
   "css/", "stylesheet-images/" and "xsl/" directory, you only need to 
   do this once regardless of how many documents you work on

3) How do I begin a new document?

   Much the same was as you do an existing document.  You still need
   the "docs-setup" checkout, described in the previous section.
   Create a new directory for your new document and away you go.  A
   good technique is to use an existing document as a model:

   	$ mkdir my-new-document-sandbox
   	$ cd my-new-document-sandbox
   	$ cvs co docs-setup
   	$ cvs co -d my-doc example-tutorial
   	$ rm -rf my-doc/CVS

   Be sure to remove the CVS directory from your new document's
   working area ("my-doc/CVS" in our example) because your
   document has not been added to the Fedora CVS system yet.

4) How do I get my document into the Fedora CVS system?

   Sign up for CVS access!

   If you have followed the instructions above, you can add your
   document to the Fedora CVS easily. Rename your working directory,
   just to be safe, import your document into CVS, and the check out
   the "official" verion of your document.

   NOTE: take care that you do not try to import a directory named
         "CVS"!  Your new document should not have *any* CVS
	 directories before your import is finished.

   Continuing our previous example:

	$ mv my-doc my-doc-orig
	$ cd my-doc-orig
	$ cvs import my-doc <my-name> "initial"
	$ cd ..
	$ cvs co my-doc

   Notice that we renamed the working copy to "my-doc-orig", and
   then imported that using the real name of "my-doc": this is
   the actual module name for your document.  Compare its contents with
   that of your original "my-doc-orig" directory to ensure its
   correctness.  Feel free to delete your "my-doc-orig"
   directory whenever you wish or keep it forever - your choice.

   The Fedora CVS administrator will add an entry into the official
   modules listing for you, so you should be see your new document
   in the "cvs co -c" listing very soon.

5) Single-Point Updates

   A document setup consists of two CVS entities: the "docs-setup"
   group and the specific document tree.  For example, checking out
   the example tutorial:

	$ mkdir a-new-world
	$ cd a-new-world
	$ cvs co docs-setup
	$ cvs co example-tutorial

   Now, look at the working directory:

   	$ ls -CF
	common/ css/ example-tutorial/ stylesheet-images/ xsl/

   That makes 5 separate CVS objects to keep updated.  The
   directories created by the docs-setup form the infrastructure used
   by your document.  If you want to keep everything updated, you
   could do this:

	$ cvs update *

   in the "a-new-world/" top-level directory.  You can also update
   your working document from within its directory, as usual:

	$ cd example-tutorial
	$ cvs update

6) I already have documents checked out using the old setup.  Now

   Congratulations on being a current FDP activist!

   You have two choices, depending on your confidence:

   A)  Keep what you have.

       Edit each "CVS/Repository" file in your local hierarchy to
       remove the "fedora-docs/" prefix from the pathname you find
       there.  For example:

	$ cd example-tutorial
	$ cat CVS/Repository
	$ vi CVS/Repository
	$ cat CVS/Repository

  B)  Punt and do a fresh checkout.  Shhh, we won't tell!

Please enjoy your stay here in Fedora Docs CVS land.

Attachment: pgpHxwPamGKGD.pgp
Description: PGP signature

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