• 
      

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

    Review Request #10458 — Created March 21, 2019 and submitted — Latest diff uploaded

    Information

    RBTools
    master

    Reviewers

    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.

    Commits

    Files