Mercurial > python-hglib
diff hglib/client.py @ 6:96f8c5095e2e
client: use --template instead of --style for cset display
author | Idan Kamara <idankk86@gmail.com> |
---|---|
date | Sat, 23 Jul 2011 22:55:39 +0300 |
parents | 3182303f388d |
children | 3ac38d500d68 |
line wrap: on
line diff
--- a/hglib/client.py Tue Aug 09 00:39:27 2011 +0300 +++ b/hglib/client.py Sat Jul 23 22:55:39 2011 +0300 @@ -1,5 +1,5 @@ import subprocess, os, struct, cStringIO, collections -import hglib, error, util +import hglib, error, util, templates from util import cmdbuilder @@ -9,10 +9,6 @@ outputfmtsize = struct.calcsize(outputfmt) retfmt = '>i' - # XXX fix this hack - _stylesdir = os.path.join(os.path.dirname(__file__), 'styles') - revstyle = os.path.join(_stylesdir, 'rev.style') - revision = collections.namedtuple('revision', 'rev, node, tags, ' 'branch, author, desc') @@ -190,7 +186,7 @@ return d def log(self, revrange=None): - args = cmdbuilder('log', style=hgclient.revstyle, rev=revrange) + args = cmdbuilder('log', template=templates.changeset, rev=revrange) out = self.rawcommand(args) out = out.split('\0')[:-1] @@ -200,7 +196,7 @@ def incoming(self, revrange=None, path=None): args = cmdbuilder('incoming', path, - style=hgclient.revstyle, rev=revrange) + template=templates.changeset, rev=revrange) def eh(ret, out, err): if ret != 1: @@ -215,7 +211,7 @@ def outgoing(self, revrange=None, path=None): args = cmdbuilder('outgoing', - path, style=hgclient.revstyle, rev=revrange) + path, template=templates.changeset, rev=revrange) def eh(ret, out, err): if ret != 1: @@ -264,7 +260,7 @@ self.rawcommand(args) def tip(self): - args = cmdbuilder('tip', style=hgclient.revstyle) + args = cmdbuilder('tip', template=templates.changeset) out = self.rawcommand(args) out = out.split('\0')