mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
Rename CONFIG.task_id()
to tree_hash
This commit is contained in:
parent
fa625a7388
commit
95cd67bb95
2 changed files with 19 additions and 19 deletions
|
@ -64,14 +64,14 @@ class Config:
|
|||
self.default_provisioner_id = "proj-example"
|
||||
|
||||
|
||||
def task_id(self):
|
||||
if not hasattr(self, "_task_id"):
|
||||
def tree_hash(self):
|
||||
if not hasattr(self, "_tree_hash"):
|
||||
# Use the SHA-1 hash of the git "tree" object rather than the commit.
|
||||
# A `@bors-servo retry` command creates a new merge commit with a different commit hash
|
||||
# but with the same tree hash.
|
||||
output = subprocess.check_output(["git", "show", "-s", "--format=%T", "HEAD"])
|
||||
self._task_id = output.decode("utf-8").strip()
|
||||
return self._task_id
|
||||
self._tree_hash = output.decode("utf-8").strip()
|
||||
return self._tree_hash
|
||||
|
||||
def git_sha_is_current_head(self):
|
||||
output = subprocess.check_output(["git", "rev-parse", "HEAD"])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue