equal
deleted
inserted
replaced
9 |
9 |
10 from mercurial.i18n import _ |
10 from mercurial.i18n import _ |
11 import common, server |
11 import common, server |
12 import errno, os, socket, struct |
12 import errno, os, socket, struct |
13 |
13 |
14 class QueryFailed(Exception): pass |
14 class QueryFailed(Exception): |
|
15 pass |
15 |
16 |
16 def start_server(function): |
17 def start_server(function): |
17 """ |
18 """ |
18 Decorator. |
19 Decorator. |
19 Tries to call function, if it fails, try to (re)start inotify server. |
20 Tries to call function, if it fails, try to (re)start inotify server. |
135 for n in names: |
136 for n in names: |
136 yield n |
137 yield n |
137 states = 'almrx!' |
138 states = 'almrx!' |
138 if ignored: |
139 if ignored: |
139 raise ValueError('this is insanity') |
140 raise ValueError('this is insanity') |
140 if clean: states += 'c' |
141 if clean: |
141 if unknown: states += '?' |
142 states += 'c' |
|
143 if unknown: |
|
144 states += '?' |
142 yield states |
145 yield states |
143 |
146 |
144 req = '\0'.join(genquery()) |
147 req = '\0'.join(genquery()) |
145 |
148 |
146 cs, resphdr = self.query('STAT', req) |
149 cs, resphdr = self.query('STAT', req) |