mergestate: consistently set variables to None
Some code branches and exceptional circumstances such as empty
mergestate files could result in mergestate._local and
mergestate._other not being defined or reset to None. These variables
are now correctly set to None when they should be.
--- a/mercurial/merge.py Wed May 07 17:22:34 2014 -0700
+++ b/mercurial/merge.py Thu May 08 16:48:28 2014 -0700
@@ -55,6 +55,8 @@
def reset(self, node=None, other=None):
self._state = {}
+ self._local = None
+ self._other = None
if node:
self._local = node
self._other = other
@@ -68,6 +70,8 @@
of on disk file.
"""
self._state = {}
+ self._local = None
+ self._other = None
records = self._readrecords()
for rtype, record in records:
if rtype == 'L':