mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Auto merge of #28171 - jdm:wpt_update_tmp, r=jdm
Fix WPT sync
Fixes #28170. This cherry-picks 1b484b247d
to allow our nightly sync to resume.
This commit is contained in:
commit
8050c95e31
3 changed files with 20 additions and 20 deletions
|
@ -372475,11 +372475,11 @@
|
|||
[]
|
||||
],
|
||||
"sync.py": [
|
||||
"f878752f4514ae9cce5c74a5f994fc5e71eac826",
|
||||
"4ace28f443cd238c1a0fe0902c7b0db88fdaf6bb",
|
||||
[]
|
||||
],
|
||||
"tree.py": [
|
||||
"f362770ff16d30e449de853f687467297b0ed077",
|
||||
"4127b0ef7dc61f07b3cff760ba9cbb515a83986f",
|
||||
[]
|
||||
],
|
||||
"update.py": [
|
||||
|
|
|
@ -67,7 +67,7 @@ class UpdateCheckout(Step):
|
|||
state.local_branch)
|
||||
sync_path = os.path.abspath(sync_tree.root)
|
||||
if sync_path not in sys.path:
|
||||
from update import setup_paths
|
||||
from .update import setup_paths
|
||||
setup_paths(sync_path)
|
||||
|
||||
def restore(self, state):
|
||||
|
|
|
@ -87,7 +87,7 @@ class HgTree(object):
|
|||
|
||||
@property
|
||||
def is_clean(self):
|
||||
return self.hg("status").strip() == ""
|
||||
return self.hg("status").strip() == b""
|
||||
|
||||
def add_new(self, prefix=None):
|
||||
if prefix is not None:
|
||||
|
@ -105,7 +105,7 @@ class HgTree(object):
|
|||
except subprocess.CalledProcessError:
|
||||
pass
|
||||
|
||||
patch_names = [item.strip() for item in self.hg("qseries").split("\n") if item.strip()]
|
||||
patch_names = [item.strip() for item in self.hg("qseries").split(b"\n") if item.strip()]
|
||||
|
||||
suffix = 0
|
||||
test_name = patch_name
|
||||
|
@ -142,7 +142,7 @@ class GitTree(object):
|
|||
|
||||
def __init__(self, root=None, log_error=True):
|
||||
if root is None:
|
||||
root = git("rev-parse", "--show-toplevel", log_error=log_error).strip()
|
||||
root = git("rev-parse", "--show-toplevel", log_error=log_error).strip().decode('utf-8')
|
||||
self.root = root
|
||||
self.git = vcs.bind_to_repo(git, self.root, log_error=log_error)
|
||||
self.message = None
|
||||
|
@ -178,7 +178,7 @@ class GitTree(object):
|
|||
|
||||
@property
|
||||
def is_clean(self):
|
||||
return self.git("status").strip() == ""
|
||||
return self.git("status").strip() == b""
|
||||
|
||||
def add_new(self, prefix=None):
|
||||
"""Add files to the staging area.
|
||||
|
@ -203,7 +203,7 @@ class GitTree(object):
|
|||
f.seek(0)
|
||||
ignored_files = sync_tree.git("check-ignore", "--no-index", "--stdin", "-z", stdin=f)
|
||||
args = []
|
||||
for entry in ignored_files.split('\0'):
|
||||
for entry in ignored_files.decode('utf-8').split('\0'):
|
||||
args.append(os.path.join(prefix, entry))
|
||||
if args:
|
||||
self.git("add", "--force", *args)
|
||||
|
@ -219,7 +219,7 @@ class GitTree(object):
|
|||
args.append(ref_filter)
|
||||
data = self.git("show-ref", *args)
|
||||
rv = []
|
||||
for line in data.split("\n"):
|
||||
for line in data.split(b"\n"):
|
||||
if not line.strip():
|
||||
continue
|
||||
sha1, ref = line.split()
|
||||
|
@ -237,7 +237,7 @@ class GitTree(object):
|
|||
args.append(ref_filter)
|
||||
data = self.git("ls-remote", remote, *args)
|
||||
rv = []
|
||||
for line in data.split("\n"):
|
||||
for line in data.split(b"\n"):
|
||||
if not line.strip():
|
||||
continue
|
||||
sha1, ref = line.split()
|
||||
|
@ -250,8 +250,8 @@ class GitTree(object):
|
|||
:param remote: the remote URL
|
||||
:param branch: the branch name"""
|
||||
for sha1, ref in self.list_remote(remote, branch):
|
||||
if ref == "refs/heads/%s" % branch:
|
||||
return self.commit_cls(self, sha1)
|
||||
if ref.decode('utf-8') == "refs/heads/%s" % branch:
|
||||
return self.commit_cls(self, sha1.decode('utf-8'))
|
||||
assert False
|
||||
|
||||
def create_patch(self, patch_name, message):
|
||||
|
@ -299,8 +299,8 @@ class GitTree(object):
|
|||
|
||||
args = []
|
||||
if branch:
|
||||
branches = [ref[len("refs/heads/"):] for sha1, ref in self.list_refs()
|
||||
if ref.startswith("refs/heads/")]
|
||||
branches = [ref[len("refs/heads/"):].decode('utf-8') for sha1, ref in self.list_refs()
|
||||
if ref.startswith(b"refs/heads/")]
|
||||
branch = get_unique_name(branches, branch)
|
||||
|
||||
args += ["-b", branch]
|
||||
|
@ -336,8 +336,8 @@ class GitTree(object):
|
|||
rv = []
|
||||
|
||||
for repo_path in repo_paths:
|
||||
paths = vcs.git("ls-tree", "-r", "--name-only", "HEAD", repo=repo_path).split("\n")
|
||||
rv.extend(os.path.relpath(os.path.join(repo_path, item), self.root) for item in paths
|
||||
paths = vcs.git("ls-tree", "-r", "--name-only", "HEAD", repo=repo_path).split(b"\n")
|
||||
rv.extend(os.path.relpath(os.path.join(repo_path, item.decode('utf-8')), self.root) for item in paths
|
||||
if item.strip())
|
||||
return rv
|
||||
|
||||
|
@ -345,11 +345,11 @@ class GitTree(object):
|
|||
"""List submodule directories"""
|
||||
output = self.git("submodule", "status", "--recursive")
|
||||
rv = []
|
||||
for line in output.split("\n"):
|
||||
for line in output.split(b"\n"):
|
||||
line = line.strip()
|
||||
if not line:
|
||||
continue
|
||||
parts = line.split(" ")
|
||||
parts = line.split(b" ")
|
||||
rv.append(parts[1])
|
||||
return rv
|
||||
|
||||
|
@ -403,5 +403,5 @@ class Commit(object):
|
|||
self.git = self.tree.git
|
||||
|
||||
def _get_meta(self):
|
||||
author, email, message = self.git("show", "-s", "--format=format:%an\n%ae\n%B", self.sha1).split("\n", 2)
|
||||
return author, email, self.msg_cls(message)
|
||||
author, email, message = self.git("show", "-s", "--format=format:%an\n%ae\n%B", self.sha1).split(b"\n", 2)
|
||||
return author.decode('utf-8'), email.decode('utf-8'), self.msg_cls(message.decode('utf-8'))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue