Make a few improvements to the Mercurial backend.

Review Request #13602 — Created March 4, 2024 and submitted — Latest diff uploaded

Information

Review Board
release-7.x

Reviewers

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.
  • Ran unit tests.
  • Posted a bunch of changes, including binary files.

Commits

Files