mercurial/wireprototypes.py
changeset 37613 96d735601ca1
parent 37612 5e71dea79aae
child 37644 77c9ee77687c
--- a/mercurial/wireprototypes.py	Wed Apr 11 10:50:58 2018 -0700
+++ b/mercurial/wireprototypes.py	Wed Apr 11 10:51:38 2018 -0700
@@ -134,6 +134,30 @@
             .replace(':o', ',')
             .replace(':c', ':'))
 
+# mapping of options accepted by getbundle and their types
+#
+# Meant to be extended by extensions. It is extensions responsibility to ensure
+# such options are properly processed in exchange.getbundle.
+#
+# supported types are:
+#
+# :nodes: list of binary nodes
+# :csv:   list of comma-separated values
+# :scsv:  list of comma-separated values return as set
+# :plain: string with no transformation needed.
+GETBUNDLE_ARGUMENTS = {
+    'heads':  'nodes',
+    'bookmarks': 'boolean',
+    'common': 'nodes',
+    'obsmarkers': 'boolean',
+    'phases': 'boolean',
+    'bundlecaps': 'scsv',
+    'listkeys': 'csv',
+    'cg': 'boolean',
+    'cbattempted': 'boolean',
+    'stream': 'boolean',
+}
+
 class baseprotocolhandler(zi.Interface):
     """Abstract base class for wire protocol handlers.