# HG changeset patch # User Idan Kamara # Date 1313008077 -10800 # Node ID b68c444d42bb4bdecff44af0bb1dfe287df45fdc # Parent 943aff89b06828d47304bf247058035fb446cedf client: add missing options to log() leaving --patch/stat out for now diff -r 943aff89b068 -r b68c444d42bb hglib/client.py --- a/hglib/client.py Wed Aug 10 20:33:08 2011 +0300 +++ b/hglib/client.py Wed Aug 10 23:27:57 2011 +0300 @@ -266,8 +266,15 @@ out = util.eatlines(out, 2).split('\0')[:-1] return self._parserevs(out) - def log(self, revrange=None): - args = cmdbuilder('log', template=templates.changeset, rev=revrange) + def log(self, revrange=None, files=[], follow=False, followfirst=False, + date=None, copies=False, keyword=None, removed=False, onlymerges=False, + user=None, branch=None, prune=None, hidden=False, limit=None, + nomerges=False, include=None, exclude=None): + args = cmdbuilder('log', *files, template=templates.changeset, + r=revrange, f=follow, follow_first=followfirst, + d=date, C=copies, k=keyword, removed=removed, + m=onlymerges, u=user, b=branch, P=prune, h=hidden, + l=limit, M=nomerges, I=include, X=exclude) out = self.rawcommand(args) out = out.split('\0')[:-1] diff -r 943aff89b068 -r b68c444d42bb tests/test-log.py --- a/tests/test-log.py Wed Aug 10 20:33:08 2011 +0300 +++ b/tests/test-log.py Wed Aug 10 23:27:57 2011 +0300 @@ -15,3 +15,4 @@ self.assertEquals(revs[1].node, node1) self.assertEquals(revs[0], self.client.log('0')[0]) + self.assertEquals(self.client.log(), self.client.log(files=['a']))