MCPcopy
hub / github.com/treeverse/dvc / branch

Method branch

dvc/testing/tmp_dir.py:214–221  ·  view source on GitHub ↗
(self, name, new=False)

Source from the content-addressed store, hash-verified

212
213 @contextmanager
214 def branch(self, name, new=False):
215 self._require("scm")
216 old = self.scm.active_branch()
217 try:
218 self.scm.checkout(name, create_new=new)
219 yield
220 finally:
221 self.scm.checkout(old)
222
223 def read_text(self, *args, **kwargs):
224 # NOTE: on windows we'll get PermissionError instead of

Callers 15

runMethod · 0.45
test_gc_branches_tagsFunction · 0.45
test_push_pull_allFunction · 0.45
test_update_importFunction · 0.45
test_update_revFunction · 0.45
test_update_recursiveFunction · 0.45
test_get_repo_revFunction · 0.45
test_external_repoFunction · 0.45
test_cache_reusedFunction · 0.45

Calls 2

_requireMethod · 0.95
checkoutMethod · 0.45

Tested by 15

test_gc_branches_tagsFunction · 0.36
test_push_pull_allFunction · 0.36
test_update_importFunction · 0.36
test_update_revFunction · 0.36
test_update_recursiveFunction · 0.36
test_get_repo_revFunction · 0.36
test_external_repoFunction · 0.36
test_cache_reusedFunction · 0.36