-
Notifications
You must be signed in to change notification settings - Fork 15
Update on push_refspec and fetch_refspec (#58) #59
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
Conversation
fix: treeverse#58 1. Unify the API of `push_refspec` and `fetch_refspec`. 2. Can push multi `refspec` for one time. 3. No repository Error handle for `fetch_refspec` 4. Now the `push_refspec` and `fetch_refspec` will return the status for each refspec. Co-authored-by:
| logger = logging.getLogger(__name__) | ||
|
|
||
|
|
||
| class SyncStatus(Enum): |
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.
Not sure if there are better solutions for returning the status of push/pull
| progress: Callable[["GitProgressEvent"], None] = None, | ||
| **kwargs, | ||
| ): | ||
| ) -> Mapping[str, int]: |
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.
SyncStatus should also be defined in base.py, and this should be Mapping[str, SyncStatus]
1f5b150 to
e2a39e4
Compare
09f75ee to
89dcf4b
Compare
pmrowla
left a comment
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 couple minor fixes but otherwise LGTM
1. rename `push_refspec` to `push_refspecs` as it can receive a list of refspecs 2. Move SyncEnum to base.py 3. Modify abstract methods args of `push_refspecs` and `fetch_refspecs` to match the new api.
Co-authored-by: Peter Rowlands (변기호) <peter@pmrowla.com>
|
There seem to be different names in scmrepo and in dvc. We have push_refspecs here, while we use push_refspec (without s) at the end in dvc. |
fix: #58
push_refspecandfetch_refspec.refspecfor one time.fetch_refspecpush_refspecandfetch_refspecwill return the status for each refspec.