Add typing and clean up some code in the mercurial backend.

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

Information

Review Board
release-7.x

Reviewers

This change adds type hints throughout the mercurial implementation, and
cleans up some of the style and comments throughout.

While going through this code I realized that the check_repository
implementation was instantiating HgClient incorrectly with the local
site. I've changed it so that everywhere passes the local site name.

Ran unit tests.

Summary ID
Add typing and clean up some code in the mercurial backend.
This change adds type hints throughout the mercurial implementation, and cleans up some of the style and comments throughout. While going through this code I realized that the `check_repository` implementation was instantiating HgClient incorrectly with the local site. I've changed it so that everywhere passes the local site name. Testing Done: Ran unit tests.
277e1685f09aa67de7d52d9a4975c2fb43e444a2
Description From Last Updated

Needs to be the full path to Revision. Same with FileLookupContext below.

chipx86chipx86

We can probably remove this bit, since it's more guidance for the usage/implementation of the function in the main docs.

chipx86chipx86

Let's add , unused

chipx86chipx86

This is more guidance to what the subclass's implementation should do. It should probably be updated to be more specific …

chipx86chipx86

Let's keep capitalizing as "Local Site", since this is a defined term and not just a site that is local.

chipx86chipx86

:command:

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

    Needs to be the full path to Revision.

    Same with FileLookupContext below.

  3. reviewboard/scmtools/hg.py (Diff revision 1)
     
     
     
     
     
    Show all issues

    We can probably remove this bit, since it's more guidance for the usage/implementation of the function in the main docs.

  4. reviewboard/scmtools/hg.py (Diff revision 1)
     
     
    Show all issues

    Let's add , unused

  5. reviewboard/scmtools/hg.py (Diff revision 1)
     
     
     
     
    Show all issues

    This is more guidance to what the subclass's implementation should do. It should probably be updated to be more specific to this implementation.

  6. reviewboard/scmtools/hg.py (Diff revision 1)
     
     
    Show all issues

    Let's keep capitalizing as "Local Site", since this is a defined term and not just a site that is local.

  7. reviewboard/scmtools/hg.py (Diff revision 1)
     
     
    Show all issues

    :command:

  8. 
      
david
chipx86
  1. Ship It!
  2. 
      
david
Review request changed
Status:
Completed
Change Summary:
Pushed to release-7.x (2017b45)