[TUI] goto: allow to pass any changeid, not only the rev (closes #92736)

authorAlain Leufroy <alain.leufroy@logilab.fr>
changesetb3fe9075ff7c
branchdefault
phasepublic
hiddenno
parent revision#d658b7947d08 [qt] bookmark: add a bookmark entry in changeset content (closes #92750)
child revision#e381089a11b4 merge main, #a0b771f78812 [qt] add url to icon refs
files modified by this revision
hgviewlib/curses/hgrepoviewer.py
# HG changeset patch
# User Alain Leufroy <alain.leufroy@logilab.fr>
# Date 1336054754 -7200
# Thu May 03 16:19:14 2012 +0200
# Node ID b3fe9075ff7c78abb3f5a6bb486864ae1f1d5c87
# Parent d658b7947d08e4f99363a8758c50240f0f9eac53
[TUI] goto: allow to pass any changeid, not only the rev (closes #92736)

diff --git a/hgviewlib/curses/hgrepoviewer.py b/hgviewlib/curses/hgrepoviewer.py
@@ -62,13 +62,14 @@
1              'hex':hex_,
2              'phase':ctx.phasestr()}
3 
4      def register_commands(self):
5          '''Register commands and connect commands for bodies'''
6 +        cnvt = lambda entry: self.walker.repo[entry].rev()
7          register_command(
8                  ('goto', 'g'), 'Set focus on a particular revision',
9 -                CA('revision', int,
10 +                CA('revision', cnvt,
11                  'The revision number to focus on (default to last)'))
12          register_command(
13                  ('toggle-hidden',), 'Show/hide hidden changesets',)
14          connect_command('toggle-hidden', self.toggle_hidden)
15          self.graphlog_walker.connect_commands()