Lines Matching full:path
16 PATH_PATTERN = re.compile(r'path\s+=\s+(\S+)')
27 def __init__(self, gitlab_inst, path, url): argument
28 self.path = path
31 self.commit_id = self._get_commit_id(path)
33 def _get_commit_id(self, path): argument
34 output = subprocess.check_output(['git', 'ls-tree', 'HEAD', path])
41 base_name = os.path.basename(url)
42 project_id = self.gitlab_inst.get_project_id(os.path.splitext(base_name)[0], # remove .git
47 print('Update submodule: {}: {}'.format(self.path, self.commit_id))
50 renamed_path = os.path.join(os.path.dirname(path_name), os.path.basename(self.path))
52 shutil.rmtree(self.path, ignore_errors=True)
53 shutil.move(renamed_path, os.path.dirname(self.path))
70 path = path_match.group(1)
75 if path not in submodules_to_update:
78 submodules.append(SubModule(gitlab_inst, path, url))
93 parser.add_argument('--repo_path', '-p', default='.', help='repo path')
106 update_submodule(os.path.join(args.repo_path, '.gitmodules'), _submodules)