Make it easier for tools to function outside a source checkout.
Review Request #10458 — Created March 20, 2019 and submitted — Latest diff uploaded
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
scan_usable_client()for specifying that a working checkout is
optional. These will still attempt to find a repository checkout, but
Noneif one can't be found, rather than erroring out.
rbt patch --printhas been fixed up to use this, in order to restore
the ability to work outside a source tree.
rbt patch --printwas usable outside a source tree,
but that a source tree was still required and checked when not
Unit tests pass.