Mercurial > hg-git
changeset 1093:8e61d7a29932
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.
author | Sean Farley <sean@farley.io> |
---|---|
date | Mon, 27 Nov 2017 17:47:14 -0500 |
parents | 3799bf885c1d |
children | 5e49230a6cd5 |
files | hggit/compat.py |
diffstat | 1 files changed, 10 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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