additional fixes for issue436
authorAlexis S. L. Carvalho <alexis@cecm.usp.br>
Fri, 01 Dec 2006 16:18:16 -0200
changeset 3749 f9567a7fa3b3
parent 3748 7b88bd88f040
child 3750 0f550b87deb8
child 3752 f902f409cd81
additional fixes for issue436
mercurial/fancyopts.py
tests/test-issue436
--- a/mercurial/fancyopts.py	Fri Dec 01 15:40:23 2006 +0100
+++ b/mercurial/fancyopts.py	Fri Dec 01 16:18:16 2006 -0200
@@ -11,7 +11,8 @@
         map['-'+s] = map['--'+l] = pl
         state[pl] = d
         dt[pl] = type(d)
-        if not d is None and not callable(d):
+        if (d is not None and d is not True and d is not False and
+            not callable(d)):
             if s: s += ':'
             if l: l += '='
         if s: short = short + s
@@ -25,6 +26,7 @@
         elif dt[map[opt]] is type(''): state[map[opt]] = arg
         elif dt[map[opt]] is type([]): state[map[opt]].append(arg)
         elif dt[map[opt]] is type(None): state[map[opt]] = True
+        elif dt[map[opt]] is type(False): state[map[opt]] = True
 
     return args
 
--- a/tests/test-issue436	Fri Dec 01 15:40:23 2006 +0100
+++ b/tests/test-issue436	Fri Dec 01 16:18:16 2006 -0200
@@ -2,5 +2,6 @@
 
 hg init a
 cd a
+hg -v log -v
 hg -v log -v x
 true