Details
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
Event Timeline
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?
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.
I don't feel strongly either. Martin, if you want to pursue this (which seems fine to me) why not make ocmmands.py consistent as well?
@martinvonz do you want to pursue this or can this be mark as abandoned? (Trying to close differentials which are no longer required)
Just for record, today I hit the problem where some command is using opts[''] instead of opts.get() and I was calling command function as plain function leading me to KeyError.
It would be nice to have some official API to call a command as a function. Such function would do the same processing as the dispatch logic to validate input and install default value.