Make a few improvements to the Mercurial backend.

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

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.
Summary ID
Make a few improvements to the Mercurial backend.
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.
a1aa8fc9e563b325da50f7a60a26ed2938e77764
Description From Last Updated

Small nit, but: "Mercurial"

chipx86chipx86
chipx86
  1. 
      
  2. reviewboard/scmtools/hg.py (Diff revision 1)
     
     
    Show all issues

    Small nit, but: "Mercurial"

  3. 
      
david
maubin
  1. Ship It!
  2. 
      
david
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-7.x (3eee397)
Loading...