Skip to content

Commit

Permalink
Use description for diff hash
Browse files Browse the repository at this point in the history
Review requests with history uses full commit description. So
we need to hash it, too. Otherwise we do not update if
there is a commit-message-only change.

This fixes #7.
  • Loading branch information
misery committed May 30, 2024
1 parent 9293701 commit 93d996c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions contrib/mercurial_git_push.py
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,8 @@ def _get_hash(self, diffset_id):
hasher = hashlib.sha256()
for info in six.itervalues(self.diff_info_commits):
hasher.update(info.getHash(diffset_id).encode('utf-8'))
for changeset in self._changesets:
hasher.update(changeset.desc().encode('utf-8'))
return hasher.hexdigest()

return self.diff_info.getHash(diffset_id)
Expand Down

0 comments on commit 93d996c

Please sign in to comment.