comparison tests/test-log-exthook.t @ 35888:c8e2d6ed1f9e

cmdutil: drop aliases for logcmdutil functions (API) .. api:: Log-related utility functions has been renamed as follows: - cmdutil.loglimit -> logcmdutil.getlimit - cmdutil.diffordiffstat -> logcmdutil.diffordiffstat - cmdutil._changesetlabels -> logcmdutil.changesetlabels - cmdutil.changeset_printer -> logcmdutil.changesetprinter - cmdutil.jsonchangeset = logcmdutil.jsonchangeset - cmdutil.changeset_templater -> logcmdutil.changesettemplater - cmdutil.logtemplatespec -> logcmdutil.templatespec - cmdutil.makelogtemplater -> logcmdutil.maketemplater - cmdutil.show_changeset -> logcmdutil.changesetdisplayer - cmdutil.getlogrevs -> logcmdutil.getrevs - cmdutil.getloglinerangerevs -> logcmdutil.getlinerangerevs - cmdutil.displaygraph -> logcmdutil.displaygraph - cmdutil.graphlog -> logcmdutil.graphlog - cmdutil.checkunsupportedgraphflags -> logcmdutil.checkunsupportedgraphflags - cmdutil.graphrevs -> logcmdutil.graphrevs - cmdutil._makenofollowlogfilematcher -> logcmdutil._makenofollowfilematcher
author Yuya Nishihara <yuya@tcha.org>
date Sun, 21 Jan 2018 13:03:03 +0900
parents bfafd189edd9
children 2b9f315a4217
comparison
equal deleted inserted replaced
35887:572f36e9a780 35888:c8e2d6ed1f9e
2 ------------------------------------------- 2 -------------------------------------------
3 3
4 $ cat > $TESTTMP/logexthook.py <<EOF 4 $ cat > $TESTTMP/logexthook.py <<EOF
5 > from __future__ import absolute_import 5 > from __future__ import absolute_import
6 > from mercurial import ( 6 > from mercurial import (
7 > cmdutil,
8 > commands, 7 > commands,
8 > logcmdutil,
9 > repair, 9 > repair,
10 > ) 10 > )
11 > def rot13description(self, ctx): 11 > def rot13description(self, ctx):
12 > summary = "summary".encode('rot13') 12 > summary = "summary".encode('rot13')
13 > description = ctx.description().strip().splitlines()[0].encode('rot13') 13 > description = ctx.description().strip().splitlines()[0].encode('rot13')
14 > self.ui.write("%s: %s\n" % (summary, description)) 14 > self.ui.write("%s: %s\n" % (summary, description))
15 > def reposetup(ui, repo): 15 > def reposetup(ui, repo):
16 > cmdutil.changeset_printer._exthook = rot13description 16 > logcmdutil.changesetprinter._exthook = rot13description
17 > EOF 17 > EOF
18 18
19 Prepare the repository 19 Prepare the repository
20 20
21 $ hg init empty 21 $ hg init empty