mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-05 23:09:32 +01:00
+3
-2
@@ -2,12 +2,11 @@ from __future__ import unicode_literals
|
||||
|
||||
import os
|
||||
import shutil
|
||||
from git.cmd import Git
|
||||
|
||||
import dvc.logger as logger
|
||||
from dvc.exceptions import DvcException
|
||||
from dvc.stage import Stage
|
||||
from dvc.temp_git_repo import TempGitRepo
|
||||
from dvc.scm.git.temp_git_repo import TempGitRepo
|
||||
|
||||
|
||||
class PackageParams(object):
|
||||
@@ -60,6 +59,8 @@ class GitPackage(Package):
|
||||
DEF_DVC_FILE_PREFIX = "mod_"
|
||||
|
||||
def install_or_update(self, parent_repo, pkg_params):
|
||||
from git.cmd import Git
|
||||
|
||||
if not self.is_in_root():
|
||||
raise DvcException(
|
||||
"This command can be run only from a repository root"
|
||||
|
||||
@@ -2,8 +2,6 @@ import os
|
||||
import shutil
|
||||
import tempfile
|
||||
|
||||
import git
|
||||
|
||||
from dvc import logger
|
||||
from dvc.exceptions import DvcException
|
||||
|
||||
@@ -70,6 +68,8 @@ class TempGitRepo(object):
|
||||
return self
|
||||
|
||||
def _clone_to_temp_dir(self):
|
||||
import git
|
||||
|
||||
result = tempfile.mktemp(
|
||||
prefix=self._tmp_mod_prefix, dir=self.modules_dir
|
||||
)
|
||||
Reference in New Issue
Block a user