aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/storage/__init__.py
diff options
context:
space:
mode:
authorW. Trevor King <wking@drexel.edu>2009-12-27 16:30:54 -0500
committerW. Trevor King <wking@drexel.edu>2009-12-27 16:30:54 -0500
commitdff704764d77bffbf6cc94c5ba4bb03309da45f8 (patch)
tree3d0287d30718224903e3737545cbc970f3bdc898 /libbe/storage/__init__.py
parent214c4317bb90684dcfdab4d2402daa66fbad2e77 (diff)
downloadbugseverywhere-dff704764d77bffbf6cc94c5ba4bb03309da45f8.tar.gz
Added storage.Storage.storage_version() and command.InvalidStorageVersion.
Now commands automatically check for storage version compatibility.
Diffstat (limited to 'libbe/storage/__init__.py')
-rw-r--r--libbe/storage/__init__.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/libbe/storage/__init__.py b/libbe/storage/__init__.py
index c58ec34..104b1e1 100644
--- a/libbe/storage/__init__.py
+++ b/libbe/storage/__init__.py
@@ -10,6 +10,17 @@ NotWriteable = base.NotWriteable
NotReadable = base.NotReadable
EmptyCommit = base.EmptyCommit
+# a list of all past versions
+STORAGE_VERSIONS = ['Bugs Everywhere Tree 1 0',
+ 'Bugs Everywhere Directory v1.1',
+ 'Bugs Everywhere Directory v1.2',
+ 'Bugs Everywhere Directory v1.3',
+ 'Bugs Everywhere Directory v1.4',
+ ]
+
+# the current version
+STORAGE_VERSION = STORAGE_VERSIONS[-1]
+
def get_storage(location):
"""
Return a Storage instance from a repo location string.
@@ -21,4 +32,5 @@ def get_storage(location):
__all__ = [ConnectionError, InvalidID, InvalidRevision,
InvalidDirectory, NotWriteable, NotReadable,
- EmptyCommit, get_storage]
+ EmptyCommit, STORAGE_VERSIONS, STORAGE_VERSION,
+ get_storage]