Skip to content

Commit

Permalink
[WINESYNC] Use the same 'winesync' author as for all the other commit…
Browse files Browse the repository at this point in the history
…s the script generates.

This now correctly sets the commit author as 'winesync' (before it was
the committer's developer name) for the following types of commits:

`[WINESYNC]: revert wine-staging patchset for <MODULE_NAME>`

and

`[WINESYNC]: <MODULE_NAME> is now in sync with wine-staging <WINE_TAG>`
  • Loading branch information
HBelusca authored and DarkFire01 committed Sep 12, 2023
1 parent 61556f0 commit 0524655
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions sdk/tools/winesync/winesync.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ def __init__(self, module):
self.wine_staging_repo = pygit2.Repository(self.wine_staging_src)
self.reactos_repo = pygit2.Repository(self.reactos_src)

# the standard author signature we will use
self.winesync_author_signature = pygit2.Signature('winesync', '[email protected]')

# read the index from the reactos tree
self.reactos_index = self.reactos_repo.index
self.reactos_index.read()
Expand Down Expand Up @@ -245,8 +248,9 @@ def sync_wine_commit(self, wine_commit, in_staging, staging_patch_index):
else:
commit_msg += f'wine commit id {str(wine_commit.id)} by {wine_commit.author.name} <{wine_commit.author.email}>'

self.reactos_repo.create_commit('HEAD',
pygit2.Signature('winesync', '[email protected]'),
self.reactos_repo.create_commit(
'HEAD',
self.winesync_author_signature,
self.reactos_repo.default_signature,
commit_msg,
self.reactos_index.write_tree(),
Expand Down Expand Up @@ -310,7 +314,7 @@ def revert_staged_patchset(self):

self.reactos_repo.create_commit(
'HEAD',
self.reactos_repo.default_signature,
self.winesync_author_signature,
self.reactos_repo.default_signature,
f'[WINESYNC]: revert wine-staging patchset for {self.module}',
self.reactos_index.write_tree(),
Expand Down Expand Up @@ -376,7 +380,7 @@ def sync_to_wine(self, wine_tag, wine_staging_tag):
self.reactos_index.write()
self.reactos_repo.create_commit(
'HEAD',
self.reactos_repo.default_signature,
self.winesync_author_signature,
self.reactos_repo.default_signature,
f'[WINESYNC]: {self.module} is now in sync with wine-staging {wine_tag}',
self.reactos_index.write_tree(),
Expand Down

0 comments on commit 0524655

Please sign in to comment.