MCPcopy Create free account
hub / github.com/comaps/comaps / checkout

Method checkout

tools/python/routing/src/utils.py:146–160  ·  view source on GitHub ↗
(self, *, branch, hash=None)

Source from the content-addressed store, hash-verified

144 self.checkout(branch=self.init_branch, hash=self.init_hash)
145
146 def checkout(self, *, branch, hash=None):
147 branch_hash_name = get_branch_hash_name(branch=branch, hash=hash)
148 LOG.info(f'Do checkout to: {branch_hash_name}')
149 repo = Repo(self.omim_path)
150 repo.remote('origin').fetch()
151 repo.git.checkout(branch)
152 if hash:
153 repo.git.reset('--hard', hash)
154 else:
155 hash = repo.head.object.hexsha
156
157 LOG.info(f'Checkout to: {branch} {hash} done')
158
159 self.branch = branch
160 self.hash = hash
161
162 def build(self, *, aim, binary_cache_suffix=None, cmake_options=""):
163 os.chdir(self.build_dir)

Callers 4

mainFunction · 0.95
run_routes_builder_toolFunction · 0.80
run_heap_comparisonFunction · 0.80

Calls 2

get_branch_hash_nameFunction · 0.85
resetMethod · 0.45

Tested by

no test coverage detected