D2593: state: add logic to parse the state file in old way if cbor fails

pulkit (Pulkit Goyal) phabricator at mercurial-scm.org
Sat Mar 3 14:21:53 EST 2018


pulkit added inline comments.

INLINE COMMENTS

> state.py:84
> +                    if not isinstance(ret, dict):
> +                        raise Exception("cbor parsed it wrong")
> +                    return ret

I am not confident about this part. Like to have some suggestions here.

> state.py:86
> +                    return ret
> +        except:     # cbor raises an Exception
> +            with self._repo.vfs(self.fname, 'rb') as fp:

Should I change thirdparty/cbor/ to raise specific errors?

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D2593

To: pulkit, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list