[PATCH 3 of 3] ui: Add option to set number of revision hash digits displayed

Eric M. Hopper hopper at omnifarious.org
Fri Jul 24 14:20:42 CDT 2009


On Fri, 2009-07-24 at 13:52 -0500, Matt Mackall wrote:
> On Fri, 2009-07-24 at 11:29 -0700, Eric Hopper wrote:
> > mercurial/cmdutil.py         |   4 ++--
> >  mercurial/commands.py        |  14 +++++++-------
> >  mercurial/dispatch.py        |   2 ++
> >  mercurial/patch.py           |   2 +-
> >  mercurial/ui.py              |  29 +++++++++++++++++++++++++++++
> >  tests/test-debugcomplete.out |   2 ++
> >  tests/test-extension.out     |   2 ++
> >  7 files changed, 45 insertions(+), 10 deletions(-)
> 
> Not really happy with this one. I've been careful to keep ui largely
> unaware of Mercurial's implementation details. The biggest exception is
> path handling, and I've been planning to pull that out too. If we start
> putting helper functions in ui, it's going to burst a dam and ui is
> going to grow dozens of random helpers and become very ad-hoc.
> 
> Couldn't we just update a node._shortdigits?

That could be done.  The problem is that there are a few places in which
node.short is used which aren't intended for display on the UI.  So the
node module would have to get a new function that was specifically
designed to format node identifiers for ui output.  That would be
perfectly reasonable to do though.

-- 
A word is nothing more or less than the series of historical
connotations given to it. That's HOW we derive meaning, and to claim
that there is an arbitrary meaning of words above and beyond the way
people use them is a blatant misunderstanding of the nature of language.
-- Anonymous blogger
-- Eric Hopper (hopper at omnifarious.org http://www.omnifarious.org/~hopper)--
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://selenic.com/pipermail/mercurial-devel/attachments/20090724/b0678e0e/attachment.pgp 


More information about the Mercurial-devel mailing list