From: W. Trevor King Date: Sun, 6 Dec 2009 09:24:07 +0000 (-0500) Subject: Set BugDir(root=X) instead of os.chdir(X) in X-Git-Tag: 1.0.0~59^2~56 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=fc131e3acbf657f42959910c4f4483a09c871016;p=be.git Set BugDir(root=X) instead of os.chdir(X) in --- diff --git a/becommands/diff.py b/becommands/diff.py index 2cff537..e844c10 100644 --- a/becommands/diff.py +++ b/becommands/diff.py @@ -77,9 +77,8 @@ def execute(args, manipulate_encodings=True, restrict_file_access=False): revision = bd.vcs.revision_id(-1) old_bd = bd.duplicate_bugdir(revision) else: - cwd = os.getcwd() - os.chdir(options.dir) - old_bd_current = bugdir.BugDir(from_disk=True, + old_bd_current = bugdir.BugDir(root=os.path.abspath(options.dir), + from_disk=True, manipulate_encodings=False) if revision == None: # use the current working state old_bd = old_bd_current @@ -88,7 +87,6 @@ def execute(args, manipulate_encodings=True, restrict_file_access=False): raise cmdutil.UsageError('%s is not revision-controlled.' % options.dir) old_bd = old_bd_current.duplicate_bugdir(revision) - os.chdir(cwd) d = diff.Diff(old_bd, bd) tree = d.report_tree(subscriptions)