Show More
@@ -147,6 +147,9 b' def _processchangesetdata(repo, tr, objs' | |||||
147 | for mark in cset.get(b'bookmarks', []): |
|
147 | for mark in cset.get(b'bookmarks', []): | |
148 | remotebookmarks[mark] = node |
|
148 | remotebookmarks[mark] = node | |
149 |
|
149 | |||
|
150 | # TODO add mechanism for extensions to examine records so they | |||
|
151 | # can siphon off custom data fields. | |||
|
152 | ||||
150 | # Some entries might only be metadata only updates. |
|
153 | # Some entries might only be metadata only updates. | |
151 | if b'revisionsize' not in cset: |
|
154 | if b'revisionsize' not in cset: | |
152 | continue |
|
155 | continue |
@@ -397,6 +397,8 b' def _capabilitiesv2(repo, proto):' | |||||
397 | 'framingmediatypes': [FRAMINGTYPE], |
|
397 | 'framingmediatypes': [FRAMINGTYPE], | |
398 | } |
|
398 | } | |
399 |
|
399 | |||
|
400 | # TODO expose available changesetdata fields. | |||
|
401 | ||||
400 | for command, entry in COMMANDS.items(): |
|
402 | for command, entry in COMMANDS.items(): | |
401 | caps['commands'][command] = { |
|
403 | caps['commands'][command] = { | |
402 | 'args': entry.args, |
|
404 | 'args': entry.args, | |
@@ -474,6 +476,8 b' def capabilitiesv2(repo, proto):' | |||||
474 | def changesetdata(repo, proto, noderange=None, nodes=None, fields=None): |
|
476 | def changesetdata(repo, proto, noderange=None, nodes=None, fields=None): | |
475 | fields = fields or set() |
|
477 | fields = fields or set() | |
476 |
|
478 | |||
|
479 | # TODO look for unknown fields and abort when they can't be serviced. | |||
|
480 | ||||
477 | if noderange is None and nodes is None: |
|
481 | if noderange is None and nodes is None: | |
478 | raise error.WireprotoCommandError( |
|
482 | raise error.WireprotoCommandError( | |
479 | 'noderange or nodes must be defined') |
|
483 | 'noderange or nodes must be defined') | |
@@ -563,6 +567,9 b' def changesetdata(repo, proto, noderange' | |||||
563 | revisiondata = cl.revision(node, raw=True) |
|
567 | revisiondata = cl.revision(node, raw=True) | |
564 | d[b'revisionsize'] = len(revisiondata) |
|
568 | d[b'revisionsize'] = len(revisiondata) | |
565 |
|
569 | |||
|
570 | # TODO make it possible for extensions to wrap a function or register | |||
|
571 | # a handler to service custom fields. | |||
|
572 | ||||
566 | yield d |
|
573 | yield d | |
567 |
|
574 | |||
568 | if revisiondata is not None: |
|
575 | if revisiondata is not None: |
General Comments 0
You need to be logged in to leave comments.
Login now