comparison hgext/mq.py @ 47601:4dca29b00405

mq: use `set_untracked` in `qrename` This is the new shiny API. Differential Revision: https://phab.mercurial-scm.org/D11021
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Thu, 08 Jul 2021 04:26:30 +0200
parents 305356a7ec99
children c9e412712e0c
comparison
equal deleted inserted replaced
47600:f636dfe83554 47601:4dca29b00405
3638 r = q.qrepo() 3638 r = q.qrepo()
3639 if r and patch in r.dirstate: 3639 if r and patch in r.dirstate:
3640 wctx = r[None] 3640 wctx = r[None]
3641 with r.wlock(): 3641 with r.wlock():
3642 if r.dirstate[patch] == b'a': 3642 if r.dirstate[patch] == b'a':
3643 r.dirstate.drop(patch) 3643 r.dirstate.set_untracked(patch)
3644 r.dirstate.set_tracked(name) 3644 r.dirstate.set_tracked(name)
3645 else: 3645 else:
3646 wctx.copy(patch, name) 3646 wctx.copy(patch, name)
3647 wctx.forget([patch]) 3647 wctx.forget([patch])
3648 3648