when multiple commits are pushed, only the last one can trigger a trac auto-commit message #2231

Closed
opened 2014-04-21 22:03:58 +00:00 by daira · 3 comments
daira commented 2014-04-21 22:03:58 +00:00
Owner

For example: [77767e9e12cbd3e03f8ad917f6d3e8c1e4918c43/trunk] and [4889129f3732219cb9cedb1eb27dec3da3f22db2/trunk] were committed at the same time, one with 'fixes #1847' and the other with 'refs #1847' in the commit message. Only the latter appeared automatically on #1847.

For example: [77767e9e12cbd3e03f8ad917f6d3e8c1e4918c43/trunk] and [4889129f3732219cb9cedb1eb27dec3da3f22db2/trunk] were committed at the same time, one with 'fixes #1847' and the other with 'refs #1847' in the commit message. Only the latter appeared automatically on #1847.
tahoe-lafs added the
dev-infrastructure
normal
defect
1.10.0
labels 2014-04-21 22:03:58 +00:00
tahoe-lafs added this to the undecided milestone 2014-04-21 22:03:58 +00:00

I fixed this. It turns out the notification script was always telling trac that the most-recent commit was new. This was wrong in both directions:

  • if multiple revisions appeared at the same time, such as when you land a merge commit or pushed multiple commits together, trac would only hear about the last one
  • if an unrelated branch was pushed, trac would hear about the latest commit (on master) again, causing multiple ticket comments, and multiple emails to be sent.

I fixed it to stash the old repo branch (OLD=git rev-parse master) and use that to build a new list (REVS=git rev-list ^OLD master). That list will be empty if nothing has changed.

I fixed this. It turns out the notification script was always telling trac that the most-recent commit was new. This was wrong in both directions: * if multiple revisions appeared at the same time, such as when you land a merge commit or pushed multiple commits together, trac would only hear about the last one * if an unrelated branch was pushed, trac would hear about the latest commit (on master) again, causing multiple ticket comments, and multiple emails to be sent. I fixed it to stash the old repo branch (`OLD=git rev-parse master`) and use that to build a new list (`REVS=git rev-list ^OLD master`). That list will be empty if nothing has changed.
warner added the
fixed
label 2015-04-28 23:00:03 +00:00
daira commented 2015-04-28 23:56:11 +00:00
Author
Owner

Could this change have caused #2413?

Could this change have caused #2413?
daira commented 2015-04-28 23:57:35 +00:00
Author
Owner

Oh, #2413 might be a duplicate of the second issue above (and therefore now fixed).

Oh, #2413 might be a duplicate of the second issue above (and therefore now fixed).
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Reference: tahoe-lafs/trac-2024-07-25#2231
No description provided.