3343: Unable to add CVS repository with version below 1.12
- Review Board
|jwoo*****@gmai***** (Google Code) (Is this you? Claim this profile.)|
|May 16, 2014|
What version are you running? 1.7.25, also tried 2.0rc3 What's the URL of the page containing the problem? /admin/db/scmtools/repository/add/ What steps will reproduce the problem? 1. Environmental configuration: CVS 1.11.23 server, CVS 1.11.23 or 1.12 client on RB server, RB components for CVS access present on server, RB SSH pub key in ~/.ssh/authorized_hosts on CVS server for a user with access to CVS 2. Access admin -> manage repositories -> add repository 3. Enter any name for the repository, select CVS for the repository type, enter a valid CVSROOT for the repository path and the username of the user with access to CVS in the username field, click Save. What is the expected output? What do you see instead? Expecting to see that the repository is added successfully. Instead, it reports "A repository was not found at the specified path." What operating system are you using? What browser? RB Server is CentOS 6 Client OS is Windows 7 with Chrome 34.0.1847.131 m Please provide any additional information below. I found that ReviewBoard is attempting to execute the "rls" cvs command, which isn't valid until CVS 1.12, which is the 'feature' build. The current stable build is 1.11.23 (according to http://ftp.gnu.org/non-gnu/cvs/source/stable/). Anyone attempting to add a CVS server running anything lower than 1.12 is going to fail. I suspect that even if the server was 1.12 the operation would still fail if the client is anything less than 1.12. I found the problem in /usr/lib/python2.6/site-packages/ReviewBoard-2.0rc3-py2.6.egg/reviewboard/scmtools/cvs.py: 331 def check_repository(self): 332 p = SCMTool.popen(['cvs', '-f', '-d', self.cvsroot, 'rls'], 333 self.local_site_name) 334 errmsg = six.text_type(p.stderr.read()) 335 if p.wait() != 0: 336 raise SCMError(errmsg) I was able to resolve the issue by substituting 'rls' for 'version' on line 332. Since ReviewBoard is just checking for the return code from CVS it should function the same. 331 def check_repository(self): 332 p = SCMTool.popen(['cvs', '-f', '-d', self.cvsroot, 'version'], 333 self.local_site_name) 334 errmsg = six.text_type(p.stderr.read()) 335 if p.wait() != 0: 336 raise SCMError(errmsg) I then did a recompile (python -m compileall .) from the reviewboard/scmtools directory and restarted Apache. It now works. Your documentation indicates that on RHEL/CentOS you can install CVS using "yum install cvs". The version included with CentOS 6 is 1.11.23 and will not work without these modifications.