Submitter | Augie Fackler |
---|---|
Date | Aug. 18, 2016, 4:13 p.m. |
Message ID | <8ed7fdc716ffc95a4062.1471536812@augie-macbookair2.roam.corp.google.com> |
Download | mbox | patch |
Permalink | /patch/16355/ |
State | Accepted |
Headers | show |
Comments
On Thu, 18 Aug 2016 12:13:32 -0400, Augie Fackler wrote: > # HG changeset patch > # User Augie Fackler <augie@google.com> > # Date 1471534322 14400 > # Thu Aug 18 11:32:02 2016 -0400 > # Node ID 8ed7fdc716ffc95a4062875eafc2739697122fbc > # Parent 8d226db31f20b8c4a2c119e10be7533948f0bad6 > dispatch: explicitly pass fancyopts optional arg as a keyword > > I've been baffled by this a couple of times (mainly wondering if any > callers of fancyopts.fancyopts that don't use gnu=True exist), so > let's just specify this as a keyword argument to preserve sanity. > > diff --git a/mercurial/dispatch.py b/mercurial/dispatch.py > --- a/mercurial/dispatch.py > +++ b/mercurial/dispatch.py > @@ -556,7 +556,7 @@ def _parse(ui, args): > c.append((o[0], o[1], options[o[1]], o[3])) > > try: > - args = fancyopts.fancyopts(args, c, cmdoptions, True) > + args = fancyopts.fancyopts(args, c, cmdoptions, gnu=True) I like it. Queued the first patch, thanks.
Patch
diff --git a/mercurial/dispatch.py b/mercurial/dispatch.py --- a/mercurial/dispatch.py +++ b/mercurial/dispatch.py @@ -556,7 +556,7 @@ def _parse(ui, args): c.append((o[0], o[1], options[o[1]], o[3])) try: - args = fancyopts.fancyopts(args, c, cmdoptions, True) + args = fancyopts.fancyopts(args, c, cmdoptions, gnu=True) except fancyopts.getopt.GetoptError as inst: raise error.CommandError(cmd, inst)