Mercurial > python-hglib
changeset 105:86ff8611a8fa 0.3
client: always set HGPLAIN=1 (issue3502)
Not setting it breaks output parsing on some commands.
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Mon, 15 Oct 2012 09:45:43 -0700 |
parents | 6e423f7c784f |
children | 7ce1c3b93414 |
files | hglib/client.py tests/test-diff.py tests/test-update.py |
diffstat | 3 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/hglib/client.py Thu Mar 01 23:16:07 2012 -0500 +++ b/hglib/client.py Mon Oct 15 09:45:43 2012 -0700 @@ -48,7 +48,7 @@ self._args += ['-R', path] if configs: self._args += ['--config'] + configs - self._env = {} + self._env = {'HGPLAIN': '1'} if encoding: self._env['HGENCODING'] = encoding
--- a/tests/test-diff.py Thu Mar 01 23:16:07 2012 -0500 +++ b/tests/test-diff.py Mon Oct 15 09:45:43 2012 -0700 @@ -38,3 +38,7 @@ +a """ % (node0[:12], node1[:12]) self.assertEquals(diff4, self.client.diff(revs=[rev0, rev1], nodates=True)) + + def test_basic_plain(self): + open('.hg/hgrc', 'a').write('[defaults]\ndiff=--git\n') + self.test_basic()
--- a/tests/test-update.py Thu Mar 01 23:16:07 2012 -0500 +++ b/tests/test-update.py Mon Oct 15 09:45:43 2012 -0700 @@ -66,3 +66,7 @@ u, m, r, ur = self.client.update(clean=True) self.assertEquals(u, 1) self.assertEquals(old, open('a').read()) + + def test_basic_plain(self): + open('.hg/hgrc', 'a').write('[defaults]\nupdate=-v\n') + self.test_basic()