aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/cmdutil.py
diff options
context:
space:
mode:
authorW. Trevor King <wking@drexel.edu>2009-07-19 15:24:51 -0400
committerW. Trevor King <wking@drexel.edu>2009-07-19 15:24:51 -0400
commita6d5f2891dc353ebe5d9d8598790a6674c174eec (patch)
treea7828e4bc0b981540eacd7f3c5199a0c9f2ab6a4 /libbe/cmdutil.py
parentb3ce47285a66a35904e5e50636ce471ecb4ce29d (diff)
downloadbugseverywhere-a6d5f2891dc353ebe5d9d8598790a6674c174eec.tar.gz
Added --allow-empty to "be commit"
Previously many backends would silently add an empty commit. Not very useful. When the new --allow-empty flag and related allow_empty options are false, every versioning backend is guaranteed to raise the EmptyCommit exception in the case of an attempted empty commit.
Diffstat (limited to 'libbe/cmdutil.py')
-rw-r--r--libbe/cmdutil.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/libbe/cmdutil.py b/libbe/cmdutil.py
index bba3e0e..853a75a 100644
--- a/libbe/cmdutil.py
+++ b/libbe/cmdutil.py
@@ -73,8 +73,10 @@ def get_command(command_name):
def execute(cmd, args):
enc = encoding.get_encoding()
cmd = get_command(cmd)
- cmd.execute([a.decode(enc) for a in args])
- return 0
+ ret = cmd.execute([a.decode(enc) for a in args])
+ if ret == None:
+ ret = 0
+ return ret
def help(cmd=None, parser=None):
if cmd != None: