mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
@@ -248,6 +248,10 @@ class Project(object):
|
||||
outs=[f],
|
||||
add=True)
|
||||
|
||||
if stage is None:
|
||||
stages.append(stage)
|
||||
continue
|
||||
|
||||
self._check_output_duplication(stage.outs, all_stages)
|
||||
|
||||
stage.save()
|
||||
@@ -414,6 +418,9 @@ class Project(object):
|
||||
deps=[url],
|
||||
outs=[out])
|
||||
|
||||
if stage is None:
|
||||
return None
|
||||
|
||||
self._check_output_duplication(stage.outs, self.stages())
|
||||
self._check_circular_dependency(stage.deps, stage.outs)
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import os
|
||||
import stat
|
||||
import time
|
||||
import shutil
|
||||
import filecmp
|
||||
|
||||
@@ -113,6 +114,9 @@ class TestAddModifiedDir(TestDvc):
|
||||
self.assertEqual(len(stages), 1)
|
||||
self.assertTrue(stages[0] is not None)
|
||||
os.unlink(self.DATA)
|
||||
|
||||
time.sleep(2)
|
||||
|
||||
stages = self.dvc.add(self.DATA_DIR)
|
||||
self.assertEqual(len(stages), 1)
|
||||
self.assertTrue(stages[0] is not None)
|
||||
|
||||
Reference in New Issue
Block a user