aboutsummaryrefslogtreecommitdiffstats
path: root/becommands
diff options
context:
space:
mode:
Diffstat (limited to 'becommands')
-rw-r--r--becommands/commit.py10
-rw-r--r--becommands/diff.py18
-rw-r--r--becommands/init.py16
-rw-r--r--becommands/set.py6
4 files changed, 25 insertions, 25 deletions
diff --git a/becommands/commit.py b/becommands/commit.py
index fb85651..dc70e7e 100644
--- a/becommands/commit.py
+++ b/becommands/commit.py
@@ -14,7 +14,7 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""Commit the currently pending changes to the repository"""
-from libbe import cmdutil, bugdir, editor, rcs
+from libbe import cmdutil, bugdir, editor, vcs
import sys
__desc__ = __doc__
@@ -26,7 +26,7 @@ def execute(args, manipulate_encodings=True):
>>> os.chdir(bd.root)
>>> full_path = "testfile"
>>> test_contents = "A test file"
- >>> bd.rcs.set_file_contents(full_path, test_contents)
+ >>> bd.vcs.set_file_contents(full_path, test_contents)
>>> execute(["Added %s." % (full_path)], manipulate_encodings=False) # doctest: +ELLIPSIS
Committed ...
>>> bd.cleanup()
@@ -49,11 +49,11 @@ def execute(args, manipulate_encodings=True):
elif options.body == "EDITOR":
body = editor.editor_string("Please enter your commit message above")
else:
- body = bd.rcs.get_file_contents(options.body, allow_no_rcs=True)
+ body = bd.vcs.get_file_contents(options.body, allow_no_vcs=True)
try:
- revision = bd.rcs.commit(summary, body=body,
+ revision = bd.vcs.commit(summary, body=body,
allow_empty=options.allow_empty)
- except rcs.EmptyCommit, e:
+ except vcs.EmptyCommit, e:
print e
return 1
else:
diff --git a/becommands/diff.py b/becommands/diff.py
index 034823d..b6ac5b0 100644
--- a/becommands/diff.py
+++ b/becommands/diff.py
@@ -25,12 +25,12 @@ def execute(args, manipulate_encodings=True):
>>> import os
>>> bd = bugdir.SimpleBugDir()
>>> bd.set_sync_with_disk(True)
- >>> original = bd.rcs.commit("Original status")
+ >>> original = bd.vcs.commit("Original status")
>>> bug = bd.bug_from_uuid("a")
>>> bug.status = "closed"
- >>> changed = bd.rcs.commit("Closed bug a")
+ >>> changed = bd.vcs.commit("Closed bug a")
>>> os.chdir(bd.root)
- >>> if bd.rcs.versioned == True:
+ >>> if bd.vcs.versioned == True:
... execute([original], manipulate_encodings=False)
... else:
... print "Modified bugs:\\n a:cm: Bug A\\n Changed bug settings:\\n status: open -> closed"
@@ -38,12 +38,12 @@ def execute(args, manipulate_encodings=True):
a:cm: Bug A
Changed bug settings:
status: open -> closed
- >>> if bd.rcs.versioned == True:
+ >>> if bd.vcs.versioned == True:
... execute(["--modified", original], manipulate_encodings=False)
... else:
... print "a"
a
- >>> if bd.rcs.versioned == False:
+ >>> if bd.vcs.versioned == False:
... execute([original], manipulate_encodings=False)
... else:
... print "This directory is not revision-controlled."
@@ -61,11 +61,11 @@ def execute(args, manipulate_encodings=True):
raise cmdutil.UsageError("Too many arguments.")
bd = bugdir.BugDir(from_disk=True,
manipulate_encodings=manipulate_encodings)
- if bd.rcs.versioned == False:
+ if bd.vcs.versioned == False:
print "This directory is not revision-controlled."
else:
if revision == None: # get the most recent revision
- revision = bd.rcs.revision_id(-1)
+ revision = bd.vcs.revision_id(-1)
old_bd = bd.duplicate_bugdir(revision)
d = diff.Diff(old_bd, bd)
tree = d.report_tree()
@@ -104,10 +104,10 @@ def get_parser():
return parser
longhelp="""
-Uses the RCS to compare the current tree with a previous tree, and
+Uses the VCS to compare the current tree with a previous tree, and
prints a pretty report. If REVISION is given, it is a specifier for
the particular previous tree to use. Specifiers are specific to their
-RCS.
+VCS.
For Arch your specifier must be a fully-qualified revision name.
diff --git a/becommands/init.py b/becommands/init.py
index 4156a26..1125d93 100644
--- a/becommands/init.py
+++ b/becommands/init.py
@@ -21,7 +21,7 @@ __desc__ = __doc__
def execute(args, manipulate_encodings=True):
"""
- >>> from libbe import utility, rcs
+ >>> from libbe import utility, vcs
>>> import os
>>> dir = utility.Dir()
>>> try:
@@ -36,14 +36,14 @@ def execute(args, manipulate_encodings=True):
>>> dir = utility.Dir()
>>> os.chdir(dir.path)
- >>> rcs = rcs.installed_rcs()
- >>> rcs.init('.')
- >>> print rcs.name
+ >>> vcs = vcs.installed_vcs()
+ >>> vcs.init('.')
+ >>> print vcs.name
Arch
>>> execute([], manipulate_encodings=False)
Using Arch for revision control.
Directory initialized.
- >>> rcs.cleanup()
+ >>> vcs.cleanup()
>>> try:
... execute(['--root', '.'], manipulate_encodings=False)
@@ -70,8 +70,8 @@ def execute(args, manipulate_encodings=True):
except bugdir.AlreadyInitialized:
raise cmdutil.UserError("Directory already initialized: %s" % options.root_dir)
bd.save()
- if bd.rcs.name is not "None":
- print "Using %s for revision control." % bd.rcs.name
+ if bd.vcs.name is not "None":
+ print "Using %s for revision control." % bd.vcs.name
else:
print "No revision control detected."
print "Directory initialized."
@@ -86,7 +86,7 @@ def get_parser():
longhelp="""
This command initializes Bugs Everywhere support for the specified directory
and all its subdirectories. It will auto-detect any supported revision control
-system. You can use "be set rcs_name" to change the rcs being used.
+system. You can use "be set vcs_name" to change the vcs being used.
The directory defaults to your current working directory.
diff --git a/becommands/set.py b/becommands/set.py
index e78a1ea..f7e68d3 100644
--- a/becommands/set.py
+++ b/becommands/set.py
@@ -19,7 +19,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""Change tree settings"""
import textwrap
-from libbe import cmdutil, bugdir, rcs, settings_object
+from libbe import cmdutil, bugdir, vcs, settings_object
__desc__ = __doc__
def _value_string(bd, setting):
@@ -87,12 +87,12 @@ def get_bugdir_settings():
set = getattr(bugdir.BugDir, s)
dstr = set.__doc__.strip()
# per-setting comment adjustments
- if s == "rcs_name":
+ if s == "vcs_name":
lines = dstr.split('\n')
while lines[0].startswith("This property defaults to") == False:
lines.pop(0)
assert len(lines) != None, \
- "Unexpected rcs_name docstring:\n '%s'" % dstr
+ "Unexpected vcs_name docstring:\n '%s'" % dstr
lines.insert(
0, "The name of the revision control system to use.\n")
dstr = '\n'.join(lines)