changeset 9681 | ac3a68cb16eb |
parent 9642 | 7d17794f08a9 |
child 9682 | bd70f645cfb0 |
--- a/mercurial/patch.py Sat Oct 31 17:07:12 2009 +0100 +++ b/mercurial/patch.py Sat Oct 31 18:00:05 2009 +0100 @@ -342,11 +342,7 @@ # result is a list of line numbers sorted based on distance # from linenum - try: - cand = self.hash[l] - except: - return [] - + cand = self.hash.get(l, []) if len(cand) > 1: # resort our list of potentials forward then back. cand.sort(key=lambda x: abs(x - linenum))