diff options
author | W. Trevor King <wking@drexel.edu> | 2009-07-19 15:24:51 -0400 |
---|---|---|
committer | W. Trevor King <wking@drexel.edu> | 2009-07-19 15:24:51 -0400 |
commit | a6d5f2891dc353ebe5d9d8598790a6674c174eec (patch) | |
tree | a7828e4bc0b981540eacd7f3c5199a0c9f2ab6a4 /libbe/cmdutil.py | |
parent | b3ce47285a66a35904e5e50636ce471ecb4ce29d (diff) | |
download | bugseverywhere-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.py | 6 |
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: |