Show More
@@ -31,10 +31,9 postfinalizegenerators = set([ | |||
|
31 | 31 | 'dirstate' |
|
32 | 32 | ]) |
|
33 | 33 | |
|
34 | class GenerationGroup(object): | |
|
35 | all='all' | |
|
36 |
|
|
|
37 | postfinalize='postfinalize' | |
|
34 | gengroupall='all' | |
|
35 | gengroupprefinalize='prefinalize' | |
|
36 | gengrouppostfinalize='postfinalize' | |
|
38 | 37 | |
|
39 | 38 | def active(func): |
|
40 | 39 | def _active(self, *args, **kwds): |
@@ -289,7 +288,7 class transaction(object): | |||
|
289 | 288 | # but for bookmarks that are handled outside this mechanism. |
|
290 | 289 | self._filegenerators[genid] = (order, filenames, genfunc, location) |
|
291 | 290 | |
|
292 |
def _generatefiles(self, suffix='', group= |
|
|
291 | def _generatefiles(self, suffix='', group=gengroupall): | |
|
293 | 292 | # write files registered for generation |
|
294 | 293 | any = False |
|
295 | 294 | for id, entry in sorted(self._filegenerators.iteritems()): |
@@ -297,8 +296,8 class transaction(object): | |||
|
297 | 296 | order, filenames, genfunc, location = entry |
|
298 | 297 | |
|
299 | 298 | # for generation at closing, check if it's before or after finalize |
|
300 |
postfinalize = group == |
|
|
301 |
if (group != |
|
|
299 | postfinalize = group == gengrouppostfinalize | |
|
300 | if (group != gengroupall and | |
|
302 | 301 | (id in postfinalizegenerators) != (postfinalize)): |
|
303 | 302 | continue |
|
304 | 303 | |
@@ -427,13 +426,13 class transaction(object): | |||
|
427 | 426 | '''commit the transaction''' |
|
428 | 427 | if self.count == 1: |
|
429 | 428 | self.validator(self) # will raise exception if needed |
|
430 |
self._generatefiles(group= |
|
|
429 | self._generatefiles(group=gengroupprefinalize) | |
|
431 | 430 | categories = sorted(self._finalizecallback) |
|
432 | 431 | for cat in categories: |
|
433 | 432 | self._finalizecallback[cat](self) |
|
434 | 433 | # Prevent double usage and help clear cycles. |
|
435 | 434 | self._finalizecallback = None |
|
436 |
self._generatefiles(group= |
|
|
435 | self._generatefiles(group=gengrouppostfinalize) | |
|
437 | 436 | |
|
438 | 437 | self.count -= 1 |
|
439 | 438 | if self.count != 0: |
General Comments 0
You need to be logged in to leave comments.
Login now