Show More
@@ -8,15 +8,15 b' mock bugzilla driver for testing templat' | |||||
8 | > configtable = {} |
|
8 | > configtable = {} | |
9 | > configitem = registrar.configitem(configtable) |
|
9 | > configitem = registrar.configitem(configtable) | |
10 | > |
|
10 | > | |
11 | > configitem('bugzilla', 'mocklog', |
|
11 | > configitem(b'bugzilla', b'mocklog', | |
12 | > default=None, |
|
12 | > default=None, | |
13 | > ) |
|
13 | > ) | |
14 | > def extsetup(ui): |
|
14 | > def extsetup(ui): | |
15 | > bugzilla = extensions.find('bugzilla') |
|
15 | > bugzilla = extensions.find(b'bugzilla') | |
16 | > class bzmock(bugzilla.bzaccess): |
|
16 | > class bzmock(bugzilla.bzaccess): | |
17 | > def __init__(self, ui): |
|
17 | > def __init__(self, ui): | |
18 | > super(bzmock, self).__init__(ui) |
|
18 | > super(bzmock, self).__init__(ui) | |
19 | > self._logfile = ui.config('bugzilla', 'mocklog') |
|
19 | > self._logfile = ui.config(b'bugzilla', b'mocklog') | |
20 | > def updatebug(self, bugid, newstate, text, committer): |
|
20 | > def updatebug(self, bugid, newstate, text, committer): | |
21 | > with open(self._logfile, 'a') as f: |
|
21 | > with open(self._logfile, 'a') as f: | |
22 | > f.write('update bugid=%r, newstate=%r, committer=%r\n' |
|
22 | > f.write('update bugid=%r, newstate=%r, committer=%r\n' | |
@@ -26,7 +26,7 b' mock bugzilla driver for testing templat' | |||||
26 | > with open(self._logfile, 'a') as f: |
|
26 | > with open(self._logfile, 'a') as f: | |
27 | > f.write('notify bugs=%r, committer=%r\n' |
|
27 | > f.write('notify bugs=%r, committer=%r\n' | |
28 | > % (bugs, committer)) |
|
28 | > % (bugs, committer)) | |
29 | > bugzilla.bugzilla._versions['mock'] = bzmock |
|
29 | > bugzilla.bugzilla._versions[b'mock'] = bzmock | |
30 | > EOF |
|
30 | > EOF | |
31 |
|
31 | |||
32 | set up mock repository: |
|
32 | set up mock repository: |
General Comments 0
You need to be logged in to leave comments.
Login now