Clean up, modernize, and document the the Perforce codebase.

Review Request #8944 — Created May 17, 2017 and submitted

Information

Review Board
release-2.5.x
a7e06fc...

Reviewers

The Perforce support has been around for a very long time, and there
were some warts and unused code that never got cleaned up.

This change removes some methods and parameters that weren't needed
anymore, rearranges some functions, removes unnecessary code, converts a
static method into a normal method, and adds documentation throughout
the file. It sets the stage for future work in this file.

Unit tests and real-world functionality work.

Built the docs (temporarily adding this file to the docs build -- it's
not by default) and made sure the docs were correct.

Description From Last Updated

This isn't really correct. While there is a yield in here, that's used by @contextmanager. The contextmanager wrapper will return …

daviddavid

Should be returns here too.

daviddavid
david
  1. 
      
  2. reviewboard/scmtools/perforce.py (Diff revision 1)
     
     
     
    Show all issues

    This isn't really correct. While there is a yield in here, that's used by @contextmanager. The contextmanager wrapper will return a context manager, which isn't really a type in and of itself, but I think could be documented as object.

    1. Yeah I wasn't sure how we really want to document these. I feel like maybe a better option is to invent a Context: section, but napolean won't know it.

    2. I have a change coming up that will let us define a Context: section, which is probably going to be more clear for anyone reading the docs, given the nature of the function.

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

    Should be returns here too.

  4. 
      
chipx86
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-2.5.x (014fb77)
Loading...