From ec18b4bac4f3c0760c26e83b8ade01ad1c815a9b Mon Sep 17 00:00:00 2001 From: "Shawn O. Pearce" Date: Tue, 11 Nov 2008 18:45:55 -0800 Subject: [PATCH] Update proto client to support patch set replacments Signed-off-by: Shawn O. Pearce --- codereview/__init__.py | 2 +- codereview/upload_bundle_pb2.py | 59 ++++++++++++++++++++++++++++++--- 2 files changed, 55 insertions(+), 6 deletions(-) diff --git a/codereview/__init__.py b/codereview/__init__.py index d991afa2..82216880 100644 --- a/codereview/__init__.py +++ b/codereview/__init__.py @@ -1 +1 @@ -__version__ = 'v1.0-69-gd1f8508c' +__version__ = 'v1.0-99-g9cd3ea2f' diff --git a/codereview/upload_bundle_pb2.py b/codereview/upload_bundle_pb2.py index 48c36512..7cf2f86e 100644 --- a/codereview/upload_bundle_pb2.py +++ b/codereview/upload_bundle_pb2.py @@ -27,23 +27,31 @@ _UPLOADBUNDLERESPONSE_CODETYPE = descriptor.EnumDescriptor( options=None, type=None), descriptor.EnumValueDescriptor( - name='UNKNOWN_PROJECT', index=3, number=2, + name='UNKNOWN_CHANGE', index=3, number=9, options=None, type=None), descriptor.EnumValueDescriptor( - name='UNKNOWN_BRANCH', index=4, number=3, + name='CHANGE_CLOSED', index=4, number=10, options=None, type=None), descriptor.EnumValueDescriptor( - name='UNKNOWN_BUNDLE', index=5, number=5, + name='UNKNOWN_PROJECT', index=5, number=2, options=None, type=None), descriptor.EnumValueDescriptor( - name='NOT_BUNDLE_OWNER', index=6, number=6, + name='UNKNOWN_BRANCH', index=6, number=3, options=None, type=None), descriptor.EnumValueDescriptor( - name='BUNDLE_CLOSED', index=7, number=8, + name='UNKNOWN_BUNDLE', index=7, number=5, + options=None, + type=None), + descriptor.EnumValueDescriptor( + name='NOT_BUNDLE_OWNER', index=8, number=6, + options=None, + type=None), + descriptor.EnumValueDescriptor( + name='BUNDLE_CLOSED', index=9, number=8, options=None, type=None), ], @@ -51,6 +59,35 @@ _UPLOADBUNDLERESPONSE_CODETYPE = descriptor.EnumDescriptor( ) +_REPLACEPATCHSET = descriptor.Descriptor( + name='ReplacePatchSet', + full_name='codereview.ReplacePatchSet', + filename='upload_bundle.proto', + containing_type=None, + fields=[ + descriptor.FieldDescriptor( + name='change_id', full_name='codereview.ReplacePatchSet.change_id', index=0, + number=1, type=9, cpp_type=9, label=2, + default_value=unicode("", "utf-8"), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + descriptor.FieldDescriptor( + name='object_id', full_name='codereview.ReplacePatchSet.object_id', index=1, + number=2, type=9, cpp_type=9, label=2, + default_value=unicode("", "utf-8"), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], # TODO(robinson): Implement. + enum_types=[ + ], + options=None) + + _UPLOADBUNDLEREQUEST = descriptor.Descriptor( name='UploadBundleRequest', full_name='codereview.UploadBundleRequest', @@ -92,6 +129,13 @@ _UPLOADBUNDLEREQUEST = descriptor.Descriptor( message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), + descriptor.FieldDescriptor( + name='replace', full_name='codereview.UploadBundleRequest.replace', index=5, + number=2, type=11, cpp_type=10, label=3, + default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), ], extensions=[ ], @@ -174,8 +218,13 @@ _UPLOADBUNDLECONTINUE = descriptor.Descriptor( options=None) +_UPLOADBUNDLEREQUEST.fields_by_name['replace'].message_type = _REPLACEPATCHSET _UPLOADBUNDLERESPONSE.fields_by_name['status_code'].enum_type = _UPLOADBUNDLERESPONSE_CODETYPE +class ReplacePatchSet(message.Message): + __metaclass__ = reflection.GeneratedProtocolMessageType + DESCRIPTOR = _REPLACEPATCHSET + class UploadBundleRequest(message.Message): __metaclass__ = reflection.GeneratedProtocolMessageType DESCRIPTOR = _UPLOADBUNDLEREQUEST