Commit 1b48d5b9 authored by Jim Fulton's avatar Jim Fulton

Do gc if there is no base storage.

parent 86d846e0
...@@ -194,7 +194,17 @@ class DemoStorage(object): ...@@ -194,7 +194,17 @@ class DemoStorage(object):
return oid return oid
def pack(self, t, referencesf, gc=False): def pack(self, t, referencesf, gc=None):
if gc is None:
if self._temporary_base:
return self.changes.pack(t, referencesf)
elif self._temporary_base:
return self.changes.pack(t, referencesf, gc=gc)
elif gc:
raise TypeError(
"Garbage collection isn't supported"
" when there is a base storage.")
try: try:
self.changes.pack(t, referencesf, gc=False) self.changes.pack(t, referencesf, gc=False)
except TypeError, v: except TypeError, v:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment