--diff-filename assumes diff filename is in current directory

Review Request #1584 — Created May 6, 2010 and discarded — Latest diff uploaded

Information

RBTools

Reviewers

--diff-filename assumes diff filename is in current directory which may or may not be true.

options.diff_filename may be an absolute or a relative path, joining the (original) current working directory with an absolute path generates incorrect file names. I did experiment with adding a line just before os.chdir():

    options.diff_filename = os.path.abspath(options.diff_filename)

But this appears to fail under VMS CPython when VMS logicals are used, e.g. tmp:somefile (i.e. somefile on the tmp device) after an absolutely path call ends up with the cwd prefixed to the original file, i.e. same problem.

Current directory code was/is required for some SCM's (git and possibly p4) where the current directory may be changed.
C:\svn\rbtools_master>git diff --full-index HEAD > C:\tmp\pr_diff_paths.diff

C:\svn\rbtools_master>c:\PortablePython_1.1_py2.6.1\App\python -m rbtools.postreview --server=http://reviews.reviewboard.org/ --diff-filename=C:\tmp\pr_diff_paths.diff -r1584

And testing under VMS.
    Loading...