# Ben Finney <benf@cybersource.com.au>
# Chris Ball <cjb@laptop.org>
# Gianluca Montecchi <gian@grys.it>
-# W. Trevor King <wking@drexel.edu>
+# W. Trevor King <wking@tremily.us>
#
# This file is part of Bugs Everywhere.
#
# You should have received a copy of the GNU General Public License along with
# Bugs Everywhere. If not, see <http://www.gnu.org/licenses/>.
-"""Define the base :class:`VCS` (Version Control System) class, which
+"""Define the base :py:class:`VCS` (Version Control System) class, which
should be subclassed by other Version Control System backends. The
base class implements a "do not version" VCS.
"""
"""
def set_preferred_vcs(name):
- """Manipulate :data:`VCS_ORDER` to place `name` first.
+ """Manipulate :py:data:`VCS_ORDER` to place `name` first.
This is primarily indended for testing purposes.
"""
def _get_matching_vcs(matchfn):
"""Return the first module for which matchfn(VCS_instance) is True.
- Searches in :data:`VCS_ORDER`.
+ Searches in :py:data:`VCS_ORDER`.
"""
for submodname in VCS_ORDER:
module = import_by_name('libbe.storage.vcs.%s' % submodname)
def vcs_by_name(vcs_name):
"""Return the module for the VCS with the given name.
- Searches in :data:`VCS_ORDER`.
+ Searches in :py:data:`VCS_ORDER`.
"""
if vcs_name == VCS.name:
return new()
def detect_vcs(dir):
"""Return an VCS instance for the vcs being used in this directory.
- Searches in :data:`VCS_ORDER`.
+ Searches in :py:data:`VCS_ORDER`.
"""
return _get_matching_vcs(lambda vcs: vcs._detect(dir))
def installed_vcs():
"""Return an instance of an installed VCS.
- Searches in :data:`VCS_ORDER`.
+ Searches in :py:data:`VCS_ORDER`.
"""
return _get_matching_vcs(lambda vcs: vcs.installed())
.../.be/BUGDIR/bugs/BUG/comments/COMMENT
^-- root path
- See :mod:`libbe.util.id` for a discussion of ID formats.
+ See :py:mod:`libbe.util.id` for a discussion of ID formats.
Examples
--------
return relpath
def _u_abspath(self, path, root=None):
- """Return the absolute path from a path realtive to root.
+ """Return the absolute path from a path relative to root.
Examples
--------
See Also
--------
- :mod:`libbe.storage.util.upgrade`
+ libbe.storage.util.upgrade
"""
if path == None:
path = os.path.join(self.repo, '.be', 'version')
class VCS_get_user_id_TestCase(VCSTestCase):
"""Test cases for VCS.get_user_id method."""
- def test_gets_existing_user_id(self):
+ def test_get_existing_user_id(self):
"""Should get the existing user ID."""
if self.s.installed():
user_id = self.s.get_user_id()