Patchwork [hglib,v2] log: fix 'hidden' option

login
register
mail settings
Submitter Julien Cristau
Date Jan. 27, 2014, 10:12 a.m.
Message ID <b9d2b779570f75044255.1390817555@crater2.logilab.fr>
Download mbox | patch
Permalink /patch/3412/
State Deferred
Headers show

Comments

Julien Cristau - Jan. 27, 2014, 10:12 a.m.
# HG changeset patch
# User Julien Cristau <julien.cristau@logilab.fr>
# Date 1390811395 -3600
#      Mon Jan 27 09:29:55 2014 +0100
# Node ID b9d2b779570f75044255eb00365c56bba8d7dcab
# Parent  e738d6fe5f3ff613a4ee2c0d759eee0ee4f5c9ff
log: fix 'hidden' option

We were passing -h, which is 'help', not 'hidden'.
Pierre-Yves David - Jan. 29, 2014, 3:14 a.m.
sounds simple and straighforward.

Looks good to me
Matt Mackall - Feb. 1, 2014, 9:30 p.m.
On Mon, 2014-01-27 at 11:12 +0100, Julien Cristau wrote:
> # HG changeset patch
> # User Julien Cristau <julien.cristau@logilab.fr>
> # Date 1390811395 -3600
> #      Mon Jan 27 09:29:55 2014 +0100
> # Node ID b9d2b779570f75044255eb00365c56bba8d7dcab
> # Parent  e738d6fe5f3ff613a4ee2c0d759eee0ee4f5c9ff
> log: fix 'hidden' option

Pushed to hglib, thanks.

Patch

diff --git a/hglib/client.py b/hglib/client.py
--- a/hglib/client.py
+++ b/hglib/client.py
@@ -942,11 +942,11 @@  class hgclient(object):
         exclude - exclude names matching the given patterns
         """
         args = cmdbuilder('log', 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,
+                          m=onlymerges, u=user, b=branch, P=prune, hidden=hidden,
                           l=limit, M=nomerges, I=include, X=exclude, *files)
 
         out = self.rawcommand(args)
         out = out.split('\0')[:-1]
 
diff --git a/tests/test-log.py b/tests/test-log.py
--- a/tests/test-log.py
+++ b/tests/test-log.py
@@ -15,10 +15,12 @@  class test_log(common.basetest):
         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']))
 
+        self.assertEquals(self.client.log(), self.client.log(hidden=True))
+
     # def test_errors(self):
     #     self.assertRaisesRegexp(CommandError, 'abort: unknown revision', self.client.log, 'foo')
     #     self.append('a', 'a')
     #     self.client.commit('first', addremove=True)
-    #     self.assertRaisesRegexp(CommandError, 'abort: unknown revision', self.client.log, 'bar')
\ No newline at end of file
+    #     self.assertRaisesRegexp(CommandError, 'abort: unknown revision', self.client.log, 'bar')