##// END OF EJS Templates
exchange: expose bundle2 capabilities on pulloperation...
Gregory Szorc -
r26464:9a7fc6d4 default
parent child Browse files
Show More
@@ -893,6 +893,10 b' class pulloperation(object):'
893 893 # sync on this subset
894 894 return self.heads
895 895
896 @util.propertycache
897 def remotebundle2caps(self):
898 return bundle2.bundle2caps(self.remote)
899
896 900 def gettransaction(self):
897 901 # deprecated; talk to trmanager directly
898 902 return self.trmanager.transaction()
@@ -1017,8 +1021,7 b' def _pullbookmarkbundle1(pullop):'
1017 1021 discovery to reduce the chance and impact of race conditions."""
1018 1022 if pullop.remotebookmarks is not None:
1019 1023 return
1020 if (_canusebundle2(pullop)
1021 and 'listkeys' in bundle2.bundle2caps(pullop.remote)):
1024 if _canusebundle2(pullop) and 'listkeys' in pullop.remotebundle2caps:
1022 1025 # all known bundle2 servers now support listkeys, but lets be nice with
1023 1026 # new implementation.
1024 1027 return
@@ -1067,7 +1070,6 b' def _pullbundle2(pullop):'
1067 1070 """pull data using bundle2
1068 1071
1069 1072 For now, the only supported data are changegroup."""
1070 remotecaps = bundle2.bundle2caps(pullop.remote)
1071 1073 kwargs = {'bundlecaps': caps20to10(pullop.repo)}
1072 1074 # pulling changegroup
1073 1075 pullop.stepsdone.add('changegroup')
@@ -1075,7 +1077,7 b' def _pullbundle2(pullop):'
1075 1077 kwargs['common'] = pullop.common
1076 1078 kwargs['heads'] = pullop.heads or pullop.rheads
1077 1079 kwargs['cg'] = pullop.fetch
1078 if 'listkeys' in remotecaps:
1080 if 'listkeys' in pullop.remotebundle2caps:
1079 1081 kwargs['listkeys'] = ['phase']
1080 1082 if pullop.remotebookmarks is None:
1081 1083 # make sure to always includes bookmark data when migrating
@@ -1088,7 +1090,7 b' def _pullbundle2(pullop):'
1088 1090 if pullop.heads is None and list(pullop.common) == [nullid]:
1089 1091 pullop.repo.ui.status(_("requesting all changes\n"))
1090 1092 if obsolete.isenabled(pullop.repo, obsolete.exchangeopt):
1091 remoteversions = bundle2.obsmarkersversion(remotecaps)
1093 remoteversions = bundle2.obsmarkersversion(pullop.remotebundle2caps)
1092 1094 if obsolete.commonversion(remoteversions) is not None:
1093 1095 kwargs['obsmarkers'] = True
1094 1096 pullop.stepsdone.add('obsmarkers')
General Comments 0
You need to be logged in to leave comments. Login now