<?xml version="1.0" encoding="$encoding" ?>
<!-- 
/*
 * Copyright 2001-2004 The Apache Software Foundation.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
 -->

<document>
  
  
  <properties>
    <title>CVS</title>
  </properties>

  <body>
    #set ($repository = $project.repository)
    
    #if (!$repository)
      <section name="Repository">
        <p>
          No SCM repository is defined.
        </p>
      </section>
    #else
    
      #set ($url = $escape.getText($repository.url))
  
      #if ($repository.url && $repository.url != '')
      <section name="Web Access">
        <p>
          <a href="$url">$url</a>
        </p>
      </section>
      #end
    
      #if ($repository.connection && $repository.connection != '')
        #set ($connscm = $repository.getScmType())
        #if ($connscm == 'cvs')
        #set ($conn = $repository.getCvsRoot($repository.connection, ''))
        #set ($module = $repository.getCvsModule($repository.connection))
      <section name="Anonymous CVS Access">
        <p>
          This project's CVS repository can be checked out through anonymous (pserver)
          CVS with the following instruction set.
          When prompted for a password for anonymous, simply press the Enter key.
        </p>
      
        <p>
          cvs -d $conn login
          <br/>
          cvs -z3 -d $conn co $module
        </p>

        <p>
          Updates from within the module's directory do not need the -d parameter.
        </p>
      </section>
        #end
      #end

      #if ($repository.developerConnection && $repository.developerConnection != '')
        #set ($connscm = $repository.getScmType())
        #if ($connscm == 'cvs')

        #set ($conn = $repository.getCvsRoot($repository.developerConnection, 'username'))
        #set ($module = $repository.getCvsModule($repository.developerConnection))
        #set ($server = $repository.getCvsServer($repository.developerConnection))
  
      <section name="Developer CVS Access via SSH">

        <p>
          Only project developers can access the CVS tree via this method.
          SSH1 must be installed on your client machine. Substitute   
          <b>name</b> with the proper value. Enter your site password when prompted.
        </p>

        <p>
          export CVS_RSH=ssh
          <br/>
          cvs -z3 -d $conn co $module
        </p>
      
        <p>
          Remember to replace 'username' with your actual username on $server.
        </p>

      </section>
        #end
      #end

      #if ($repository.url && $repository.url != '')
        #set ($connscm = $repository.getScmType())
        #if ($connscm == 'cvs')
          <section name="CVS Access behind a firewall">
 
            <p>
              For those developers who are stuck behind a corporate
              firewall, <a href="http://cvsgrab.sourceforge.net/">CVSGrab</a>
              can use the viewcvs web interface to checkout the source code.
            </p>

          </section>
        #end
      #end

    #end
  </body>

</document>

