[cvsnt] file corruption using CVSNT against non-CVSNT client

Paul Balmforth pab_online at yahoo.com
Thu Aug 17 19:26:03 BST 2006


Community technical support mailing list was retired 2010 and replaced with a professional technical support team. For assistance please contact: Pre-sales Technical support via email to sales@march-hare.com.


Since 2.5.02 (Servalan) Build 2088, I've noticed that the CVSNT server has an incompatability with non-CVSNT clients which causes the corruption of binary files when they are imported.
   
  For a number of years, I've been working for a MNC and developing/maintaining a CVS client for our product. We strive to ensure that it's compatible with the latest CVSNT server in addition to builds of Cyclic CVS. We certify against CVSNT and recommend it to our customers. More often than not minor differences and incompatabilities have been easily addressed, until now.
   
  It seems the CVSNT server no longer defaults the 'kopt' of an imported file to the wrapper definitions, instead relying on the client to pass the correct value in a 'Kopt' request. This is bad news because:
   
  - it places a responsibility on the client to parse and evaluate the wildcards described in cvswrappers (or wrapper options). The new responsibility goes against the original intentions behind the CVS protocol design in that the client should as lightweight as possible.
- though 'Kopt' is a standard CVS protocol request, it would be nice if CVSNT didn't require that the client supported it, like Cyclic.
   
  So anyway, I've reluctantly added filename pattern-matching and a 'Kopt' capability to the CVS client I maintain. As per the protocol specification, the 'Kopt' request is used when there isn't a entry for the file being sent. But alas, there's another problem - the CVSNT server expects a non-standard argument to the 'Kopt' request. Specifically, when the file is binary, it expects "Kopt b" and not "Kopt -kb".
   
  This means, if I make my client operate as the CVSNT server expects, then use the client it with a Cyclic CVS server, I'm seeing this exception:
   
  cvs: import.c:595: process_import_file: Assertion `entdata->options[0] == '-' && entdata-> options[1] == 'k'' failed.
cvs [import aborted]: received abort signal
cvs [import aborted]: exiting, server error
   
  Something has to give. Either CVSNT needs to revert to defaulting the kopt for imported files to the wrapper definitions (best fix), or expect the 'Kopt' argument in the standard form (this fix is good enough for me, but not for your continued compatability with Cyclic clients).
   
  The bug is very easy to reproduce with Servalan. 
   
  - Set up a CVSNT server and a 1.11.17 client with :pserver: access.
- Edit the CVSROOT/cvswrappers to include "*.zip -kb" or "*.zip -k 'b'"
- Import a large zip file as a new module, check out that module.
- Zip file is corrupt; 0x0d characters converted to 0x0a
   
  Paul.
   

 		
---------------------------------
 Try the all-new Yahoo! Mail . "The New Version is radically easier to use" – The Wall Street Journal


More information about the cvsnt mailing list
Download the latest CVSNT, TortosieCVS, WinCVS etc. for Windows 8 etc.
@CVSNT on Twitter   CVSNT on Facebook