HOW-TO: Using WinCVS over SSH on Windows

2011-11-22  张林 

HOW-TO: Using WinCVS over SSH on Windows
http://www.hccp.org/wincvs-ssh-how-to.html#wincvs2

This is a detailed HOW-TO on using WinCVS over SSH. It is based on configuration information originally provided by SimonLei on the IntelliJ Community Wiki, where alternate strategies for enabling CVS over SSH, and in particularwith IntelliJ IDEA, can be found.

Download and Install WinCvs
  1. Download WinCVS 1.3 (or higher):
  2. After installation, make sure that cvs.exe is in your path:

Download and Install PuTTY
  1. Download PuTTY:
  2. After installation, make sure that plink.exe is in your path:

Create a BAT file to invoke plink.exe:
  1. Save the following BAT script: @echo off set CMD_LINE_ARGS= :setArgs if ""%1""=="""" goto doneSetArgs set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1 shift goto setArgs :doneSetArgs plink.exe -ssh -pw your-password-goes-here %CMD_LINE_ARGS%
  2. Be sure to enter your password into the line that invokes plink.exe

  3. Set the environment property CVS_RSH to the above BAT file:

Configure WinCVS:
  1. Open the Preferences panel from the Admin menu:



  2. In the General tab, select the ssh option from the Authentication dropdown, then click on the Settings button to the right of the drop-down:



  3. In the SSH Options dialog, enter the path to the bat script created in previous steps:



  4. Back on the General tab, enter CVS server access information (CVSROOT, login, etc.):



  5. You are now ready to start accessing the CVS repository. To check out a module into the current working directory, select the Command Line option from the Admin menu:



  6. You can now enter the cvs command for checking out a module (cvs checkout module/path/relative/to/CVSROOT), just you would from a shell command line environment:



  7. Clicking OK will now download the current version of the module from the CVS repository to the current WinCVS working directory. You will now be able to edit, add, and commit elements to the CVS repository from the local working directory:



Adding a file to the repository:
  1. To add a file, first copy the file, using the normal Windows Explorer, to the checked out module directories. After copying the file, it should appear in the WinCVS browser as an editable, non-cvs file. Clicking on the Add icon, located in the WinCVS toolbar, will then perform the initial add operation:



    It is important to note that there are different Add buttons for binary and text files!

  2. The next step, after adding the element, is to commit the file. Until this operation takes place, the file will have no version information associated with it. To commit, click on the Commit icon:



    You will be prompted for a comment:



    The file is now checked in:



    For more information on developing with CVS, visit
    http://www.cvshome.org/

399°/3994 人阅读/0 条评论 发表评论

登录 后发表评论