Show More
@@ -81,9 +81,9 b' def setup_persistent_nodemap(tr, revlog)' | |||
|
81 | 81 | if tr.hasfinalize(callback_id): |
|
82 | 82 | return # no need to register again |
|
83 | 83 | tr.addpending( |
|
84 |
callback_id, lambda tr: |
|
|
84 | callback_id, lambda tr: persist_nodemap(tr, revlog, pending=True) | |
|
85 | 85 | ) |
|
86 |
tr.addfinalize(callback_id, lambda tr: |
|
|
86 | tr.addfinalize(callback_id, lambda tr: persist_nodemap(tr, revlog)) | |
|
87 | 87 | |
|
88 | 88 | |
|
89 | 89 | class _NoTransaction(object): |
@@ -123,12 +123,12 b' def update_persistent_nodemap(revlog):' | |||
|
123 | 123 | return # we do not use persistent_nodemap on this revlog |
|
124 | 124 | |
|
125 | 125 | notr = _NoTransaction() |
|
126 |
|
|
|
126 | persist_nodemap(notr, revlog) | |
|
127 | 127 | for k in sorted(notr._postclose): |
|
128 | 128 | notr._postclose[k](None) |
|
129 | 129 | |
|
130 | 130 | |
|
131 |
def |
|
|
131 | def persist_nodemap(tr, revlog, pending=False): | |
|
132 | 132 | """Write nodemap data on disk for a given revlog""" |
|
133 | 133 | if getattr(revlog, 'filteredrevs', ()): |
|
134 | 134 | raise error.ProgrammingError( |
General Comments 0
You need to be logged in to leave comments.
Login now