[Commented On] D10014: debugcommands: prevent using `is False`

baymax (Baymax, Your Personal Patch-care Companion) phabricator at mercurial-scm.org
Fri Mar 5 18:17:53 UTC 2021


baymax added a comment.
baymax updated this revision to Diff 26109.


  ✅ refresh by Heptapod after a successful CI run (🐙 💚)

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D10014?vs=25651&id=26109

BRANCH
  default

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D10014/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D10014

AFFECTED FILES
  mercurial/debugcommands.py

CHANGE DETAILS

diff --git a/mercurial/debugcommands.py b/mercurial/debugcommands.py
--- a/mercurial/debugcommands.py
+++ b/mercurial/debugcommands.py
@@ -3870,10 +3870,10 @@
         tagsnode = cache.getfnode(node, computemissing=False)
         if tagsnode:
             tagsnodedisplay = hex(tagsnode)
-        elif tagsnode is False:
+        elif tagsnode is None:
+            tagsnodedisplay = b'missing'
+        else:
             tagsnodedisplay = b'invalid'
-        else:
-            tagsnodedisplay = b'missing'
 
         ui.write(b'%d %s %s\n' % (r, hex(node), tagsnodedisplay))
 



To: pulkit, #hg-reviewers, Alphare, marmoute
Cc: marmoute, Alphare, mharbison72, mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20210305/0c0cb732/attachment-0002.html>


More information about the Mercurial-patches mailing list