Simplify scan_for_server and deprecate ancient TREES config.

Review Request #11478 — Created Feb. 19, 2021 and submitted

Information

RBTools
master

Reviewers

The steps involved in the various repository tool scan_for_server
implementations were overcomplicated and ugly. The main command would
check the option (which includes the config value), and then failing
that, delegate to the repository tool. The repository tools would then
check the config value again before scanning any repository-specific
storage locations like SVN attributes or P4 counters. This second config
step also looked in the TREES config key, which was something from
extremely early on in RBTools' life and has never been properly
documented or expanded upon in the intended ways.

This change cleans up the individual tool scan_for_server
implementations to only perform checking repository-specific methods.
The check for the TREES config has been moved to the very end of the
process as a fallback, and will emit a warning that such a configuration
is deprecated and will be removed.

  • Ran unit tests.
  • Set up a configuration that used the old TREES method and saw the
    expected warning.
Summary ID
Simplify scan_for_server and deprecate ancient TREES config.
The steps involved in the various repository tool `scan_for_server` implementations were overcomplicated and ugly. The main command would check the option (which includes the config value), and then failing that, delegate to the repository tool. The repository tools would then check the config value again before scanning any repository-specific storage locations like SVN attributes or P4 counters. This second config step also looked in the `TREES` config key, which was something from extremely early on in RBTools' life and has never been properly documented or expanded upon in the intended ways. This change cleans up the individual tool `scan_for_server` implementations to only perform checking repository-specific methods. The check for the `TREES` config has been moved to the very end of the process as a fallback, and will emit a warning that such a configuration is deprecated and will be removed. Testing Done: - Ran unit tests. - Set up a configuration that used the old `TREES` method and saw the expected warning.
e320d2930411ed304767b5f9386af2ae4ed885c9
Description From Last Updated

Should the branch be master?

chipx86chipx86

While here, can you move this """ to the next line?

chipx86chipx86

warning

chipx86chipx86

Are we removing in 3 or 4? I feel like getting 3 out with the deprecation warning and removing in …

chipx86chipx86
chipx86
  1. 
      
  2. Show all issues

    Should the branch be master?

    1. This was posted before I moved it.

  3. rbtools/clients/tests/test_p4.py (Diff revision 1)
     
     
    Show all issues

    While here, can you move this """ to the next line?

  4. rbtools/commands/__init__.py (Diff revision 1)
     
     
    Show all issues

    warning

  5. rbtools/commands/__init__.py (Diff revision 1)
     
     
    Show all issues

    Are we removing in 3 or 4? I feel like getting 3 out with the deprecation warning and removing in 4 is the ideal plan, if we can make it happen.

  6. 
      
david
chipx86
  1. Ship It!
  2. 
      
david
Review request changed
Status:
Completed
Change Summary:
Pushed to master (7c0b6b0)