-
Notifications
You must be signed in to change notification settings - Fork 8
Migrate subsection of vcstools' API for compatibility with bloom #43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
5730d2c
to
650fcd3
Compare
659c3b8
to
5f6ce04
Compare
477c4be
to
d08697b
Compare
5f6ce04
to
e47aac4
Compare
8e32c1a
to
138ad9f
Compare
Signed-off-by: Leander Stephen D'Souza <[email protected]>
Signed-off-by: Leander Stephen D'Souza <[email protected]>
Signed-off-by: Leander Stephen D'Souza <[email protected]>
Signed-off-by: Leander Stephen D'Souza <[email protected]>
Signed-off-by: Leander Stephen D'Souza <[email protected]>
Signed-off-by: Leander Stephen D'Souza <[email protected]>
Signed-off-by: Leander Stephen D'Souza <[email protected]>
Signed-off-by: Leander Stephen D'Souza <[email protected]>
Signed-off-by: Leander Stephen D'Souza <[email protected]>
Signed-off-by: Leander Stephen D'Souza <[email protected]>
Signed-off-by: Leander Stephen D'Souza <[email protected]>
Signed-off-by: Leander Stephen D'Souza <[email protected]>
138ad9f
to
83040dc
Compare
Signed-off-by: Leander Stephen D'Souza <[email protected]>
Signed-off-by: Leander Stephen D'Souza <[email protected]>
Signed-off-by: Leander Stephen D'Souza <[email protected]>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #43 +/- ##
==========================================
+ Coverage 26.98% 28.94% +1.95%
==========================================
Files 31 31
Lines 2238 2477 +239
Branches 392 439 +47
==========================================
+ Hits 604 717 +113
- Misses 1574 1686 +112
- Partials 60 74 +14 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@leander-dsouza, I noticed that some implementations of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks good but for the one comment about the git client which I believe can be simplified dramatically.
|
||
# If current version matches export version and no local changes, export directly | ||
current_sha = self._get_current_version() | ||
export_sha = self._get_version_sha(version) if version else current_sha |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we have an exact version to provide as a commit-ish->tree-ish what is the requirement to use a temp directory. git-archive
does not make any changes to the working directory. I have not gone spelunking in the history but I'm willing to hypothesize that this behavior is carried over from a vcs which does not support exporting archives of snapshots without checking them out first.
git archive --format=tar.gz --output={filepath} export_sha
result['output'] = branch | ||
return result | ||
|
||
def _export_repository(self, version, basepath): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A handful of these are named _export_repository
instead of export_repository
. to match the API. Is that intentional?
Note
Please refer #751 for verifying integration with bloom.
Basic Info
Description of contribution in a few bullet points
This ports over four main functions from vcstools, namely
export_repositories
,checkout
,get_vcs_client
, andget_path
for all the VCS clients.This is because these are the four prominent methods used in bloom as seen here.
checkout
referenceexport_repositories
referenceget_vcs_client
referenceget_path
referenceIn addition, the corresponding integration tests have been added to both of these functions across
svn
,bzr
,hg
, andgit
clients.Breezy has been added to the CI for testing on macOS and Ubuntu.
The integration can be safely verified in #751 at bloom. All the system and unit tests pass upon merge.
Description of how this change was tested
Ran
pytest
locally to ensure all the unit and linting tests pass:pytest -s -v test
Signed-off-by: Leander Stephen Desouza [email protected]