dvc: use hardlinks instead of symlinks

Fixes #225
Fixes #273

Signed-off-by: Ruslan Kuprieiev <[email protected]>
This commit is contained in:
Ruslan Kuprieiev
2017-10-30 05:05:28 +02:00
parent 1ef90c882e
commit a813ebaeb7
10 changed files with 57 additions and 98 deletions
+11
View File
@@ -96,6 +96,17 @@ class GitWrapperI(object):
def commit_all_changes_and_log_status(self, message):
pass
@staticmethod
def modify_gitignore(flist):
for fname in flist:
# We're modifying .gitignore in the same dir as the file itself, so
# that if dir consists only of data files it will be still tracked by
# git and we will not have any problems with --porcelain output for
# specific changed files.
gitignore = os.path.join(os.path.dirname(fname), '.gitignore')
with open(gitignore, 'a') as fd:
fd.write('\n' + os.path.basename(fname))
class GitWrapper(GitWrapperI):
FLOATS_FROM_STRING = re.compile(r'[-+]?(?:(?:\d*\.\d+)|(?:\d+\.?))(?:[Ee][+-]?\d+)?')