aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/rcs.py
diff options
context:
space:
mode:
authorW. Trevor King <wking@drexel.edu>2009-07-19 10:48:12 -0400
committerW. Trevor King <wking@drexel.edu>2009-07-19 10:48:12 -0400
commitb3ce47285a66a35904e5e50636ce471ecb4ce29d (patch)
tree5adefc61f75a30cd31a796d4bc8fc2470e3bdb23 /libbe/rcs.py
parent0baf6034dba2178f4141d3fe87d0d41061946299 (diff)
downloadbugseverywhere-b3ce47285a66a35904e5e50636ce471ecb4ce29d.tar.gz
Added becommands/commit.py and minor fixes.
Now we can commit changes from the command line with a unified interface. The interface is much less flexible than using your particular version control system's commit command directly, so this command is mostly intended for user-interfaces and other tools that don't want to be bothered with the extra flexibility. Normalized spacing in rcs.RCS.commit to produce: summary <BLANKLINE> body <TRAILING-ENDLINE> messages regardless of the input string format. Also fixed a "--complete" handline bug in cmdutil, and some minor docstring typos in libbe.rcs and .editor.
Diffstat (limited to 'libbe/rcs.py')
-rw-r--r--libbe/rcs.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/libbe/rcs.py b/libbe/rcs.py
index 1024249..7138d01 100644
--- a/libbe/rcs.py
+++ b/libbe/rcs.py
@@ -201,7 +201,7 @@ class RCS(object):
"""
Commit the current working directory, using the contents of
commitfile as the comment. Return the name of the old
- revision.
+ revision (or None if commits are not supported).
"""
return None
def installed(self):
@@ -370,8 +370,9 @@ class RCS(object):
string summary and body. Return the name of the old revision
(or None if versioning is not supported).
"""
+ summary = summary.strip()
if body is not None:
- summary += '\n' + body
+ summary += '\n\n' + body.strip() + '\n'
descriptor, filename = tempfile.mkstemp()
revision = None
try: