debugcommands: replace opts.get('foo') by opts['foo']
Needs ReviewPublic

Authored by martinvonz on Dec 14 2017, 6:35 PM.

Details

Reviewers
None
Group Reviewers
hg-reviewers
Summary

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped
martinvonz created this revision.Dec 14 2017, 6:35 PM
yuja added a subscriber: yuja.Dec 15 2017, 8:29 AM

Queued the first three patches, but I'm not certain about this. Sometimes we
do the reverse change for ease of calling command function as a plain function.

In D1694#29072, @yuja wrote:

Queued the first three patches, but I'm not certain about this. Sometimes we
do the reverse change for ease of calling command function as a plain function.

I think it's probably okay for debug commands, those are pretty rare to use as a function aren't they?

yuja added a comment.Fri, Jan 12, 7:17 AM

I think it's probably okay for debug commands, those are pretty rare to use as a function aren't they?

Yeah, it's okay, but why do we apply a different rule to debug commands?

If we take this, I'd rather replace .get() by [] everywhere to blame third-party
tools which don't pass all options.