Skip to content

Commit

Permalink
- Moved fetch for projects from Patch parsing code to patch provider
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukas Abelt committed Jan 31, 2024
1 parent e126c51 commit 590849f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions varats-core/varats/provider/patch/patch_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,6 @@ def from_yaml(yaml_path: Path) -> 'Patch':

project_git_path = get_local_project_git_path(project_name)

# Update repository to have all upstream changes
fetch_repository(project_git_path)

def parse_revisions(
rev_dict: tp.Dict[str, tp.Any]
) -> tp.Set[CommitHash]:
Expand Down Expand Up @@ -300,6 +297,10 @@ def __init__(self, project: tp.Type[Project]):

self.__patches: tp.Set[Patch] = set()

# Update repository to have all upstream changes
project_git_path = get_local_project_git_path(self.project.NAME)
fetch_repository(project_git_path)

for root, _, files in os.walk(patches_project_dir):
for filename in files:
if not filename.endswith(".info"):
Expand Down

0 comments on commit 590849f

Please sign in to comment.