[PATCH] merge: when current branch has 1 or > 2 heads, actually abort

Matt Mackall mpm at selenic.com
Tue Jun 15 12:48:58 CDT 2010


On Tue, 2010-06-15 at 10:42 -0400, Greg Ward wrote:
> On Tue, Jun 15, 2010 at 3:23 AM, Martin Geisler <mg at lazybytes.net> wrote:
> >>> Why do you change the quotes from double to single quotes? I prefre
> >>> double quotes to begin with, especially when they lets us avoid
> >>> quoting single quotes.
> >>
> >> Because I thought it was the convention. I confess: I did not search
> >> all the ui output for occurences of recommended hg commands.
> >
> > Okay, no problem then :-)
> 
> Now I've done the required searches, i.e.
> 
>   grep "'hg " *.py
>   grep '"hg ' *.py
> 
> and manually scanned for UI messages that recommend an hg command to run next.
> 
> Results:
> 
>   'hg x':         21 times in mercurial/*.py, 1 in hgext/*.py
>   "hg x":          11 times in mercurial/*.py, 5 in hgext/*.py
> 
> Note that most uses of double quotes are in the help system, which
> explains Martin's bias.  ;-)
> 
> Looks like single quotes are winning.  Shall I send a patch to
> normalize on single quotes, despite the ugly escaping:
> 
>   ui.note('you should have used \'hg domyjob\'\n')

I don't particularly care what quoting is used in the source. I prefer
single quotes, but generally switch to double quotes when it avoids
escaping. 

However, you're right, we should normalize the quoting of commands in
messages. I don't care which we standardize on. If we decide on double
quotes for command quoting, we can standardize on single quotes for
string quoting.

We also should put together a style guide for messages.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list