aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/cmdutil.py
diff options
context:
space:
mode:
authorW. Trevor King <wking@drexel.edu>2009-12-07 07:18:48 -0500
committerW. Trevor King <wking@drexel.edu>2009-12-07 07:18:48 -0500
commitfdf9925ffaada614544d1b2d3ccecb42f1549acb (patch)
tree4050e78947cd847d17e2de399da7a1d4d794820c /libbe/cmdutil.py
parentfc131e3acbf657f42959910c4f4483a09c871016 (diff)
downloadbugseverywhere-fdf9925ffaada614544d1b2d3ccecb42f1549acb.tar.gz
be --dir DIR COMMAND now roots the bugdir in DIR without changing directories.
Previously, for the directory structure A |-- X `-- Y You could do something like A$ be --dir X diff --dir ../Y Now it's A$ be --dir X diff --dir Y The --root option to `be init` has been removed as redundant. Replace calls like be init --root DIR with be --dir DIR init
Diffstat (limited to 'libbe/cmdutil.py')
-rw-r--r--libbe/cmdutil.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/libbe/cmdutil.py b/libbe/cmdutil.py
index b892bde..c567984 100644
--- a/libbe/cmdutil.py
+++ b/libbe/cmdutil.py
@@ -79,12 +79,15 @@ def get_command(command_name):
return cmd
-def execute(cmd, args, manipulate_encodings=True, restrict_file_access=False):
+def execute(cmd, args,
+ manipulate_encodings=True, restrict_file_access=False,
+ dir="."):
enc = encoding.get_encoding()
cmd = get_command(cmd)
ret = cmd.execute([a.decode(enc) for a in args],
manipulate_encodings=manipulate_encodings,
- restrict_file_access=restrict_file_access)
+ restrict_file_access=restrict_file_access,
+ dir=dir)
if ret == None:
ret = 0
return ret