Show More
@@ -329,12 +329,10 b' class revlog(object):' | |||
|
329 | 329 | self._datafile = datafile |
|
330 | 330 | self.nodemap_file = None |
|
331 | 331 | self.postfix = postfix |
|
332 | self.opener = opener | |
|
332 | 333 | if persistentnodemap: |
|
333 | self.nodemap_file = nodemaputil.get_nodemap_file( | |
|
334 | opener, self._indexfile | |
|
335 | ) | |
|
336 | ||
|
337 | self.opener = opener | |
|
334 | self.nodemap_file = nodemaputil.get_nodemap_file(self) | |
|
335 | ||
|
338 | 336 | assert target[0] in ALL_KINDS |
|
339 | 337 | assert len(target) == 2 |
|
340 | 338 | self.target = target |
@@ -148,9 +148,7 b' def persist_nodemap(tr, revlog, pending=' | |||
|
148 | 148 | ) |
|
149 | 149 | if revlog.nodemap_file is None: |
|
150 | 150 | if force: |
|
151 | revlog.nodemap_file = get_nodemap_file( | |
|
152 | revlog.opener, revlog._indexfile | |
|
153 | ) | |
|
151 | revlog.nodemap_file = get_nodemap_file(revlog) | |
|
154 | 152 | else: |
|
155 | 153 | msg = "calling persist nodemap on a revlog without the feature enabled" |
|
156 | 154 | raise error.ProgrammingError(msg) |
@@ -653,12 +651,9 b' def _find_node(block, node):' | |||
|
653 | 651 | return entry |
|
654 | 652 | |
|
655 | 653 | |
|
656 |
def get_nodemap_file( |
|
|
657 | if indexfile.endswith(b'.a'): | |
|
658 |
pending_path = |
|
|
659 | if opener.exists(pending_path): | |
|
654 | def get_nodemap_file(revlog): | |
|
655 | if revlog.postfix == b'a': | |
|
656 | pending_path = revlog.radix + b".n.a" | |
|
657 | if revlog.opener.exists(pending_path): | |
|
660 | 658 | return pending_path |
|
661 | else: | |
|
662 | return indexfile[:-4] + b".n" | |
|
663 | else: | |
|
664 | return indexfile[:-2] + b".n" | |
|
659 | return revlog.radix + b".n" |
General Comments 0
You need to be logged in to leave comments.
Login now