Make it easier for tools to function outside a source checkout.

Review Request #10458 — Created March 20, 2019 and submitted

chipx86
RBTools
master
4628
rbtools

RBTools is pretty heavily dependent on a source checkout for most
operations. For some tools, this is a problem, as they have very little
need for the checkout (at least in certain modes) but not having a
checkout means overriding a lot of logic. rbt patch --print, for
instance, tries to work without a source tree, but the recent DVCS work
broke this due to how fragile and unclear the workarounds were.

This change adds support in initialize_scm_tool() and
scan_usable_client() for specifying that a working checkout is
optional. These will still attempt to find a repository checkout, but
will return None if one can't be found, rather than erroring out.

rbt patch --print has been fixed up to use this, in order to restore
the ability to work outside a source tree.

Tested that rbt patch --print was usable outside a source tree,
but that a source tree was still required and checked when not
using --print.

Unit tests pass.

Summary
Make it easier for tools to function outside a source checkout.
Description From Last Updated

Bug 4628

daviddavid

F821 undefined name '_'

reviewbotreviewbot

F821 undefined name '_'

reviewbotreviewbot
Checks run (1 failed, 1 succeeded)
flake8 failed.
JSHint passed.

flake8

chipx86
david
  1. 
      
  2. Bug 4628

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

Status: Closed (submitted)

Change Summary:

Pushed to master (2e95133)
Loading...