4892: Cleanly handle symbolic links

almt

What version of Review Board are you running?

3.19

What version of Review Bot are you running?

1.0.1

What tool(s) is Review Bot running?

pyflakes

What steps will reproduce the problem?

  1. Create a symbolic link from one python file to another
  2. Submit a code review

What is the expected output? What do you see instead?

One gets an internal error because the downloaded patched file via

https://<REVIEWBOARD>.com/api/review-requests/<id>/diffs/<N>/files/<fileid>/patched-file

returns the path to the new location, not the actual file. I presume this is expected, but the bot needs to somehow know it's a symbolic link, not a .py file.

../new/dir/orig.py

Please provide any additional information below.