Patchwork D11528: dirstate-item: use `added` instead of the `state` in the `mq` extension

login
register
mail settings
Submitter phabricator
Date Oct. 1, 2021, 9:41 a.m.
Message ID <differential-rev-PHID-DREV-qerduk5w4y5oyybiex5j-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/49852/
State Superseded
Headers show

Comments

phabricator - Oct. 1, 2021, 9:41 a.m.
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  hgext/mq.py

CHANGE DETAILS




To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/hgext/mq.py b/hgext/mq.py
--- a/hgext/mq.py
+++ b/hgext/mq.py
@@ -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: