• Home
  • Raw
  • Download

Lines Matching +full:paths +full:- +full:ignore

8 #      http://www.apache.org/licenses/LICENSE-2.0
32 # Check https://gitlab.freedesktop.org/wayland/wayland-protocols/-/tags
49 def base(self) -> pathlib.PurePath:
56 check: bool = True) -> subprocess.CompletedProcess:
57 return subprocess.run(['git', '-C', self._base] + cmd,
62 def get_hash_for_version(self, version) -> str:
65 return self._git(['show-ref', '--hash',
68 def git_ref_name_for_version(self, version) -> str | None:
71 ref = self._git(['describe', '--all', '--exact-match', version],
80 paths: list[pathlib.PurePath]) -> list[pathlib.Path]:
81 """Gets the list of files under |paths| that are part of the Git tree at |version|."""
82 logging.debug("GitRepo.get_files version %s paths %s", version, paths)
84 ['ls-tree', '-r', '--name-only', f'{version}^{{tree}}'] +
85 paths).stdout
88 def assert_no_uncommitted_changes(self) -> None:
90 r = self._git(['diff-files', '--quiet', '--ignore-submodules'],
96 'diff-index', '--quiet', '--ignore-submodules', '--cached', 'HEAD'
105 paths: list[str],
106 force_clean: bool = True) -> None:
123 Paths in |paths| are included in the sparse checkout, which also means
125 included. if |paths| is an empty list, all files at the root of the
134 "GitRepo.sparse_depth1_clone url %s version %s paths %s force_clean %s",
135 url, version, paths, force_clean)
141 cmd = ['git', 'clone', '--filter=blob:none', '--depth=1']
142 if paths:
143 cmd.extend(['--sparse'])
145 cmd.extend(['-b', version])
150 if paths:
151 self._git(['sparse-checkout', 'add'] + paths)
153 def add(self, path: pathlib.Path) -> None:
161 auto_add: bool = True) -> None:
169 cmd = ['commit', '-m', message]
171 cmd.extend(['--allow-empty'])
173 cmd.extend(['-a'])
198 def _read_content(self) -> None:
203 def _write_content(self) -> None:
208 def _read_raw_git_urls(self) -> None:
212 paths = []
218 if '/-/tree/' in url:
219 base_url, path = url.split('/-/tree/')
232 paths.append(path)
234 self._paths = tuple(paths)
237 def current_version(self) -> str:
249 def git_url(self) -> str:
255 def git_paths(self) -> list[pathlib.PurePath]:
256 """Obtains the child paths to sync from the metadata.
263 def update_version_and_import_date(self, version: str) -> None:
282 def must_ignore(path: pathlib.PurePath) -> bool:
290 ignore = any(path.match(pattern) for pattern in IGNORE_PATTERNS)
291 if ignore:
293 return ignore
312 parser.add_argument('--loglevel',
318 parser.add_argument('--no-force-clean',
325 '--no-remove-old-files',