[PATCH] Allow view limit to be specified in hgrc
Steve Borho
steve at ageia.com
Wed Nov 22 23:51:38 UTC 2006
This has been a nit of mine for some time.
I'm not subscribed to the devel list, so please reply to me directly.
Thanks.
--
Steve Borho (steve at ageia.com)
http://www.borho.org/~steve/steveAgeia.asc
Key fingerprint = 3D9C 67D5 F426 4322 075B 0795 C9B2 C3A0 97D0 C090
-------------- next part --------------
# HG changeset patch
# User Steve Borho <steve at borho.org>
# Date 1164238866 21600
# Node ID ff10826b5f8f0e0d84404734df83a2ca2d20492c
# Parent e674cae8efeeeed57a91026f015036889265081e
Allow limit to be specified in .hgrc
If the user does not specify a limit on the command line using, it
should look for one in .hgrc.
[hgk]
limit = 200
diff -r e674cae8efee -r ff10826b5f8f hgext/hgk.py
--- a/hgext/hgk.py Tue Nov 21 23:08:29 2006 -0200
+++ b/hgext/hgk.py Wed Nov 22 17:41:06 2006 -0600
@@ -279,6 +279,8 @@ def view(ui, repo, *etc, **opts):
def view(ui, repo, *etc, **opts):
"start interactive history viewer"
os.chdir(repo.root)
+ if not opts.get('limit'):
+ opts['limit'] = ui.config("hgk", "limit")
optstr = ' '.join(['--%s %s' % (k, v) for k, v in opts.iteritems() if v])
cmd = ui.config("hgk", "path", "hgk") + " %s %s" % (optstr, " ".join(etc))
ui.debug("running %s\n" % cmd)
More information about the Mercurial-devel
mailing list