D6441: help: check if a subtopic exists and raise an error if it doesn't (issue6145)

2019-05-29 Thread ngoldbaum (Nathan Goldbaum)
This revision was automatically updated to reflect the committed changes. Closed by commit rHGa84564b1a0b1: help: check if a subtopic exists and raise an error if it doesnt (issue6145) (authored by ngoldbaum, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D6441: help: check if a subtopic exists and raise an error if it doesn't (issue6145)

2019-05-26 Thread ngoldbaum (Nathan Goldbaum)
ngoldbaum updated this revision to Diff 15268. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D6441?vs=15258=15268 REVISION DETAIL https://phab.mercurial-scm.org/D6441 AFFECTED FILES mercurial/help.py CHANGE DETAILS diff --git a/mercurial/help.py

D6441: help: check if a subtopic exists and raise an error if it doesn't (issue6145)

2019-05-25 Thread pulkit (Pulkit Goyal)
pulkit added inline comments. INLINE COMMENTS > ngoldbaum wrote in help.py:689-695 > OK, I agree that's clearer. I used `_` to match `header` and `doc` to make > the line a bit shorter and to make it a bit clearer for me to read since > those aren't being used. This should work but we have

D6441: help: check if a subtopic exists and raise an error if it doesn't (issue6145)

2019-05-25 Thread ngoldbaum (Nathan Goldbaum)
ngoldbaum added inline comments. INLINE COMMENTS > martinvonz wrote in help.py:689-695 > I avoid for-else for the same reason, but how about this: > > if not any(subtopic in names for names, header, doc in subtopics[name]): > raise error.UnknownCommand(name) OK, I agree that's clearer.

D6441: help: check if a subtopic exists and raise an error if it doesn't (issue6145)

2019-05-25 Thread ngoldbaum (Nathan Goldbaum)
ngoldbaum updated this revision to Diff 15258. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D6441?vs=15246=15258 REVISION DETAIL https://phab.mercurial-scm.org/D6441 AFFECTED FILES mercurial/help.py CHANGE DETAILS diff --git a/mercurial/help.py

D6441: help: check if a subtopic exists and raise an error if it doesn't (issue6145)

2019-05-24 Thread martinvonz (Martin von Zweigbergk)
martinvonz requested changes to this revision. martinvonz added inline comments. This revision now requires changes to proceed. INLINE COMMENTS > ngoldbaum wrote in help.py:689-695 > I left this as-is because I find for-else statements hard to read (I never > remember what it means!) and find

D6441: help: check if a subtopic exists and raise an error if it doesn't (issue6145)

2019-05-24 Thread ngoldbaum (Nathan Goldbaum)
ngoldbaum added inline comments. INLINE COMMENTS > av6 wrote in help.py:689-695 > This made me remember that for-else statement exists. I left this as-is because I find for-else statements hard to read (I never remember what it means!) and find this to be clearer even if there's a bit more

D6441: help: check if a subtopic exists and raise an error if it doesn't (issue6145)

2019-05-24 Thread av6 (Anton Shestakov)
av6 added inline comments. INLINE COMMENTS > help.py:689-695 > +exists = False > for names, header, doc in subtopics[name]: > if subtopic in names: > +exists = True > break > +if not exists: > +

D6441: help: check if a subtopic exists and raise an error if it doesn't (issue6145)

2019-05-23 Thread ngoldbaum (Nathan Goldbaum)
ngoldbaum 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/D6441 AFFECTED FILES mercurial/help.py CHANGE DETAILS diff --git a/mercurial/help.py