Diffusion commit links contains error message


#1

Observed Behavior:
When browsing a Mercurial repository on our Phabricator instance at .../diffusion/XXX/ I see the following line at the very bottom of the recent history section:
| couldn’t wri | :heavy_check_mark: | | Importing… | |

The “commit hash” couldn't wri is a link to .../rXXXcouldn't%20write%20revision%20branch%20cache%20names:%20[Errno%2013]%20Permission%20denied:%20'/var/repo/XXX/.hg/wlock'.

Expected Behavior:
There should be no such “commit” and the link should not include error messages.

Phabricator Version:
Recent upstream release with minor modifications related to styling and language:

phabricator
    f2f094ce119a68a737300993b741477d0f501d90 (Mon, Aug 6) (branched from 9c438538156dc18343e0c54c8dd845fd7e251ce2 on upstream) 
arcanist
    830661f62833e4601e31854532321bb30be74440 (Sat, Jul 21) (branched from 875d018360374cb4b1287309782fcb9a75d4bcbf on origin) 
phutil
    ec5562433846c9b9ceb7bfe50e5a09cc838defbb (Mon, Aug 6) (branched from 880c0fb3448fae546a8ec0d56868d5fbe0520417 on upstream) 
libphremoteuser
    c7d09c47b797e03a0585b85adc65d082a351cc20 (Apr 8 2016) 
sprint
    9da8f6c3f27282aa10375bb97592cbe86db99d24 (Nov 29 2017) 
diff
    3.5 at /usr/bin/diff 
git
    2.11.0 at /usr/bin/git 
hg
    4.0 at /usr/bin/hg 
pygmentize
    2.2.0 at /usr/bin/pygmentize 
svn
    1.9.5 at /usr/bin/svn 

Reproduction Steps:
I never tried reproducing this on another instance.