Skip to content

Conversation

@johnpaulalex
Copy link
Contributor

(note this CL is on top of the 'docstatus' branch aka pull request #171, I hope I did that right)

Implementation detail: this involves checking external’s status. But since Sourcetree.status() and therefore
_External.status() is already called at the very start of checkout_externals, allow it to be efficiently called twice:
Change _External.status() to skip doing work if it was run before.
Make it optional to print out the external names as it does its work.

Also:
sourcetree.py: no longer assumes status() is called before checkout() - checks self._stat and calls status() if needed.
checkout.py: move enormous message into its own helper function

User interface changes?: Yes - checkout now refreshes any local optional components regardless of -o flag.

Fixes: Github issue #155

Testing:
test removed:
unit tests:
system tests:
manual testing: ran with specific component and with no components as arguments.

…aths and path components within an _External.

Also:
  Rename ‘externals’ variables to better reveal their type, e.g. externals_path, ext_description.
  s/model/ext_description/ for consistency.
  Clarify that _External has its own sourcetree for subcomponents.
  Add a __repr__ to ExternalStatus for convenience.
…f whether -o is passed in.

Implementation detail: this involves checking external’s status.  But since Sourcetree.status() and therefore _External.status() is already called at the very start of checkout_externals, allow it to be efficiently called twice:
    Change _External.status() to skip doing work if it was run before.
    Make it optional to print out the external names as it does its work.

Also:
  sourcetree.py: no longer assumes status() is called before checkout() - checks self._stat and calls status() if needed.
  checkout.py: move enormous message into its own helper function
@jedwards4b jedwards4b merged commit 2ea3d1a into ESMCI:master Jan 4, 2023
johnpaulalex added a commit to johnpaulalex/manage_externals_jp that referenced this pull request Jan 9, 2023
Finding locally installed optional components was broken both because it did not correctly inspect the status of those components, and because it added components-to-checkout by path instead of by name.

Printing status updates also a bit wonky because 'print_progress' was not correctly passed down.

Slight update to testing docs:  no need to run python 2 and 3 separately, and system tests now exist.
johnpaulalex added a commit to johnpaulalex/manage_externals_jp that referenced this pull request Jan 9, 2023
Finding locally installed optional components was broken both because it did not correctly inspect the status of those components, and because it added components-to-checkout by path instead of by name.

Printing status updates also a bit wonky because 'print_progress' was not correctly passed down.

Slight update to testing docs:  no need to run python 2 and 3 separately, and system tests now exist.
jedwards4b added a commit that referenced this pull request Jan 9, 2023
Fix broken checkout behavior introduced by PR #172.
@johnpaulalex johnpaulalex deleted the fixit branch February 4, 2023 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants