added documentation, fixed constructor
This commit is contained in:
parent
5f4983f824
commit
75d432e913
2 changed files with 2 additions and 1 deletions
|
@ -158,6 +158,7 @@ class Phab2Github:
|
|||
|
||||
def apply_patch(self, diff: "Diff", raw_patch: str):
|
||||
"""Apply a patch to the working copy."""
|
||||
# TODO: impersonate the original author of the patch
|
||||
proc = subprocess.run('git apply --ignore-whitespace --whitespace=fix -', input=raw_patch, shell=True,
|
||||
text=True, cwd=self.repo.working_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
if proc.returncode != 0:
|
||||
|
|
|
@ -147,7 +147,7 @@ class PhabWrapper:
|
|||
# TODO: handle > 100 responses
|
||||
revision_response = self.phab.differential.revision.search(
|
||||
constraints=constraints)
|
||||
revisions = [Revision(r, self.host) for r in revision_response.response['data']]
|
||||
revisions = [Revision(r) for r in revision_response.response['data']]
|
||||
# TODO: only taking the first 10 to speed things up
|
||||
revisions = revisions[0:10]
|
||||
_LOGGER.info('Got {} revisions from the server'.format(len(revisions)))
|
||||
|
|
Loading…
Reference in a new issue