Skip to content

Conversation

@karajan1001
Copy link
Contributor

fix: #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.

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:
@karajan1001 karajan1001 requested a review from pmrowla April 15, 2022 05:04
logger = logging.getLogger(__name__)


class SyncStatus(Enum):
Copy link
Contributor Author

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]:
Copy link
Contributor

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]

@karajan1001 karajan1001 force-pushed the fix58 branch 2 times, most recently from 1f5b150 to e2a39e4 Compare April 15, 2022 11:04
Copy link
Contributor

@pmrowla pmrowla left a 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

karajan1001 and others added 3 commits April 25, 2022 16:13
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>
@karajan1001 karajan1001 merged commit 8fa74bb into treeverse:main Apr 25, 2022
@efiop
Copy link
Contributor

efiop commented Apr 28, 2022

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.

@karajan1001 karajan1001 deleted the fix58 branch April 29, 2022 06:42
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.

Update on push_refspec and fetch_refspec

3 participants