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])