Skip to content
Snippets Groups Projects
Commit 144d8fe2 authored by Mads Kiilerich's avatar Mads Kiilerich
Browse files

cmdutil: satisfy expections in dirstateguard.__del__, even if __init__ fails

Python "delstructors" are terrible - this one because it assumed that __init__
had completed before it was called. That would not necessarily be the case if
the repository was read only or broken and saving the dirstate thus failed in
unexpected ways. That could give confusing warnings about missing '_active'
after failures.

To fix that, make sure all member variables are "declared" before doing
anything that possibly could fail. [Famous last words.]
parent 7356e6b1
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment