dirstate-item: use `added` instead of the `state` in the `mq` extension
authorPierre-Yves David <pierre-yves.david@octobus.net>
Wed, 29 Sep 2021 14:56:05 +0200
changeset 48091 bac753df8021
parent 48090 5b6ffd6be480
child 48092 0dc9ced02a3b
dirstate-item: use `added` instead of the `state` in the `mq` extension Differential Revision: https://phab.mercurial-scm.org/D11528
hgext/mq.py
--- a/hgext/mq.py	Wed Sep 29 14:55:29 2021 +0200
+++ b/hgext/mq.py	Wed Sep 29 14:56:05 2021 +0200
@@ -3638,7 +3638,7 @@
     if r and patch in r.dirstate:
         wctx = r[None]
         with r.wlock():
-            if r.dirstate[patch] == b'a':
+            if r.dirstate.get_entry(patch).added:
                 r.dirstate.set_untracked(patch)
                 r.dirstate.set_tracked(name)
             else: