Send an example! (Re: [PATCH] util: Changed shortuser()...)

Matt Mackall mpm at selenic.com
Wed Aug 4 15:22:08 CDT 2010


On Wed, 2010-08-04 at 11:44 -0700, David Frey wrote:
> On August 4, 2010 10:04:45 am Matt Mackall wrote:
> > On Tue, 2010-08-03 at 21:58 -0700, David Frey wrote:
> > > # HG changeset patch
> > > # User David Frey <dpfrey at shaw.ca>
> > > # Date 1280897356 25200
> > > # Node ID 5abdad9cb3a4ea47c2d2dd57c03959f392289ffb
> > > # Parent  b6f72d8d77ae5df0dd80b3236169159d020bf269
> > > util: Changed shortuser() to provide slightly more verbose names
> > > (Issue2276)
> > 
> > Please don't send patches where one has to decipher your code and/or
> > test and/or lookup a BTS entry to figure out the intent. This goes
> > double for things that change output. Include an example!
> 
> 
> Sorry about that.  I intended to send a description, but I issued the wrong hg 
> email command.

Unfortunately, everyone does it pretty much constantly, which is why I
changed the subject.

> The issue relates to the ambiguity of the names produced by the shortuser 
> function from mercurial/util.py when dealing with commits specifying users 
> like this:
> 
> Steve Smith <steve.smith at domain.com>
> Steve Jones <steve.jones at domain.com>
> 
> Prior to the patch, "steve" would be returned by shortuser for both users.

<facepalm>

You still haven't told us what happens after the patch!

I could read your patch and try to figure it out. But I may get it
wrong. Or you may have gotten it wrong. I can't reliably compare intent
to implementation with only implementation. It's all just so much easier
if the submitter tells us what it is they're trying to do.

Send a new patch with both before and after examples and the rationale,
preferably all in the commit message. Every time. Assume your reviewer
has the attention span of a goldfish. 

> I attempted to classify the name provided into 3 categories:
>   - name <e-mail>
>   - e-mail
>   - name
>
> I chose what I believed to be a suitable default in each case.

You'll need to tell us what it did and now does in each case, then.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list