D2596: state: raise ProgrammingError if an invalid key is being accessed

2018-03-04 Thread pulkit (Pulkit Goyal)
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 w

D2596: state: raise ProgrammingError if an invalid key is being accessed

2018-03-04 Thread yuja (Yuya Nishihara)
yuja added a comment. 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 rais

D2596: state: raise ProgrammingError if an invalid key is being accessed

2018-03-04 Thread pulkit (Pulkit Goyal)
pulkit added a comment. 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. REPOSITORY rHG Mercurial

D2596: state: raise ProgrammingError if an invalid key is being accessed

2018-03-04 Thread durin42 (Augie Fackler)
durin42 added a comment. Hmm, really? Do any states have optional entries that would make this awkward? REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D2596 To: pulkit, #hg-reviewers Cc: durin42, mercurial-devel ___ Mer

D2596: state: raise ProgrammingError if an invalid key is being accessed

2018-03-03 Thread pulkit (Pulkit Goyal)
pulkit created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D2596 AFFECTED FILES mercurial/state.py CHANGE DETAILS diff --git a/mercurial/state.py b/mercurial/stat