Bug 130745 - webkit-patch upload should complain if bug parameter doesn't match bug in Changelog
Summary: webkit-patch upload should complain if bug parameter doesn't match bug in Cha...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-25 15:17 PDT by BJ Burg
Modified: 2014-03-28 11:38 PDT (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description BJ Burg 2014-03-25 15:17:19 PDT
Several times now I've accidentally bumped other people's patches because webkit-patch upload doesn't check that -b <bugid> is the same as https://bugs.webkit.org/show_bug.cgi?id=<bugid> within the changelog header. This should be trivial to check, I think.
Comment 1 Csaba Osztrogonác 2014-03-26 03:55:32 PDT
Just out of curiosity, why did you pass -b parameter to webkit-patch?
It parses the bug id from changelog and upload the patch to the proper bug.
Comment 2 László Langó 2014-03-26 05:16:58 PDT
We should not allow -b <bugid> option in upload commands. It is unnecessary as Ossy mentioned and leads to issues.
Comment 3 BJ Burg 2014-03-26 09:42:14 PDT
(In reply to comment #1)
> Just out of curiosity, why did you pass -b parameter to webkit-patch?
> It parses the bug id from changelog and upload the patch to the proper bug.

Err, not -b, but just putting the bug number on the command line.
It's not obvious that the default behavior will parse the change log:

"upload uploads the current diff to bugs.webkit.org.
    If no bug id is provided, upload will create a bug.
    If the current diff does not have a ChangeLog, upload
    will prepare a ChangeLog."

That first line from the help message makes it sound like it will unconditionally open a new bug. Does it?
Comment 4 László Langó 2014-03-28 07:49:54 PDT
(In reply to comment #3)
> (In reply to comment #1)
> > Just out of curiosity, why did you pass -b parameter to webkit-patch?
> > It parses the bug id from changelog and upload the patch to the proper bug.
> 
> Err, not -b, but just putting the bug number on the command line.
> It's not obvious that the default behavior will parse the change log:
> 
> "upload uploads the current diff to bugs.webkit.org.
>     If no bug id is provided, upload will create a bug.
>     If the current diff does not have a ChangeLog, upload
>     will prepare a ChangeLog."
> 
> That first line from the help message makes it sound like it will unconditionally open a new bug. Does it?

It does, if no bugurl in the ChangeLog and neither "-b <bugid>". In this case asks for a bugtitle and a comment for the new bug.

I agree that the help message is not obvious.

We should avoid the wrong usage somehow. I think we shouldn't allow to use the bugurl in the ChangeLog and the -b "<bugid>" option at the same time. Or simply remove the "-b <bugid>" option from the upload command.