Commits

Steve Borho committed 1327470

history: use enums in verification function

Fixes username filters

Comments (0)

Files changed (1)

tortoisehg/hgtk/history.py

         ret = True
         if not text:
             return False
-        elif mode == 0:
+        elif mode == MODE_REVRANGE:
             try:
                 func = revset.match(text)
                 func(self.repo, range(0, 1))
             except Exception, e:
                 gdialog.Prompt(_('Invalid revision set'), str(e), self).run()
                 return False
-        elif mode == 3:
+        elif mode == MODE_DATE:
             try:
                 util.matchdate(text)
             except (ValueError, util.Abort), e: