# HG changeset patch # User Yuya Nishihara # Date 1501684996 -32400 # Node ID 9062a6b935ad45a443349cc590f70f2e194ad4c4 # Parent d06b480016620be412ee3eee45822fdd3062fc0f summary: parse commit line less strictly (issue5637) diff -r d06b48001662 -r 9062a6b935ad hglib/client.py --- a/hglib/client.py Wed Jul 19 14:48:40 2017 +0200 +++ b/hglib/client.py Wed Aug 02 23:43:16 2017 +0900 @@ -1597,7 +1597,7 @@ elif name == b('branch'): pass elif name == b('commit'): - value = value == b('(clean)') + value = b('(clean)') in value elif name == b('update'): if value == b('(current)'): value = 0 diff -r d06b48001662 -r 9062a6b935ad tests/test-summary.py --- a/tests/test-summary.py Wed Jul 19 14:48:40 2017 +0200 +++ b/tests/test-summary.py Wed Aug 02 23:43:16 2017 +0900 @@ -1,3 +1,4 @@ +import unittest from tests import common import hglib from hglib.util import b @@ -38,6 +39,15 @@ self.assertEquals(self.client.summary(), d) + def test_secret_commit_clean(self): + if self.client.version < (2, 1): + raise unittest.SkipTest('phase not supported') + self.append('a', 'a') + rev, node = self.client.commit(b('first'), addremove=True) + self.client.phase([b('%d') % rev], secret=True, force=True) + e = self.client.summary() + self.assertTrue(e[b('commit')]) + def test_update(self): self.append('a', 'a') rev, node = self.client.commit(b('first'), addremove=True)