Patchwork D11018: mq: use `set_tracked` in `qrename`

login
register
mail settings
Submitter phabricator
Date July 8, 2021, 7:35 a.m.
Message ID <differential-rev-PHID-DREV-bmpk4afs7bk5smeu3lhk-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/49333/
State Superseded
Headers show

Comments

phabricator - July 8, 2021, 7:35 a.m.
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  This is the new shinny API.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

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
@@ -3640,7 +3640,7 @@ 
         with r.wlock():
             if r.dirstate[patch] == b'a':
                 r.dirstate.drop(patch)
-                r.dirstate.add(name)
+                r.dirstate.set_tracked(name)
             else:
                 wctx.copy(patch, name)
                 wctx.forget([patch])