Show More
@@ -30,9 +30,9 b' version = 2' | |||
|
30 | 30 | # the changelog having been written). |
|
31 | 31 | postfinalizegenerators = {b'bookmarks', b'dirstate'} |
|
32 | 32 | |
|
33 | gengroupall = b'all' | |
|
34 | gengroupprefinalize = b'prefinalize' | |
|
35 | gengrouppostfinalize = b'postfinalize' | |
|
33 | GEN_GROUP_ALL = b'all' | |
|
34 | GEN_GROUP_PRE_FINALIZE = b'prefinalize' | |
|
35 | GEN_GROUP_POST_FINALIZE = b'postfinalize' | |
|
36 | 36 | |
|
37 | 37 | |
|
38 | 38 | def active(func): |
@@ -352,7 +352,7 b' class transaction(util.transactional):' | |||
|
352 | 352 | if genid in self._filegenerators: |
|
353 | 353 | del self._filegenerators[genid] |
|
354 | 354 | |
|
355 |
def _generatefiles(self, suffix=b'', group= |
|
|
355 | def _generatefiles(self, suffix=b'', group=GEN_GROUP_ALL): | |
|
356 | 356 | # write files registered for generation |
|
357 | 357 | any = False |
|
358 | 358 | for id, entry in sorted(pycompat.iteritems(self._filegenerators)): |
@@ -360,9 +360,9 b' class transaction(util.transactional):' | |||
|
360 | 360 | order, filenames, genfunc, location = entry |
|
361 | 361 | |
|
362 | 362 | # for generation at closing, check if it's before or after finalize |
|
363 |
postfinalize = group == |
|
|
363 | postfinalize = group == GEN_GROUP_POST_FINALIZE | |
|
364 | 364 | if ( |
|
365 |
group != |
|
|
365 | group != GEN_GROUP_ALL | |
|
366 | 366 | and (id in postfinalizegenerators) != postfinalize |
|
367 | 367 | ): |
|
368 | 368 | continue |
@@ -505,7 +505,7 b' class transaction(util.transactional):' | |||
|
505 | 505 | if self._count == 1: |
|
506 | 506 | self._validator(self) # will raise exception if needed |
|
507 | 507 | self._validator = None # Help prevent cycles. |
|
508 |
self._generatefiles(group= |
|
|
508 | self._generatefiles(group=GEN_GROUP_PRE_FINALIZE) | |
|
509 | 509 | while self._finalizecallback: |
|
510 | 510 | callbacks = self._finalizecallback |
|
511 | 511 | self._finalizecallback = {} |
@@ -514,7 +514,7 b' class transaction(util.transactional):' | |||
|
514 | 514 | callbacks[cat](self) |
|
515 | 515 | # Prevent double usage and help clear cycles. |
|
516 | 516 | self._finalizecallback = None |
|
517 |
self._generatefiles(group= |
|
|
517 | self._generatefiles(group=GEN_GROUP_POST_FINALIZE) | |
|
518 | 518 | |
|
519 | 519 | self._count -= 1 |
|
520 | 520 | if self._count != 0: |
General Comments 0
You need to be logged in to leave comments.
Login now