filemanip: back up all files with git.
This includes the checksum, lock, version, and schema files. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
This commit is contained in:
parent
bae44f4791
commit
dce0800a7d
1 changed files with 5 additions and 0 deletions
|
|
@ -144,7 +144,12 @@ class GitTransactionStore(TransactionStore):
|
|||
def commit_close(self):
|
||||
with self.DirectoryChanger(self._prefix) as dc:
|
||||
if "w" in self._mode:
|
||||
potentials = [self._name + ".checksum", "lock", "version",
|
||||
"schema"]
|
||||
self._call_git("add", self._name)
|
||||
for f in potentials:
|
||||
if os.access(f, os.F_OK):
|
||||
self._call_git("add", f)
|
||||
now = datetime.datetime.utcnow()
|
||||
message = "Snapshot of " + self._name + " as of "
|
||||
message += "{:%Y-%m-%d %H:%M:%S} UTC".format(now)
|
||||
|
|
|
|||
Loading…
Reference in a new issue