aboutsummaryrefslogtreecommitdiffstats
path: root/be
diff options
context:
space:
mode:
authorW. Trevor King <wking@drexel.edu>2009-12-06 17:20:39 -0500
committerW. Trevor King <wking@drexel.edu>2009-12-06 17:20:39 -0500
commitba31b657c49649ee0b00663a32e907bb482270ac (patch)
tree31142a323cd8a9107563a273b7c15fd8e76eb2a1 /be
parentfc131e3acbf657f42959910c4f4483a09c871016 (diff)
downloadbugseverywhere-ba31b657c49649ee0b00663a32e907bb482270ac.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 'be')
-rwxr-xr-xbe8
1 files changed, 3 insertions, 5 deletions
diff --git a/be b/be
index c5c372f..a4a3ea4 100755
--- a/be
+++ b/be
@@ -34,8 +34,8 @@ parser.add_option("--version", action="store_true", dest="version",
help="Print version string and exit.")
parser.add_option("--verbose-version", action="store_true", dest="verbose_version",
help="Print verbose version information and exit.")
-parser.add_option("-d", "--dir", dest="dir", metavar="DIR",
- help="Run this command from DIR instead of the current directory.")
+parser.add_option("-d", "--dir", dest="dir", metavar="DIR", default=".",
+ help="Run this command on the repository in DIR instead of the current directory.")
try:
options,args = parser.parse_args()
@@ -56,13 +56,11 @@ except cmdutil.GetCompletions, e:
if options.version == True or options.verbose_version == True:
print version.version(verbose=options.verbose_version)
sys.exit(0)
-if options.dir != None:
- os.chdir(options.dir)
try:
if len(args) == 0:
raise cmdutil.UsageError, "must supply a command"
- sys.exit(cmdutil.execute(args[0], args[1:]))
+ sys.exit(cmdutil.execute(args[0], args=args[1:], dir=dir))
except cmdutil.GetHelp:
print cmdutil.help(args[0])
sys.exit(0)