comparison mercurial/bundle2.py @ 21004:27ab4b8d2503

bundle2: comment to clarify why the handler call is where it is The reason why it is here is not obvious. I'm the one who wrote it there in the first place and almost moved it 2 weeks later.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Fri, 11 Apr 2014 16:43:01 -0400
parents c93bb6a08fa1
children 3d38ebb586fe
comparison
equal deleted inserted replaced
21003:0f7e01e0c06f 21004:27ab4b8d2503
303 raise 303 raise
304 op.ui.debug('ignoring unknown advisory part %r\n' % key) 304 op.ui.debug('ignoring unknown advisory part %r\n' % key)
305 # todo: 305 # todo:
306 # - consume the part once we use streaming 306 # - consume the part once we use streaming
307 continue 307 continue
308
309 # handler is called outside the above try block so that we don't
310 # risk catching KeyErrors from anything other than the
311 # parthandlermapping lookup (any KeyError raised by handler()
312 # itself represents a defect of a different variety).
308 handler(op, part) 313 handler(op, part)
309 except Exception: 314 except Exception:
310 for part in iterparts: 315 for part in iterparts:
311 pass # consume the bundle content 316 pass # consume the bundle content
312 raise 317 raise