a ø+yW) ã@s6dZddlmZddlmZmZGdd„dejƒZdS)z=Import processor that queries the input (and doesn't import).é)Úprint_function)ÚcommandsÚ processorc@sleZdZdZejejdgZddd„Zdd„Z d d „Z d d „Z d d„Z dd„Z dd„Zdd„Zdd„ZdS)ÚQueryProcessorzdAn import processor that queries the input. No changes to the current repository are made. s commit-markNFcCsvtj |||¡i|_d|_d|_|rrd|vr>|d|_|d=| ¡D]*\}}|dkr\d}n | d¡}||j|<qFdS)NFz commit-markéú,)rÚImportProcessorÚ__init__Ú parsed_paramsÚinteresting_commitÚ _finishedÚitemsÚsplit)ÚselfÚparamsÚverboseÚnameÚvalueÚfields©rúG/usr/lib/python3/dist-packages/fastimport/processors/query_processor.pyr &s  zQueryProcessor.__init__cCsx|jr dS|jr<|jdkr<|j|jkr8t| ¡ƒd|_dS|j|jvrt|j|j}| ||j|j¡}td|fƒdS)z*Hook for logic before each handler starts.NZcommitTz%s) r r rZmarkÚprintZ to_stringr Zdump_strr)rÚcmdrÚstrrrrÚ pre_handler7s    zQueryProcessor.pre_handlercCsdS)zProcess a ProgressCommand.Nr©rrrrrÚprogress_handlerEszQueryProcessor.progress_handlercCsdS)zProcess a BlobCommand.NrrrrrÚ blob_handlerIszQueryProcessor.blob_handlercCsdS)zProcess a CheckpointCommand.NrrrrrÚcheckpoint_handlerMsz!QueryProcessor.checkpoint_handlercCsdS)zProcess a CommitCommand.NrrrrrÚcommit_handlerQszQueryProcessor.commit_handlercCsdS)zProcess a ResetCommand.NrrrrrÚ reset_handlerUszQueryProcessor.reset_handlercCsdS)zProcess a TagCommand.NrrrrrÚ tag_handlerYszQueryProcessor.tag_handlercCs$|j}|tjvr | d|f¡dS)zProcess a FeatureCommand.z.feature %s is not supported - parsing may failN)Z feature_namerZ FEATURE_NAMESZwarning)rrZfeaturerrrÚfeature_handler]s  ÿzQueryProcessor.feature_handler)NF)Ú__name__Ú __module__Ú __qualname__Ú__doc__rZ COMMAND_NAMESZFILE_COMMAND_NAMESZ known_paramsr rrrrrr r!r"rrrrrs ÿþÿ rN)r&Z __future__rZ fastimportrrrrrrrrÚs