On 3/21/17 6:50 PM, Jun Wu wrote:
Excerpts from Augie Fackler's message of 2017-03-21 14:35:43 -0400:
On Mon, Mar 20, 2017 at 12:39:11PM +0000, Ryan McElroy wrote:
Overall, I like the functionality this series adds, but I'm less convinced
on the specific implementation. Adding more stuff to the junkyard that is
the "ui" class doesn't feel awesome, and I'm concerned with how it will
interact with chg and a future direction of ui immutability.
+1 overall on this paragraph - please avoid adding things to ui if you can.

(The rest of this thread appears to be going in a healthy direction,
so by all means carry on yourselves and do a resend when you've worked
out something you're happy with.)
I think ui.args is useful. We can probably avoid "ui.commandname" (use
"ui.args[0]" as an approximate).

It's currently painful for anyone who wants the "sys.argv" information, for
example the journal extension. For now, it has to be done via wrapping
dispatch.runcommand.

I agree that this seems useful, and cleaning up journal to not need to wrap this would be nice. I also can't think of a better place to put this info than 'ui' right now. I'm leaning towards saying "okay".

Unfortunately, it can't replace `ui.commandname` I'm afraid: `hg st` might become "status" or it might become "log" because I have an alias. We can't rely on the full command line args to reliably determine what command we dispatch to because of the indirection layer.


_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to