gitignore: Add temporary SQLite files (#1322)

Fix #1319
This commit is contained in:
Mr. Outis
2018-11-13 19:29:21 -06:00
committed by GitHub
parent 55eadba0ec
commit 88ed542b94
3 changed files with 16 additions and 5 deletions
+2
View File
@@ -6,3 +6,5 @@ updater
cache
state
state.lock
state-journal
state-wal
+6 -4
View File
@@ -131,10 +131,12 @@ class Project(object):
shutil.rmtree(self.dvc_dir)
def _ignore(self):
flist = [self.state.state_file,
self.lock.lock_file,
self.config.config_local_file,
self.updater.updater_file]
flist = [
self.state.state_file,
self.lock.lock_file,
self.config.config_local_file,
self.updater.updater_file,
] + self.state.temp_files
if self.cache.local.cache_dir.startswith(self.root_dir):
flist += [self.cache.local.cache_dir]
+7
View File
@@ -57,6 +57,13 @@ class State(object):
return
self.state_file = os.path.join(self.dvc_dir, self.STATE_FILE)
# https://www.sqlite.org/tempfiles.html
self.temp_files = [
self.state_file + '-journal',
self.state_file + '-wal',
]
self.db = None
self.c = None
self.inserts = 0