summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2016-07-18 19:17:06 +0300
committerLars Wirzenius <liw@liw.fi>2016-07-18 19:17:06 +0300
commit31ae4cf5e903a9df4b6bee1a28d0c58c09afb029 (patch)
tree73a03b1697b0c33d57c6906b0bcf2c0c7c040342
parentac900fd4f25b8b87c961d2add0321fac70a90b5c (diff)
downloadobnam-31ae4cf5e903a9df4b6bee1a28d0c58c09afb029.tar.gz
Version the format id for green albatross
-rw-r--r--NEWS12
-rw-r--r--obnamlib/__init__.py1
-rw-r--r--obnamlib/app.py7
-rw-r--r--obnamlib/fmt_ga/__init__.py3
-rw-r--r--obnamlib/fmt_ga/format.py5
5 files changed, 19 insertions, 9 deletions
diff --git a/NEWS b/NEWS
index 0732518f..2dff53bb 100644
--- a/NEWS
+++ b/NEWS
@@ -4,13 +4,19 @@ Obnam NEWS
This file summarizes changes between releases of Obnam.
NOTE: Obnam has an **EXPERIMENTAL** repository format under
-development, called `green-albatross`. It is **NOT** meant for real
-use. It is likely to change in incompatible ways without warning. Do
-not use it unless you're willing to lose your backup.
+development, called `green-albatross-YYYYMMDD`. It is **NOT** meant
+for real use. It is likely to change in incompatible ways without
+warning. Do not use it unless you're willing to lose your backup.
Version 1.20, not yet released
---------------------------------
+* The format name for `green-albatross` is renamed to
+ `green-albatross-20160718` and will henceforth be renamed every time
+ there's a change, to avoid confusing Lars because of backwards
+ incompatibilities. When it reaches stability and the on-disk format
+ is frozen, it'll be renamed back to a date-less version.
+
* Those using the experimental green-albatross repository format will
have to start over with fresh repositories. This release contains
backwards incompatible changes that mean existing repositories no
diff --git a/obnamlib/__init__.py b/obnamlib/__init__.py
index 48ebe95e..ee5f5516 100644
--- a/obnamlib/__init__.py
+++ b/obnamlib/__init__.py
@@ -176,6 +176,7 @@ from .backup_progress import BackupProgress
#
from .fmt_ga import (
+ GREEN_ALBATROSS_VERSION,
RepositoryFormatGA,
GAClientList,
GAClient,
diff --git a/obnamlib/app.py b/obnamlib/app.py
index b8493775..362ecf58 100644
--- a/obnamlib/app.py
+++ b/obnamlib/app.py
@@ -88,8 +88,9 @@ class App(cliapp.Application):
self.settings.choice(
['repository-format'],
- ['6', 'green-albatross'],
- 'use FORMAT for new repositories; one of "6", "green-albatross"',
+ ['6', obnamlib.GREEN_ALBATROSS_VERSION],
+ 'use FORMAT for new repositories; '
+ 'one of "6", "{}"'.format(obnamlib.GREEN_ALBATROSS_VERSION),
metavar='FORMAT')
algos = list(obnamlib.checksum_algorithms)
@@ -285,7 +286,7 @@ class App(cliapp.Application):
def get_default_repository_class(self):
classes = {
'6': obnamlib.RepositoryFormat6,
- 'green-albatross': obnamlib.RepositoryFormatGA,
+ obnamlib.GREEN_ALBATROSS_VERSION: obnamlib.RepositoryFormatGA,
}
return classes[self.settings['repository-format']]
diff --git a/obnamlib/fmt_ga/__init__.py b/obnamlib/fmt_ga/__init__.py
index dc710d5c..0546458d 100644
--- a/obnamlib/fmt_ga/__init__.py
+++ b/obnamlib/fmt_ga/__init__.py
@@ -15,11 +15,10 @@
#
# =*= License: GPL-3+ =*=
-
from .client_list import GAClientList
from .chunk_store import GAChunkStore
from .indexes import GAChunkIndexes
from .dirobj import GADirectory, GAImmutableError, create_gadirectory_from_dict
from .tree import GATree
from .client import GAClient
-from .format import RepositoryFormatGA
+from .format import RepositoryFormatGA, GREEN_ALBATROSS_VERSION
diff --git a/obnamlib/fmt_ga/format.py b/obnamlib/fmt_ga/format.py
index 7fd3b83f..046187a8 100644
--- a/obnamlib/fmt_ga/format.py
+++ b/obnamlib/fmt_ga/format.py
@@ -19,9 +19,12 @@
import obnamlib
+GREEN_ALBATROSS_VERSION = 'green-albatross-20160718'
+
+
class RepositoryFormatGA(obnamlib.RepositoryDelegator):
- format = 'green-albatross'
+ format = GREEN_ALBATROSS_VERSION
def __init__(self, **kwargs):
obnamlib.RepositoryDelegator.__init__(self, **kwargs)