run-tests: also follow symlink when update PATH with 'run-tests.py' dir
I'm using 'run-tests.py' from my '$PATH' and use a symlink to get 'run-tests.py'
to in that '$PATH'. There is a handful of test helpers (like f) that needs to be
in the '$PATH' for the test to run, and they are expected to live next to the
'run-tests.py' binary. Using a symlink confuses this logic, so we add to the
'$PATH' both the 'run-tests.py' executable directory, and the actual file
location direction.
$ hg init
$ touch unknown
$ touch a
$ hg add a
$ hg ci -m "1"
$ touch b
$ hg add b
$ hg ci -m "2"
Should show unknown
$ hg status
? unknown
$ hg revert -r 0 --all
removing b
Should show unknown and b removed
$ hg status
R b
? unknown
Should show a and unknown
$ ls
a
unknown