Improvements to the SQlite-based local status folder

* Do not inherit LocalStatusSQLiteFolder class from the plaintext
    one.

  * Use some functions already in BaseFolder in both, plaintext and
    sqlite classes.

  * Add a saveall method. The idea is that saveall dumps the entire
    messagelist to disk, while save only commits the uncommited
    changes. Right now, save is noop for sqlite, and equivalent to
    saveall for plaintext, but it enables to be more clever on when we
    commit to disk in the future.

Signed-off-by: Eygene Ryabinkin <rea@codelabs.ru>
This commit is contained in:
Abdo Roig-Maranges
2013-07-28 13:58:30 +02:00
committed by Eygene Ryabinkin
parent 09556d645e
commit 214137eb7b
3 changed files with 63 additions and 24 deletions

View File

@ -36,6 +36,7 @@ class BaseFolder(object):
# Save original name for folderfilter operations
self.ffilter_name = name
# Top level dir name is always ''
self.root = None
self.name = name if not name == self.getsep() else ''
self.repository = repository
self.visiblename = repository.nametrans(name)