[PATCH] localrepo: tighten except clause when looking rev

Idan Kamara idankk86 at gmail.com
Mon Apr 4 13:19:51 CDT 2011


# HG changeset patch
# User Idan Kamara <idankk86 at gmail.com>
# Date 1301929514 -10800
# Node ID 4d2f177e1a9d9be7fce7518a191c21e748078ea1
# Parent  5ed036e42fd9d2890d1312636eeb68e78b2ff759
localrepo: tighten except clause when looking rev

diff -r 5ed036e42fd9 -r 4d2f177e1a9d mercurial/localrepo.py
--- a/mercurial/localrepo.py	Fri Apr 01 20:40:27 2011 +0200
+++ b/mercurial/localrepo.py	Mon Apr 04 18:05:14 2011 +0300
@@ -387,7 +387,7 @@
         for t, n in self.tags().iteritems():
             try:
                 r = self.changelog.rev(n)
-            except:
+            except error.LookupError:
                 r = -2 # sort to the beginning of the list if unknown
             l.append((r, t, n))
         return [(t, n) for r, t, n in sorted(l)]


More information about the Mercurial-devel mailing list