dvc/repo/experiments/__init__.py
def _stash_exp(self, *args, **kwargs):
        """Stash changes from the current (parent) workspace as an experiment.
        """
        rev = self.scm.get_rev()
        tmp = tempfile.NamedTemporaryFile(delete=False).name
        try:
            self.repo.scm.repo.git.diff(patch=True, output=tmp)
            if os.path.getsize(tmp):
                logger.debug("Patching experiment workspace")
                self.scm.repo.git.apply(tmp)
            else:
                raise UnchangedExperimentError(rev)
        finally:
            remove(tmp)
        self._pack_args(*args, **kwargs)
        msg = f"{self.STASH_MSG_PREFIX}{rev}"
        self.scm.repo.git.stash("push", "-m", msg)
        return self.scm.resolve_rev("stash@{0}")
Stash changes from the current (parent) workspace as an experiment.
        
Stash changes from the current (parent) workspace as an experiment.
Stash changes from the current ( parent ) workspace as an experiment .
def _stash_exp(self, *args, **kwargs):
        rev = self.scm.get_rev()
        tmp = tempfile.NamedTemporaryFile(delete=False).name
        try:
            self.repo.scm.repo.git.diff(patch=True, output=tmp)
            if os.path.getsize(tmp):
                logger.debug("Patching experiment workspace")
                self.scm.repo.git.apply(tmp)
            else:
                raise UnchangedExperimentError(rev)
        finally:
            remove(tmp)
        self._pack_args(*args, **kwargs)
        msg = f"{self.STASH_MSG_PREFIX}{rev}"
        self.scm.repo.git.stash("push", "-m", msg)
        return self.scm.resolve_rev("stash@{0}")
def _stash_exp ( self , * args , ** kwargs ) : rev = self . scm . get_rev ( ) tmp = tempfile . NamedTemporaryFile ( delete = False ) . name try : self . repo . scm . repo . git . diff ( patch = True , output = tmp ) if os . path . getsize ( tmp ) : logger . debug ( "Patching experiment workspace" ) self . scm . repo . git . apply ( tmp ) else : raise UnchangedExperimentError ( rev ) finally : remove ( tmp ) self . _pack_args ( * args , ** kwargs ) msg = f"{self.STASH_MSG_PREFIX}{rev}" self . scm . repo . git . stash ( "push" , "-m" , msg ) return self . scm . resolve_rev ( "stash@{0}" )
Stash changes from the current (parent) workspace as an experiment.
Stash changes from the current ( parent ) workspace as an experiment .
"""Stash changes from the current (parent) workspace as an experiment.
        """
self