فهرست منبع

add comment about unused recreate_* members in ArchiveItem

Thomas Waldmann 6 سال پیش
والد
کامیت
58f177aa82
3فایلهای تغییر یافته به همراه7 افزوده شده و 4 حذف شده
  1. 3 1
      src/borg/constants.py
  2. 1 1
      src/borg/helpers/checks.py
  3. 3 2
      src/borg/item.pyx

+ 3 - 1
src/borg/constants.py

@@ -10,7 +10,9 @@ REQUIRED_ITEM_KEYS = frozenset(['path', 'mtime', ])
 # this set must be kept complete, otherwise rebuild_manifest might malfunction:
 # this set must be kept complete, otherwise rebuild_manifest might malfunction:
 ARCHIVE_KEYS = frozenset(['version', 'name', 'items', 'cmdline', 'hostname', 'username', 'time', 'time_end',
 ARCHIVE_KEYS = frozenset(['version', 'name', 'items', 'cmdline', 'hostname', 'username', 'time', 'time_end',
                           'comment', 'chunker_params',
                           'comment', 'chunker_params',
-                          'recreate_cmdline', 'recreate_source_id', 'recreate_args', 'recreate_partial_chunks',])
+                          'recreate_cmdline',
+                          'recreate_source_id', 'recreate_args', 'recreate_partial_chunks',  # used in 1.1.0b1 .. b2
+                          ])
 
 
 # this is the set of keys that are always present in archives:
 # this is the set of keys that are always present in archives:
 REQUIRED_ARCHIVE_KEYS = frozenset(['version', 'name', 'items', 'cmdline', 'time', ])
 REQUIRED_ARCHIVE_KEYS = frozenset(['version', 'name', 'items', 'cmdline', 'time', ])

+ 1 - 1
src/borg/helpers/checks.py

@@ -35,5 +35,5 @@ def check_extension_modules():
         raise ExtensionModuleError
         raise ExtensionModuleError
     if platform.API_VERSION != platform.OS_API_VERSION or platform.API_VERSION != '1.2_03':
     if platform.API_VERSION != platform.OS_API_VERSION or platform.API_VERSION != '1.2_03':
         raise ExtensionModuleError
         raise ExtensionModuleError
-    if item.API_VERSION != '1.1_04':
+    if item.API_VERSION != '1.1_05':
         raise ExtensionModuleError
         raise ExtensionModuleError

+ 3 - 2
src/borg/item.pyx

@@ -12,7 +12,7 @@ cdef extern from "_item.c":
     object _optr_to_object(object bytes)
     object _optr_to_object(object bytes)
 
 
 
 
-API_VERSION = '1.1_04'
+API_VERSION = '1.1_05'
 
 
 
 
 class PropDict:
 class PropDict:
@@ -363,8 +363,9 @@ class ArchiveItem(PropDict):
     time_end = PropDict._make_property('time_end', str, 'surrogate-escaped str', encode=safe_encode, decode=safe_decode)
     time_end = PropDict._make_property('time_end', str, 'surrogate-escaped str', encode=safe_encode, decode=safe_decode)
     comment = PropDict._make_property('comment', str, 'surrogate-escaped str', encode=safe_encode, decode=safe_decode)
     comment = PropDict._make_property('comment', str, 'surrogate-escaped str', encode=safe_encode, decode=safe_decode)
     chunker_params = PropDict._make_property('chunker_params', tuple, 'chunker-params tuple', encode=tuple_encode, decode=tuple_decode)
     chunker_params = PropDict._make_property('chunker_params', tuple, 'chunker-params tuple', encode=tuple_encode, decode=tuple_decode)
-    recreate_source_id = PropDict._make_property('recreate_source_id', bytes)
     recreate_cmdline = PropDict._make_property('recreate_cmdline', list)  # list of s-e-str
     recreate_cmdline = PropDict._make_property('recreate_cmdline', list)  # list of s-e-str
+    # recreate_source_id, recreate_args, recreate_partial_chunks were used in 1.1.0b1 .. b2
+    recreate_source_id = PropDict._make_property('recreate_source_id', bytes)
     recreate_args = PropDict._make_property('recreate_args', list)  # list of s-e-str
     recreate_args = PropDict._make_property('recreate_args', list)  # list of s-e-str
     recreate_partial_chunks = PropDict._make_property('recreate_partial_chunks', list)  # list of tuples
     recreate_partial_chunks = PropDict._make_property('recreate_partial_chunks', list)  # list of tuples