Review Board

beta

Cvs.py wasn't stripping the repository path properly

Updated 5 months, 2 weeks ago

Eric Miller Reviewers
reviewboard
None Review Board SVN
Reworked the repository path a bit to remove the :ext:server: gobbledygook
local cvs repository

Diff revision 1 (Latest)

  1. /trunk/reviewboard/scmtools/cvs.py: 2 changes [ 1 2 ]
/trunk/reviewboard/scmtools/cvs.py
Revision 1401 New Change
147
        self.tempdir = tempfile.mkdtemp()
147
        self.tempdir = tempfile.mkdtemp()
148
        os.chdir(self.tempdir)
148
        os.chdir(self.tempdir)
149
149
150
        # We strip the repo off of the fully qualified path as CVS does
150
        # We strip the repo off of the fully qualified path as CVS does
151
        # not like to be given absolute paths.
151
        # not like to be given absolute paths.
152
        if filename.startswith(self.path + "/"):
152
        repos_path = self.path.split(":")[-1]
153
            filename = filename[len(self.path) + 1:]
153
        if filename.startswith(repos_path + "/"):
154
            filename = filename[len(repos_path) + 1:]
154
155
155
        # Strip off the ",v" we sometimes get for CVS paths.
156
        # Strip off the ",v" we sometimes get for CVS paths.
156
        if filename.endswith(",v"):
157
        if filename.endswith(",v"):
157
            filename = filename.rstrip(",v")
158
            filename = filename.rstrip(",v")
158
159
  1. /trunk/reviewboard/scmtools/cvs.py: 2 changes [ 1 2 ]