This patch stores the command which is going to run in the ui object in
_internal.command. This will help us in checking which command we are running
where ever we need command specific logic instead of putting the logic in every
command.
Details
- Reviewers
pulkit - Group Reviewers
hg-reviewers
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
Event Timeline
This reminds me the following patch series. The discussion was quite long, but
IIRC, we generally liked the functionality, but didn't like the implementation
that abuses "ui" object.
http://mercurial.markmail.org/message/4wlaxqjqs74vpyxy
This will help us in checking which command we are running
where ever we need command specific logic instead of putting the logic in every
command.
Do you have any usage example?
tests/test-basic.t | ||
---|---|---|
5 | Perhaps this shouldn't be exposed (i.e. shouldn't be a config value.) |
This is for directaccess as directaccess originally designed (https://www.mercurial-scm.org/repo/evolve/rev/b8f880d417)
It may be cleaner to use a flag of scmutil.rev* instead. So commands themselves could decide whether to enable directaccess or not.
My understanding is that we're moving towards a marker in the command registrar to decide what repo filter to use, which seems cleaner. Please reopen this (and commandeer it if needed) if I'm wrong. Thanks!
Perhaps this shouldn't be exposed (i.e. shouldn't be a config value.)