Lines Matching +full:wayland +full:- +full:protocols
8 # http://www.apache.org/licenses/LICENSE-2.0
26 'Helper script for importing a snapshot from upstream Wayland protocol '
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]:
84 ['ls-tree', '-r', '--name-only', f'{version}^{{tree}}'] +
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'
106 force_clean: bool = True) -> None:
141 cmd = ['git', 'clone', '--filter=blob:none', '--depth=1']
143 cmd.extend(['--sparse'])
145 cmd.extend(['-b', version])
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:
218 if '/-/tree/' in url:
219 base_url, path = url.split('/-/tree/')
237 def current_version(self) -> str:
249 def git_url(self) -> str:
255 def git_paths(self) -> list[pathlib.PurePath]:
263 def update_version_and_import_date(self, version: str) -> None:
282 def must_ignore(path: pathlib.PurePath) -> bool:
312 parser.add_argument('--loglevel',
318 parser.add_argument('--no-force-clean',
325 '--no-remove-old-files',
341 f'Importing {args.group} Wayland protocols at {args.version} to {args.group}'
399 Update to {args.group} protocols {import_new_ref_name or import_new_hash}