##// END OF EJS Templates
repo: avoid copying/updating a dict on every `repo.__getitem__`...
Kyle Lippincott -
r46036:4a0ccbec default
parent child Browse files
Show More
@@ -1570,7 +1570,7 b' class localrepository(object):'
1570 1570 def _quick_access_changeid_wc(self):
1571 1571 # also fast path access to the working copy parents
1572 1572 # however, only do it for filter that ensure wc is visible.
1573 quick = {}
1573 quick = self._quick_access_changeid_null.copy()
1574 1574 cl = self.unfiltered().changelog
1575 1575 for node in self.dirstate.parents():
1576 1576 if node == nullid:
@@ -1609,11 +1609,9 b' class localrepository(object):'
1609 1609 This contains a list of symbol we can recognise right away without
1610 1610 further processing.
1611 1611 """
1612 mapping = self._quick_access_changeid_null
1613 1612 if self.filtername in repoview.filter_has_wc:
1614 mapping = mapping.copy()
1615 mapping.update(self._quick_access_changeid_wc)
1616 return mapping
1613 return self._quick_access_changeid_wc
1614 return self._quick_access_changeid_null
1617 1615
1618 1616 def __getitem__(self, changeid):
1619 1617 # dealing with special cases
General Comments 0
You need to be logged in to leave comments. Login now