Show More
@@ -2599,25 +2599,38 b' def perfrevlogindex(ui, repo, file_=None' | |||
|
2599 | 2599 | index[rev] |
|
2600 | 2600 | |
|
2601 | 2601 | def resolvenode(node): |
|
2602 |
|
|
|
2602 | index = revlogio.parseindex(data, inline)[0] | |
|
2603 | rev = getattr(index, 'rev', None) | |
|
2604 | if rev is None: | |
|
2605 | nodemap = getattr( | |
|
2606 | revlogio.parseindex(data, inline)[0], 'nodemap', None | |
|
2607 | ) | |
|
2603 | 2608 | # This only works for the C code. |
|
2604 | 2609 | if nodemap is None: |
|
2605 | 2610 | return |
|
2611 | rev = nodemap.__getitem__ | |
|
2606 | 2612 | |
|
2607 | 2613 | try: |
|
2608 |
|
|
|
2614 | rev(node) | |
|
2609 | 2615 | except error.RevlogError: |
|
2610 | 2616 | pass |
|
2611 | 2617 | |
|
2612 | 2618 | def resolvenodes(nodes, count=1): |
|
2613 |
|
|
|
2619 | index = revlogio.parseindex(data, inline)[0] | |
|
2620 | rev = getattr(index, 'rev', None) | |
|
2621 | if rev is None: | |
|
2622 | nodemap = getattr( | |
|
2623 | revlogio.parseindex(data, inline)[0], 'nodemap', None | |
|
2624 | ) | |
|
2625 | # This only works for the C code. | |
|
2614 | 2626 | if nodemap is None: |
|
2615 | 2627 | return |
|
2628 | rev = nodemap.__getitem__ | |
|
2616 | 2629 | |
|
2617 | 2630 | for i in range(count): |
|
2618 | 2631 | for node in nodes: |
|
2619 | 2632 | try: |
|
2620 |
|
|
|
2633 | rev(node) | |
|
2621 | 2634 | except error.RevlogError: |
|
2622 | 2635 | pass |
|
2623 | 2636 |
General Comments 0
You need to be logged in to leave comments.
Login now