Making -U the default setting for mq patches created with qnew

Jeff Walden jwalden+hg at MIT.EDU
Mon Dec 15 03:50:54 CST 2008


Anyone who contributes a patch to Mozilla but who doesn't have push access to our repositories must write the patch and submit it to Bugzilla.  After it's reviewed, the patch is ready to be pushed by someone with push access -- almost.  All such patches must have an associated username and commit message, as noted on <https://wiki.mozilla.org/MeteredCheckins> at the moment (probably elsewhere long-term):

> whichever you choose make sure you include a commit message and an username in the attachment, otherwise the bug won't be checked in.

Thus, it's not uncommon that the patch must be submitted a final time with the commit message and possibly a username added.

We have to remind people to add the commit message and can't get around that.  However, it would be great if, in the case that someone's using mq and uploads directly from .hg/patches (of the three suggested methods, the only one that requires help adding a username), we didn't have to remind them to add a username.  (We could add [defaults] qnew = -U to the recommended .hgrc [I've done so in mine to avoid this problem], but I think we don't want to enable mq or include mq-specific configuration in the recommended settings, or even to point to it in instructions -- better to tell people individually and let them enable as they see fit.)  *Not* adding a username and committing already assumes the current user's name; is there a good reason mq shouldn't do the same with qnew?  I can't really think of a down side to adding user information to every mq patch.

The proposed change, then, implemented in the attached patch, would be to deprecate the -U option to qnew and always add a username to every patch.  If -u user were specified, that name would be used instead.

I'd be in favor of going even further and doing the same for -D/-d date, but that forces patch format to Mercurial format from the just-prepend-"From: <user>\n\n" format.  Pure Mercurial users would be fine, but I'm unsure about others, so it's not in the attached patch.

Thoughts on making -U the default for qnew and perhaps on making -D a default as well?

Jeff

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: qnew-use-default-user.diff
Url: http://selenic.com/pipermail/mercurial-devel/attachments/20081215/b926a0e2/attachment.txt 


More information about the Mercurial-devel mailing list