From fc131e3acbf657f42959910c4f4483a09c871016 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sun, 6 Dec 2009 04:24:07 -0500 Subject: Set BugDir(root=X) instead of os.chdir(X) in --- becommands/diff.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'becommands/diff.py') 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) -- cgit