mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
dvc: remove unused code
A bunch of leftovers from a very old pkg implementation.
This commit is contained in:
@@ -138,11 +138,6 @@ class OutputBase(object):
|
||||
def dir_cache(self):
|
||||
return self.cache.get_dir_cache(self.checksum)
|
||||
|
||||
def assign_to_stage_file(self, target_repo):
|
||||
raise DvcException(
|
||||
"change repo is not supported for {}".format(self.scheme)
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def supported(cls, url):
|
||||
return cls.REMOTE.supported(url)
|
||||
|
||||
@@ -47,20 +47,6 @@ class OutputLOCAL(OutputBase):
|
||||
def_scheme = urlparse(self.def_path).scheme
|
||||
return def_scheme != "remote" and not os.path.isabs(self.def_path)
|
||||
|
||||
def assign_to_stage_file(self, stage):
|
||||
from dvc.repo import Repo
|
||||
|
||||
# Make path info the same but relative to passed stage
|
||||
rel_path = self.path_info.relpath(self.stage.wdir)
|
||||
self.path_info = (
|
||||
self.REMOTE.path_cls(os.path.abspath(stage.wdir)) / rel_path
|
||||
)
|
||||
|
||||
self.repo = Repo(self.fspath)
|
||||
|
||||
self.stage = stage
|
||||
return self
|
||||
|
||||
def dumpd(self):
|
||||
ret = super(OutputLOCAL, self).dumpd()
|
||||
if self.is_in_repo:
|
||||
|
||||
@@ -114,12 +114,8 @@ class Git(Base):
|
||||
)
|
||||
return False
|
||||
|
||||
def ignore(self, path, in_curr_dir=False):
|
||||
base_dir = (
|
||||
os.path.realpath(os.curdir)
|
||||
if in_curr_dir
|
||||
else os.path.dirname(path)
|
||||
)
|
||||
def ignore(self, path):
|
||||
base_dir = os.path.dirname(path)
|
||||
entry, gitignore = self._get_gitignore(path, base_dir)
|
||||
|
||||
if self._ignored(entry, gitignore):
|
||||
|
||||
Reference in New Issue
Block a user