##// END OF EJS Templates
streamclone: use command executor for wire protocol commands...
Gregory Szorc -
r37656:65b86ee6 default
parent child Browse files
Show More
@@ -126,11 +126,18 b' def maybeperformlegacystreamclone(pullop'
126 # creation.
126 # creation.
127 rbranchmap = None
127 rbranchmap = None
128 if remote.capable('branchmap'):
128 if remote.capable('branchmap'):
129 rbranchmap = remote.branchmap()
129 with remote.commandexecutor() as e:
130 rbranchmap = e.callcommand('branchmap', {}).result()
130
131
131 repo.ui.status(_('streaming all changes\n'))
132 repo.ui.status(_('streaming all changes\n'))
132
133
133 fp = remote.stream_out()
134 with remote.commandexecutor() as e:
135 fp = e.callcommand('stream_out', {}).result()
136
137 # TODO strictly speaking, this code should all be inside the context
138 # manager because the context manager is supposed to ensure all wire state
139 # is flushed when exiting. But the legacy peers don't do this, so it
140 # doesn't matter.
134 l = fp.readline()
141 l = fp.readline()
135 try:
142 try:
136 resp = int(l)
143 resp = int(l)
General Comments 0
You need to be logged in to leave comments. Login now