[PATCH 3 of 3] ui: Add option to set number of revision hash digits displayed
Matt Mackall
mpm at selenic.com
Fri Jul 24 19:33:37 UTC 2009
On Fri, 2009-07-24 at 12:20 -0700, Eric M. Hopper wrote:
> 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.
I would do the reverse: change the non-ui users to a different name or
possibly back to hex. What are these users?
--
http://selenic.com : development and support for Mercurial and Linux
More information about the Mercurial-devel
mailing list