D2596: state: raise ProgrammingError if an invalid key is being accessed
pulkit (Pulkit Goyal)
phabricator at mercurial-scm.org
Sun Mar 4 15:50:53 EST 2018
pulkit added a comment.
In https://phab.mercurial-scm.org/D2596#42818, @yuja wrote:
> In https://phab.mercurial-scm.org/D2596#42678, @pulkit wrote:
>
> > In https://phab.mercurial-scm.org/D2596#42672, @durin42 wrote:
> >
> > > Hmm, really? Do any states have optional entries that would make this awkward?
> >
> >
> > Nope, but I wanted to be safe here raising a ProgrammingError instead of KeyError.
>
>
> I don't follow, but what if the state file was written by old hg client where some new keys
> were missing, and read by new client? Perhaps we'll have to support that scenario.
I am going to drop this patch for now so in cases which Yuya mentioned, we can catch the KeyError to realize that key is not available.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D2596
To: pulkit, #hg-reviewers
Cc: yuja, durin42, mercurial-devel
More information about the Mercurial-devel
mailing list