mercurial/wireprotov1peer.py
changeset 41055 55e8da487b8a
parent 39588 f15a587d2dfc
child 42813 268662aac075
equal deleted inserted replaced
41054:ef54bd33b476 41055:55e8da487b8a
   238                 pycompat.future_set_exception_info(f, sys.exc_info()[1:])
   238                 pycompat.future_set_exception_info(f, sys.exc_info()[1:])
   239                 return
   239                 return
   240 
   240 
   241             # Encoded arguments and future holding remote result.
   241             # Encoded arguments and future holding remote result.
   242             try:
   242             try:
   243                 encodedargs, fremote = next(batchable)
   243                 encargsorres, fremote = next(batchable)
   244             except Exception:
   244             except Exception:
   245                 pycompat.future_set_exception_info(f, sys.exc_info()[1:])
   245                 pycompat.future_set_exception_info(f, sys.exc_info()[1:])
   246                 return
   246                 return
   247 
   247 
   248             requests.append((command, encodedargs))
   248             if not fremote:
   249             states.append((command, f, batchable, fremote))
   249                 f.set_result(encargsorres)
       
   250             else:
       
   251                 requests.append((command, encargsorres))
       
   252                 states.append((command, f, batchable, fremote))
   250 
   253 
   251         if not requests:
   254         if not requests:
   252             return
   255             return
   253 
   256 
   254         # This will emit responses in order they were executed.
   257         # This will emit responses in order they were executed.