mirror of
https://github.com/odoo/runbot.git
synced 2025-03-15 15:35:46 +07:00
[IMP] runbot_merge: get_tree impl
- ensure all its requirements are set - rename parameter as `rev-parse` can take an arbitrary rev expression not just a commit
This commit is contained in:
parent
335a52580c
commit
93a0f7c9d8
@ -147,10 +147,10 @@ class Repo:
|
||||
)
|
||||
return Repo(to)
|
||||
|
||||
def get_tree(self, commit_hash: str) -> str:
|
||||
r = self.with_config(check=True).rev_parse(f'{commit_hash}^{{tree}}')
|
||||
|
||||
return r.stdout.strip()
|
||||
def get_tree(self, rev: str) -> str:
|
||||
return self.stdout().with_config(check=True, encoding="utf-8")\
|
||||
.rev_parse(f'{rev}^{{tree}}')\
|
||||
.stdout.strip()
|
||||
|
||||
def rebase(self, dest: str, commits: Sequence[PrCommit]) -> Tuple[str, Dict[str, str]]:
|
||||
"""Implements rebase by hand atop plumbing so:
|
||||
|
Loading…
Reference in New Issue
Block a user