https://git.reactos.org/?p=reactos.git;a=commitdiff;h=e638ff59d1f1aafd7039569fe2f94c625d01989e
commit e638ff59d1f1aafd7039569fe2f94c625d01989e Author: Hermès Bélusca-Maïto <hermes.belusca-ma...@reactos.org> AuthorDate: Wed Nov 3 23:44:23 2021 +0100 Commit: Hermès Bélusca-Maïto <hermes.belusca-ma...@reactos.org> CommitDate: Mon Dec 18 22:21:34 2023 +0100 [WINESYNC] Fix some apparent problems with commits manipulation with pygit2. --- sdk/tools/winesync/winesync.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sdk/tools/winesync/winesync.py b/sdk/tools/winesync/winesync.py index d221e600bfd..a517fa6bb12 100644 --- a/sdk/tools/winesync/winesync.py +++ b/sdk/tools/winesync/winesync.py @@ -64,10 +64,14 @@ class wine_sync: wine_target_commit = self.wine_repo.revparse_single(wine_tag) if isinstance(wine_target_commit, pygit2.Tag): wine_target_commit = wine_target_commit.target + if isinstance(wine_target_commit, pygit2.Commit): + wine_target_commit = wine_target_commit.id wine_staging_target_commit = self.wine_staging_repo.revparse_single(wine_staging_tag) if isinstance(wine_staging_target_commit, pygit2.Tag): wine_staging_target_commit = wine_staging_target_commit.target + if isinstance(wine_staging_target_commit, pygit2.Commit): + wine_staging_target_commit = wine_staging_target_commit.id self.wine_repo.branches.local.create(wine_branch_name, self.wine_repo.revparse_single('HEAD')) self.wine_repo.checkout(self.wine_repo.lookup_branch(wine_branch_name)) @@ -306,16 +310,18 @@ class wine_sync: wine_target_commit = self.wine_repo.revparse_single(wine_tag) if isinstance(wine_target_commit, pygit2.Tag): wine_target_commit = wine_target_commit.target + if isinstance(wine_target_commit, pygit2.Commit): + wine_target_commit = wine_target_commit.id # print(f'wine target commit is {wine_target_commit}') # get the wine commit id where we left in_staging = False wine_last_sync = self.wine_repo.revparse_single(self.module_cfg['tags']['wine']) - if (isinstance(wine_last_sync, pygit2.Tag)): + if isinstance(wine_last_sync, pygit2.Tag): if not self.revert_staged_patchset(): return wine_last_sync = wine_last_sync.target - if (isinstance(wine_last_sync, pygit2.Commit)): + if isinstance(wine_last_sync, pygit2.Commit): wine_last_sync = wine_last_sync.id # create a branch to keep things clean