##// END OF EJS Templates
transaction: clarify the logic around pre-finalize/post-finalize...
marmoute -
r44887:f6798c1a default
parent child Browse files
Show More
@@ -355,16 +355,22 b' class transaction(util.transactional):'
355 355 def _generatefiles(self, suffix=b'', group=GEN_GROUP_ALL):
356 356 # write files registered for generation
357 357 any = False
358
359 if group == GEN_GROUP_ALL:
360 skip_post = skip_pre = False
361 else:
362 skip_pre = group == GEN_GROUP_POST_FINALIZE
363 skip_post = group == GEN_GROUP_PRE_FINALIZE
364
358 365 for id, entry in sorted(pycompat.iteritems(self._filegenerators)):
359 366 any = True
360 367 order, filenames, genfunc, location = entry
361 368
362 369 # for generation at closing, check if it's before or after finalize
363 postfinalize = group == GEN_GROUP_POST_FINALIZE
364 if (
365 group != GEN_GROUP_ALL
366 and (id in postfinalizegenerators) != postfinalize
367 ):
370 is_post = id in postfinalizegenerators
371 if skip_post and is_post:
372 continue
373 elif skip_pre and not is_post:
368 374 continue
369 375
370 376 vfs = self._vfsmap[location]
General Comments 0
You need to be logged in to leave comments. Login now