Patchwork [2,of,2] cmdutil: use None as default value for "function pointer" instead of False

login
register
mail settings
Submitter Mads Kiilerich
Date Oct. 10, 2013, 6:52 p.m.
Message ID <8b625cba8c10c5d24d61.1381431147@mk-desktop>
Download mbox | patch
Permalink /patch/2749/
State Accepted
Commit df91e2df6ba3824c3dba13c7d1a54646adfcc0e6
Headers show

Comments

Mads Kiilerich - Oct. 10, 2013, 6:52 p.m.
# HG changeset patch
# User Mads Kiilerich <madski@unity3d.com>
# Date 1380816081 -7200
#      Thu Oct 03 18:01:21 2013 +0200
# Node ID 8b625cba8c10c5d24d61d54907c5975150ca5257
# Parent  19c8e9f1869948ab5675e625b4676768a991e1f1
cmdutil: use None as default value for "function pointer" instead of False

Less type confusion.
Matt Mackall - Oct. 12, 2013, 1:24 a.m.
On Thu, 2013-10-10 at 20:52 +0200, Mads Kiilerich wrote:
> # HG changeset patch
> # User Mads Kiilerich <madski@unity3d.com>
> # Date 1380816081 -7200
> #      Thu Oct 03 18:01:21 2013 +0200
> # Node ID 8b625cba8c10c5d24d61d54907c5975150ca5257
> # Parent  19c8e9f1869948ab5675e625b4676768a991e1f1
> cmdutil: use None as default value for "function pointer" instead of False

These are queue for default, thanks.

Patch

diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -933,7 +933,7 @@ 
     regular display via changeset_printer() is done.
     """
     # options
-    patch = False
+    patch = None
     if opts.get('patch') or opts.get('stat'):
         patch = scmutil.matchall(repo)