##// END OF EJS Templates
style: remove namespace class...
Pierre-Yves David -
r29297:50fef825 default
parent child Browse files
Show More
@@ -31,10 +31,9 b' postfinalizegenerators = set(['
31 31 'dirstate'
32 32 ])
33 33
34 class GenerationGroup(object):
35 all='all'
36 prefinalize='prefinalize'
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 b' 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=GenerationGroup.all):
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 b' 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 == GenerationGroup.postfinalize
301 if (group != GenerationGroup.all and
299 postfinalize = group == gengrouppostfinalize
300 if (group != gengroupall and
302 301 (id in postfinalizegenerators) != (postfinalize)):
303 302 continue
304 303
@@ -427,13 +426,13 b' 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=GenerationGroup.prefinalize)
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=GenerationGroup.postfinalize)
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