added cvs command information

This commit is contained in:
markk 2001-01-05 20:00:17 +00:00
parent 4a38e324bf
commit ff93142d90
1 changed files with 118 additions and 27 deletions

View File

@ -1,7 +1,9 @@
<section id="cvs">
<title> CVS </title>
<para> The LDP is in the process of providing CVS access to
authors. There are a few good reasons for this: </para>
<para>
The LDP is providing CVS access to authors. There are a few
good reasons for this:
</para>
<orderedlist inheritnum="ignore" continuation="restarts">
<listitem>
@ -86,7 +88,7 @@ join '',('.', '/', 0..9, 'A'..'Z', 'a'..'z')[rand 64, rand 64]),\"\n\""</command
<filename moreinfo="none">.cvspass</filename> and you will not
have to use <command moreinfo="none">cvs login</command>
again. Just set the CVSROOT and continue on. You can get the
entire LinuxDoc repository with this command: </para>
entire repository with this command: </para>
<screen>
<prompt>bash$</prompt> <command>cvs get LDP</command>
@ -136,30 +138,119 @@ guide/docbook/YOURGUIDE</command>
</section>
</section>
<section id="updatefiles">
<title> Updating files and CVS </title>
<para> CVS has a special tag, <emphasis>$Id&dollar;</emphasis>, that you
can use to automatically insert the date and version directly
into the document. After committing, CVS will turn this tag into
<emphasis>$Id$
</emphasis>. By including this tag in your document, you
can have that automatically change each time you change the
file, allowing the revision mark to increment each time. </para>
<para> When you're ready to upload changes to the CVS server,
use the command <command moreinfo="none">cvs ci -m
&quot;comment&quot; YOUR-HOWTO.sgml</command>. The -m
&quot;comment&quot; isn't necessary, but if you don't include
it, you'll be brought into the editor (usually vi, or whatever
your <envar>EDITOR</envar> environment variable is) and be given
the chance to add a comment about the changes. </para>
<para> You can follow more of the CVS discussion on the
ldp-discuss list. </para>
<para>If you are using the LDP CVS tree while developing your
document, the LDP will need to be notified when your
document is ready to be published. E-mail should be sent to
<email>ldp-submit@lists.linuxdoc.org</email>. Indicate
the title of your document and the relative path to the
file(s) in the LDP CVS tree within your message. </para>
<section id="commoncvscommands">
<title>Common CVS Commands</title>
<section id="updatingcvs">
<title>Updating files and CVS </title>
<para> CVS has a special tag, <emphasis>$Id&dollar;</emphasis>, that you
can use to automatically insert the date and version directly
into the document. After committing, CVS will turn this tag into
<emphasis>$Id$
</emphasis>. By including this tag in your document, you
can have that automatically change each time you change the
file, allowing the revision mark to increment each time. </para>
<para> When you're ready to upload changes to the CVS server,
use the command <command moreinfo="none">cvs ci -m
&quot;comment&quot; YOUR-HOWTO.sgml</command>. The -m
&quot;comment&quot; isn't necessary, but if you don't include
it, you'll be brought into the editor (usually vi, or whatever
your <envar>EDITOR</envar> environment variable is) and be given
the chance to add a comment about the changes. </para>
<para> You can follow more of the CVS discussion on the
discuss list. </para>
<para>If you are using the LDP CVS tree while developing your
document, the LDP will need to be notified when your
document is ready to be published. E-mail should be sent to
<email>submit@linuxdoc.org</email>. Indicate
the title of your document and the relative path to the
file(s) in the LDP CVS tree within your message. </para>
</section>
<section id="addnewcvs">
<title>Adding new files</title>
<para>
If your document contains graphics or multiple files, you
may come to a point where you need to add new files to
your cvs repository.
</para>
<para>
To do this, make sure that your HOWTO is in its own directory.
You may want to coordinate with the people at
<email>submit@linuxdoc.org</email> to ensure you can
add graphics or other files to your HOWTO.
</para>
<para>
Once this is set up, use <command>cvs get</command> to get
the latest copy of your HOWTO. In most cases, the command
will be similar to <command>cvs get LDP/howto/docbook/YOUR-HOWTO/</command>
assuming that your CVSROOT is set.
</para>
<para>
Copy in the files that you want to add to the repository.
The command <command>cvs add <replaceable>filename</replaceable></command>
will tell the CVS server that you want to add
<replaceable>filename</replaceable> to the repository.
You can now use <command>cvs commit</command> to commit
the changes to the CVS server. When finished, the files
are now part of the repository.
</para>
</section>
<section id="tagrelease">
<title>Creating Tag Releases</title>
<para>
Occationally, you may want to create what you call a stable
release. This is an effective way to signal to the
LDP coordinator that your document is ready for release.
This tag release specifies a specific version of your
HOWTO. This allows you to continue creating new versions
of your HOWTO without them being accidentally put
on the web site.
</para>
<para>
The downside of creating a stable (or tag) release is that
it uses the current version of the files - the last
ones submitted. Use <command>cvs commit</command> to
make sure that your files are synced up, then use
<command>cvs -q tag <replaceable>Release-x_y</replaceable></command>.
</para>
<para>
You can replace the <replaceable>Release-x_y</replaceable> with
whatever you like. However, to create a wall between CVS revisions
and tag releases, the tag release nust start with a letter
and contain letters, numbers, hyphens, or underscores.
</para>
</section>
<section id="recovery">
<title>Recovering old versions</title>
<para>
There you are, typing away, when you screw up. Real bad.
Doesn't matter what it is, but suffice to say that you've
toasted not only the version on your local drive, but
created a new version on the CVS server. What you need
to do is go back in time and resurrect and older
version of your file.
</para>
<para>
To do this, you'll need to know the version number of the
file you want to retrieve. <command>cvs diff</command>
will give a list of revisions if there are differences. You
can pick the revision number, subtract one, and that is
probably the revision you want to look at.
</para>
<para>
The command <command>cvs -Q update -p -r <replaceable>revision</replaceable></command>
<replaceable>filename</replaceable> will output to stdout
the contents of the <replaceable>revision</replaceable> version
of <replaceable>filename</replaceable>. You can pipe it to
<command>more</command> or redirect the output to a file.
Conveniently, you can redirect stdout to a file called
<replaceable>filename</replaceable>. Your local file
is now the revision you want, and <command>cvs update
</command> will update the CVS server with the new (old)
version of <replaceable>filename</replaceable>.
</para>
</section>
</section>
</section>