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:
-
add06c65bb4e8ee878764c6a56e8303dbb78bf432136ca49787165da71a7716a11007b3024e5e0b0
- Groups:
-
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:
-
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:
-
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 determinesthe root directory of the current CVS repository. It does this by ~ reading the CVS/Repository file in the current directory and counting ~ the number of path seperators in that file; that is the number of ~ directories to traverse up to find the repository root. ~ 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 nolonger optional because all SCMTools that utilize it require specifying the root of the repository. - Commit:
-
2136ca49787165da71a7716a11007b3024e5e0b0bb641b5ec7fb0463d23e7ff8e34228fbd54a3d07
-
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:
-
bb641b5ec7fb0463d23e7ff8e34228fbd54a3d07929f61442ab85a5ab1695a59ef6a8c28aec1e88d