##// END OF EJS Templates
changegroup: avoid instantiating storage if we are not using it...
Kyle Lippincott -
r40700:dba590f2 default
parent child Browse files
Show More
@@ -1043,18 +1043,25 class cgpacker(object):
1043
1043
1044 while tmfnodes:
1044 while tmfnodes:
1045 tree, nodes = tmfnodes.popitem()
1045 tree, nodes = tmfnodes.popitem()
1046
1047 should_visit = self._matcher.visitdir(tree[:-1] or '.')
1048 if tree and not should_visit:
1049 continue
1050
1046 store = mfl.getstorage(tree)
1051 store = mfl.getstorage(tree)
1047
1052
1048 if not self._matcher.visitdir(store.tree[:-1] or '.'):
1053 if not should_visit:
1049 # No nodes to send because this directory is out of
1054 # No nodes to send because this directory is out of
1050 # the client's view of the repository (probably
1055 # the client's view of the repository (probably
1051 # because of narrow clones).
1056 # because of narrow clones). Do this even for the root
1057 # directory (tree=='')
1052 prunednodes = []
1058 prunednodes = []
1053 else:
1059 else:
1054 # Avoid sending any manifest nodes we can prove the
1060 # Avoid sending any manifest nodes we can prove the
1055 # client already has by checking linkrevs. See the
1061 # client already has by checking linkrevs. See the
1056 # related comment in generatefiles().
1062 # related comment in generatefiles().
1057 prunednodes = self._prunemanifests(store, nodes, commonrevs)
1063 prunednodes = self._prunemanifests(store, nodes, commonrevs)
1064
1058 if tree and not prunednodes:
1065 if tree and not prunednodes:
1059 continue
1066 continue
1060
1067
General Comments 0
You need to be logged in to leave comments. Login now