mirror of
https://github.com/odoo/runbot.git
synced 2025-03-27 13:25:47 +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)
|
return Repo(to)
|
||||||
|
|
||||||
def get_tree(self, commit_hash: str) -> str:
|
def get_tree(self, rev: str) -> str:
|
||||||
r = self.with_config(check=True).rev_parse(f'{commit_hash}^{{tree}}')
|
return self.stdout().with_config(check=True, encoding="utf-8")\
|
||||||
|
.rev_parse(f'{rev}^{{tree}}')\
|
||||||
return r.stdout.strip()
|
.stdout.strip()
|
||||||
|
|
||||||
def rebase(self, dest: str, commits: Sequence[PrCommit]) -> Tuple[str, Dict[str, str]]:
|
def rebase(self, dest: str, commits: Sequence[PrCommit]) -> Tuple[str, Dict[str, str]]:
|
||||||
"""Implements rebase by hand atop plumbing so:
|
"""Implements rebase by hand atop plumbing so:
|
||||||
|
Loading…
Reference in New Issue
Block a user