changeset 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 0f7e01e0c06f
children 3d38ebb586fe
files mercurial/bundle2.py
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/bundle2.py	Sat Apr 12 00:53:15 2014 -0400
+++ b/mercurial/bundle2.py	Fri Apr 11 16:43:01 2014 -0400
@@ -305,6 +305,11 @@
                 # todo:
                 # - consume the part once we use streaming
                 continue
+
+            # handler is called outside the above try block so that we don't
+            # risk catching KeyErrors from anything other than the
+            # parthandlermapping lookup (any KeyError raised by handler()
+            # itself represents a defect of a different variety).
             handler(op, part)
     except Exception:
         for part in iterparts: