phabricator: update the hashes in commit messages as they get submitted
Due to the sequence of actions (posting, amending the local commit, and then
updating the Differential properties), the message in the commit is updated on
the initial send but the message displayed in Phabricator is not. It should get
updated there if the review is reposted. The data in the Commits tab is
accurate for the first `phabsend`.
Differential Revision: https://phab.mercurial-scm.org/D8950
#!/usr/bin/env python
from __future__ import absolute_import, print_function
import errno
import os
import sys
for f in sys.argv[1:]:
try:
print(f, '->', os.readlink(f))
except OSError as err:
if err.errno != errno.EINVAL:
raise
print(f, '->', f, 'not a symlink')
sys.exit(0)