comparison tests/test-context.py @ 42056:4950ae4d034f

tests: rename "u" to more usual "ui" in test-context.py Differential Revision: https://phab.mercurial-scm.org/D6191
author Martin von Zweigbergk <martinvonz@google.com>
date Wed, 19 Jul 2017 13:17:49 -0700
parents 0bd56c291359
children 2372284d9457
comparison
equal deleted inserted replaced
42055:b9e5f3853a97 42056:4950ae4d034f
25 def printb(data, end=b'\n'): 25 def printb(data, end=b'\n'):
26 out = getattr(sys.stdout, 'buffer', sys.stdout) 26 out = getattr(sys.stdout, 'buffer', sys.stdout)
27 out.write(data + end) 27 out.write(data + end)
28 out.flush() 28 out.flush()
29 29
30 u = uimod.ui.load() 30 ui = uimod.ui.load()
31 31
32 repo = hg.repository(u, b'test1', create=1) 32 repo = hg.repository(ui, b'test1', create=1)
33 os.chdir('test1') 33 os.chdir('test1')
34 34
35 # create 'foo' with fixed time stamp 35 # create 'foo' with fixed time stamp
36 f = open('foo', 'wb') 36 f = open('foo', 'wb')
37 f.write(b'foo\n') 37 f.write(b'foo\n')
170 os.chdir('..') 170 os.chdir('..')
171 171
172 # test manifestlog being changed 172 # test manifestlog being changed
173 print('== commit with manifestlog invalidated') 173 print('== commit with manifestlog invalidated')
174 174
175 repo = hg.repository(u, b'test2', create=1) 175 repo = hg.repository(ui, b'test2', create=1)
176 os.chdir('test2') 176 os.chdir('test2')
177 177
178 # make some commits 178 # make some commits
179 for i in [b'1', b'2', b'3']: 179 for i in [b'1', b'2', b'3']:
180 with open(i, 'wb') as f: 180 with open(i, 'wb') as f: