Make a few improvements to the Mercurial backend.
Review Request #95 — Created April 5, 2024 and submitted — Latest diff uploaded
This change makes a few improvements to our Mercurial support: 1. The way that binary files were appearing in diffs was causing the diff parser (based on the GitDiffParser) to override the commit IDs in the filediff revisions with the file SHAs that `hg diff --git` was adding. The file SHAs have no meaning to us, so these have been replaced back with the commit IDs. 2. I've started seeing warnings pop up about unclosed resources when dealing with Popen. Treating the object as a context manager fixes this. Testing Done: - Ran unit tests. - Posted a bunch of changes, including binary files. Reviewed at https://reviews.reviewboard.org/r/13602/
asfa