output: drop update() method

Signed-off-by: Ruslan Kuprieiev <[email protected]>
This commit is contained in:
Ruslan Kuprieiev
2018-02-06 14:35:40 +02:00
parent 6e05da019f
commit e4f83cb1f8
2 changed files with 4 additions and 9 deletions
+3 -7
View File
@@ -90,7 +90,7 @@ class Dependency(object):
def inode(self):
return os.stat(self.path).st_ino
def update(self):
def save(self):
if not os.path.exists(self.path):
raise CmdOutputDoesNotExistError(self.rel_path)
@@ -239,17 +239,13 @@ class Output(Dependency):
self.hardlink(cache, path)
def save(self):
super(Output, self).save()
if not self.use_cache:
return
self.project.logger.debug("Saving {} to {}".format(self.path, self.cache))
if not os.path.exists(self.path):
raise CmdOutputDoesNotExistError(self.rel_path)
if not os.path.isfile(self.path) and not os.path.isdir(self.path):
raise CmdOutputIsNotFileOrDirError(self.rel_path)
if self.project.scm.is_tracked(self.path):
raise CmdOutputAlreadyTrackedError(self.rel_path)
+1 -2
View File
@@ -149,10 +149,9 @@ class Stage(object):
def save(self):
for dep in self.deps:
dep.update()
dep.save()
for out in self.outs:
out.update()
out.save()
if out.use_cache:
self.project.scm.ignore(out.path)