comparison mercurial/cmdutil.py @ 46969:d9531094cf8e

cmdutil: fix an uninitialize variable usage in clearunfinished() I happened to notice that PyCharm flagged this while looking for something else. I'm pretty sure it meant to check the current state in the iteration, and not keep reusing the last one in the previous iteration. Differential Revision: https://phab.mercurial-scm.org/D10459
author Matt Harbison <matt_harbison@yahoo.com>
date Sat, 17 Apr 2021 00:28:21 -0400
parents ad878e3f282b
children d55b71393907 f38bf44e077f
comparison
equal deleted inserted replaced
46968:2c843ad68528 46969:d9531094cf8e
3774 continue 3774 continue
3775 if not state._clearable and state.isunfinished(repo): 3775 if not state._clearable and state.isunfinished(repo):
3776 raise error.StateError(state.msg(), hint=state.hint()) 3776 raise error.StateError(state.msg(), hint=state.hint())
3777 3777
3778 for s in statemod._unfinishedstates: 3778 for s in statemod._unfinishedstates:
3779 if s._opname == b'merge' or state._reportonly: 3779 if s._opname == b'merge' or s._reportonly:
3780 continue 3780 continue
3781 if s._clearable and s.isunfinished(repo): 3781 if s._clearable and s.isunfinished(repo):
3782 util.unlink(repo.vfs.join(s._fname)) 3782 util.unlink(repo.vfs.join(s._fname))
3783 3783
3784 3784