aboutsummaryrefslogtreecommitdiffstats
path: root/becommands/commit.py
diff options
context:
space:
mode:
Diffstat (limited to 'becommands/commit.py')
-rw-r--r--becommands/commit.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/becommands/commit.py b/becommands/commit.py
index dc70e7e..39d1e2e 100644
--- a/becommands/commit.py
+++ b/becommands/commit.py
@@ -18,9 +18,9 @@ from libbe import cmdutil, bugdir, editor, vcs
import sys
__desc__ = __doc__
-def execute(args, manipulate_encodings=True):
+def execute(args, manipulate_encodings=True, restrict_file_access=False):
"""
- >>> import os, time
+ >>> import os
>>> from libbe import bug
>>> bd = bugdir.SimpleBugDir()
>>> os.chdir(bd.root)
@@ -49,6 +49,8 @@ def execute(args, manipulate_encodings=True):
elif options.body == "EDITOR":
body = editor.editor_string("Please enter your commit message above")
else:
+ if restrict_file_access == True:
+ cmdutil.restrict_file_access(bd, options.body)
body = bd.vcs.get_file_contents(options.body, allow_no_vcs=True)
try:
revision = bd.vcs.commit(summary, body=body,