Everybody makes mistakes. There are a few cases where a hook like this might save someone the hassle of backing out and recommitting and pushing a message fix. That can be costly, for sure, and I expect this is the origin of this discussion.
On 2011-10-31, at 11:21 , Jeff Muizelaar wrote:
> On 2011-10-31, at 5:53 AM, Dao wrote:
>
>> On 30.10.2011 00:04, Benoit Jacob wrote:
>>>> Please no fake reviewers like "my-dog" or "burning"
>>>
>>> I can understand the concern about using one's dog as reviewer, but
>>> what's the problem with "burning"? In practice, we often use
>>> "r=bustage". This used to be considered OK and, as far as I can see,
>>> necessary. Did that change?
>>
>> When and why was this necessary? I'd encourage people to leave out the review tag if no review happened and they think that's OK. "bustage" can't review patches. For a review-worthy bustage fix, you should probably get ad-hoc review on IRC or back out the broken changeset and take it back to bugzilla.
>
> I agree. We shouldn't being forcing the content of our commit messages into a framework that it doesn't fit. I also push changes from upstream repositories that have not had review and would rather not and ugly tags to the commit message with to make a script happy.
+1. This feels like it has the potential to make checking in more annoying for some or many.
> Do we actually have a problem where people are omitting their reviewers? I'd rather this energy be put toward solving real problems like helping people avoid including the wrong bug number.
This won't catch the class of commits where the committer pastes in the wrong bug number (this happened to me last week and I spent a good chunk of the day cleaning it up).
I could have saved myself that trouble/time/embarrassment and loss of tree time if I'd paid closer attention and not let distractions get in the way. Sadly, real life is hard.
On 2011-10-31, at 11:35 , Tom Schuster wrote:
> As I said before this is not enforced and probably won't be in the near future.
> But I agree we should figure out a way to check bug ids, also I think
> it's hard to find the right way, if it's really the right bug. Maybe
> we could check if the bug at least exists and isn't closed, and
> assigned to that person. But it's then still going to happen. This
> raises even more interesting problems, but what ever?
Check bug ids how? Verify that they exist? That won't solve the problem of someone checking in a patch with the wrong (but existent) bug number. Checking that the patch committed is the actual patch in the bug could also be problematic (e.g., what if there's more than one patch?)
If you're using a hash to verify that the patch is identical, it will reject patches that have been tweaked by the committer based on feedback in the bug. This happens quite frequently.
I think adding rules for this type of work is going to be problematic unless we hook up the ability to checkin directly from bugzilla itself. It feels to me like placing the logic in an HG hook is the wrong place to put it.
Anyway, I don't wanna be all Mr. Stop Energy. I think there's a kernel of a real problem here, I'm just concerned that adding rules to an already rule-laden system will create more pain for its users than solve problems.
(Note that most of the rules we have in place are enforced by the community and work Very Very Well. On a bad commit, you usually don't have to wait very long before you'll get a ping in #developers notifying you of a mistake. Or you'll get backed out. The System Works. /soapbox)
Rob