diff options
author | W. Trevor King <wking@drexel.edu> | 2009-12-06 04:24:07 -0500 |
---|---|---|
committer | W. Trevor King <wking@drexel.edu> | 2009-12-06 04:24:07 -0500 |
commit | fc131e3acbf657f42959910c4f4483a09c871016 (patch) | |
tree | 3f53bdf188079ce16f29cd6d3bf69ff0146568da /becommands/diff.py | |
parent | bca7a2a9311a5a23d98229d9918b13d66302537e (diff) | |
download | bugseverywhere-fc131e3acbf657f42959910c4f4483a09c871016.tar.gz |
Set BugDir(root=X) instead of os.chdir(X) in
Diffstat (limited to 'becommands/diff.py')
-rw-r--r-- | becommands/diff.py | 6 |
1 files changed, 2 insertions, 4 deletions
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) |