Show More
@@ -448,14 +448,9 b' class revlog(object):' | |||
|
448 | 448 | self.datafile = datafile or (indexfile[:-2] + b".d") |
|
449 | 449 | self.nodemap_file = None |
|
450 | 450 | if persistentnodemap: |
|
451 | if indexfile.endswith(b'.a'): | |
|
452 |
|
|
|
453 | if opener.exists(pending_path): | |
|
454 | self.nodemap_file = pending_path | |
|
455 | else: | |
|
456 | self.nodemap_file = indexfile[:-4] + b".n" | |
|
457 | else: | |
|
458 | self.nodemap_file = indexfile[:-2] + b".n" | |
|
451 | self.nodemap_file = nodemaputil.get_nodemap_file( | |
|
452 | opener, self.indexfile | |
|
453 | ) | |
|
459 | 454 | |
|
460 | 455 | self.opener = opener |
|
461 | 456 | # When True, indexfile is opened with checkambig=True at writing, to |
@@ -634,3 +634,14 b' def _find_node(block, node):' | |||
|
634 | 634 | if isinstance(entry, dict): |
|
635 | 635 | return _find_node(entry, node[1:]) |
|
636 | 636 | return entry |
|
637 | ||
|
638 | ||
|
639 | def get_nodemap_file(opener, indexfile): | |
|
640 | if indexfile.endswith(b'.a'): | |
|
641 | pending_path = indexfile[:-4] + b".n.a" | |
|
642 | if opener.exists(pending_path): | |
|
643 | return pending_path | |
|
644 | else: | |
|
645 | return indexfile[:-4] + b".n" | |
|
646 | else: | |
|
647 | return indexfile[:-2] + b".n" |
General Comments 0
You need to be logged in to leave comments.
Login now