aboutsummaryrefslogtreecommitdiffstats
path: root/becommands/commit.py
diff options
context:
space:
mode:
authorGianluca Montecchi <gian@grys.it>2009-10-02 23:46:24 +0200
committerGianluca Montecchi <gian@grys.it>2009-10-02 23:46:24 +0200
commitb0b3c9473e3a4b728ea72a2876e39fe41284a9ed (patch)
tree533a389e877b4b1a9c4099bb419eb221b2f12ada /becommands/commit.py
parent071fef7c351c4fc23696aa6db693411b78da2edb (diff)
downloadbugseverywhere-b0b3c9473e3a4b728ea72a2876e39fe41284a9ed.tar.gz
Merged with Trevor's -rr branch
Diffstat (limited to 'becommands/commit.py')
-rw-r--r--becommands/commit.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/becommands/commit.py b/becommands/commit.py
index 4f3bdbd..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__
@@ -22,13 +22,14 @@ def execute(args, manipulate_encodings=True):
"""
>>> import os, time
>>> from libbe import bug
- >>> bd = bugdir.simple_bug_dir()
+ >>> bd = bugdir.SimpleBugDir()
>>> 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()
"""
parser = get_parser()
options, args = parser.parse_args(args)
@@ -48,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: