SVN and CVS no longer create diffs relative to current working directory.
Review Request #6388 — Created Oct. 1, 2014 and submitted
CVS and SVN now change to the root directory of the repository for
performing diffs (before changing back).Add the
_get_repository_root
method toCVSClient
that determines
the root directory of the current CVS repository. It does this by
reading the CVS/Repository file in the current directory and
determining the working direcotry's depth relative to the CVSRoot;
that is the number of directories to traverse up to find the
repository root.The
base_dir
parameter of allrbtools.utils.diffs
method is no
longer optional because all SCMTools that utilize it require
specifying the root of the repository.
Unit tests pass.
The diffs are generated correctly.
Change Summary:
Update docstring in
CVSClient._get_repository_root
Commit: |
|
||||
---|---|---|---|---|---|
Groups: |
|
||||
Diff: |
Revision 2 (+36 -6) |

-
Tool: Pyflakes Processed Files: rbtools/clients/cvs.py rbtools/clients/svn.py rbtools/utils/diffs.py Tool: PEP8 Style Checker Processed Files: rbtools/clients/cvs.py rbtools/clients/svn.py rbtools/utils/diffs.py
-
-
rbtools/clients/cvs.py (Diff revision 2) In order to make this exception-safe, this should probably be:
try: diff = execute(...) finally: os.chdir(cwd)
-
-
Change Summary:
Always return to the original CWD even if calls to
execute
throw an exception.CVS SCMClient ensures that the the path that we get from CVS/Repository is a relative path.
Description: |
|
||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Commit: |
|
||||||||||||||||||||||||||||||||||||||||||||||||
Diff: |
Revision 3 (+56 -9) |

-
Tool: Pyflakes Processed Files: rbtools/clients/cvs.py rbtools/clients/svn.py rbtools/utils/diffs.py Tool: PEP8 Style Checker Processed Files: rbtools/clients/cvs.py rbtools/clients/svn.py rbtools/utils/diffs.py
Change Summary:
Be careful about how we determine the CVS repository root.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 4 (+62 -9) |