Beispiel #1
0
    def __init__(self, thin_packs=True, report_activity=None, quiet=False):
        """Create a new GitClient instance.

        :param thin_packs: Whether or not thin packs should be retrieved
        :param report_activity: Optional callback for reporting transport
            activity.
        """
        self._report_activity = report_activity
        self._report_status_parser = None
        self._fetch_capabilities = set(FETCH_CAPABILITIES)
        self._fetch_capabilities.add(capability_agent())
        self._send_capabilities = set(SEND_CAPABILITIES)
        self._send_capabilities.add(capability_agent())
        if quiet:
            self._send_capabilities.add(CAPABILITY_QUIET)
        if not thin_packs:
            self._fetch_capabilities.remove(CAPABILITY_THIN_PACK)
Beispiel #2
0
 def innocuous_capabilities(cls):
     return (
         CAPABILITY_INCLUDE_TAG,
         CAPABILITY_THIN_PACK,
         CAPABILITY_NO_PROGRESS,
         CAPABILITY_OFS_DELTA,
         capability_agent(),
     )
Beispiel #3
0
 def innocuous_capabilities(cls) -> Iterable[bytes]:
     return [
         CAPABILITY_INCLUDE_TAG, CAPABILITY_THIN_PACK,
         CAPABILITY_NO_PROGRESS, CAPABILITY_OFS_DELTA,
         capability_agent()
     ]
Beispiel #4
0
 def innocuous_capabilities(cls):
     return (CAPABILITY_INCLUDE_TAG, CAPABILITY_THIN_PACK,
             CAPABILITY_NO_PROGRESS, CAPABILITY_OFS_DELTA,
             capability_agent())