diff -r 7356e6b1f5b8 -r 144d8fe266d9 mercurial/cmdutil.py --- a/mercurial/cmdutil.py Fri Oct 14 01:53:15 2016 +0200 +++ b/mercurial/cmdutil.py Fri Oct 14 01:53:15 2016 +0200 @@ -3526,10 +3526,11 @@ def __init__(self, repo, name): self._repo = repo + self._active = False + self._closed = False self._suffix = '.backup.%s.%d' % (name, id(self)) repo.dirstate.savebackup(repo.currenttransaction(), self._suffix) self._active = True - self._closed = False def __del__(self): if self._active: # still active