Merge pull request #982 from efiop/master

dvc: print more info for add/run/checkout
This commit is contained in:
Ruslan Kuprieiev
2018-08-07 01:08:36 +03:00
committed by GitHub
3 changed files with 14 additions and 3 deletions
+7 -3
View File
@@ -239,11 +239,11 @@ class RemoteLOCAL(RemoteBase):
if os.path.exists(path):
msg = u'Data \'{}\' exists. Removing before checkout'
Logger.debug(msg.format(os.path.relpath(path)))
Logger.warn(msg.format(os.path.relpath(path)))
remove(path)
msg = u'Checking out \'{}\' with cache \'{}\''
Logger.debug(msg.format(os.path.relpath(path), md5))
msg = u'Checking out \'{}\' with cache \'{}\'.'
Logger.info(msg.format(os.path.relpath(path), md5))
if not self.is_dir_cache(cache):
self.link(cache, path)
@@ -314,6 +314,10 @@ class RemoteLOCAL(RemoteBase):
path = path_info['path']
msg = "Saving '{}' to cache '{}'."
Logger.info(msg.format(os.path.relpath(path),
os.path.relpath(self.cache_dir)))
if os.path.isdir(path):
return self._save_dir(path_info)
else:
+4
View File
@@ -117,6 +117,10 @@ class Git(Base):
if len(filtered) != 0:
return
msg = "Adding '{}' to '{}'.".format(os.path.relpath(path),
os.path.relpath(gitignore))
Logger.info(msg)
content = entry
if len(ignore_list) > 0:
content = '\n' + content
+3
View File
@@ -292,6 +292,9 @@ class Stage(object):
if not fname:
fname = self.path
msg = "Saving information to '{}'.".format(os.path.relpath(fname))
Logger.info(msg)
with open(fname, 'w') as fd:
yaml.safe_dump(self.dumpd(), fd, default_flow_style=False)