# HG changeset patch # User Sean Farley # Date 1511822834 18000 # Node ID 8e61d7a29932b028927e8f2eec8748545e0b64fa # Parent 3799bf885c1de6fb932f4d46077bde72ae702abc compat: add a stub FetchPackResult class for use with older dulwich New dulwich refactored the object it returns from fetch_pack (it use to be a dict but is now an object of two dicts, one for ref and the other for symrefs, and a string containing the agent. diff -r 3799bf885c1d -r 8e61d7a29932 hggit/compat.py --- a/hggit/compat.py Mon Nov 27 17:45:51 2017 -0500 +++ b/hggit/compat.py Mon Nov 27 17:47:14 2017 -0500 @@ -63,7 +63,17 @@ from dulwich.errors import GitProtocolError from dulwich.protocol import extract_capabilities + class FetchPackResult(object): + """Result of a fetch-pack operation. + :var refs: Dictionary with all remote refs + :var symrefs: Dictionary with remote symrefs + :var agent: User agent string + """ + def __init__(self, refs, symrefs, agent): + self.refs = refs + self.symrefs = symrefs + self.agent = agent def read_pkt_refs(proto): server_capabilities = None