2613: Incorrect stripping in CVS repositories

vika****@gmai***** (Google Code) (Is this you? Claim this profile.)
July 20, 2012
What version are you running?

What's the URL of the page containing the problem?
Internal page. Not accessible on the web.

What steps will reproduce the problem?
1. Add a CVS repository
2. Upload a diff containing a file that ends with csv

What is the expected output? What do you see instead?
Expected the review request is created, however error generated:
cvs.lin checkout: cannot find module `filename.cs' - ignored

What operating system are you using? What browser?
Linux, Firefox

Please provide any additional information below.
I believe the problem is because of the following line in scmtools/cvs.py
        # Strip off the ",v" we sometimes get for CVS paths.
	if filename.endswith(",v"):
            filename = filename.rstrip(',v')
According to the python documentation, rstrip will strip all characters provided (so instead of ,v being stripped, v,v is)
Changing the above line to 
 filename = filename[:-2]
will solve this issue. But I'm not sure if it will have any other side-effects.

#1 david
Fixed in master (603089c). This will ship with 1.7. Thanks!
  • +Fixed
#2 david
Also pushed to release-1.6.x (bb7803a).