Commits

Steve Borho  committed 6a75146

commit: use configbool for issue.linkmandatory

This allows more "truth" values than simply "True"

  • Participants
  • Parent commits 1a4403d
  • Branches stable

Comments (0)

Files changed (1)

File tortoisehg/hgtk/commit.py

             self.text.grab_focus()
             return False
 
-        linkmandatory = self.repo.ui.config('tortoisehg',
-                'issue.linkmandatory', "False")
-        if linkmandatory == "True":
-            issueregex = self.repo.ui.config('tortoisehg',
-                    'issue.regex', "")
+        try:
+            linkmandatory = self.repo.ui.configbool('tortoisehg',
+                    'issue.linkmandatory')
+        except error.ConfigError:
+            linkmandatory = False
+
+        if linkmandatory:
+            issueregex = self.repo.ui.config('tortoisehg', 'issue.regex')
             if issueregex:
                 commitmessage = buf.get_text(buf.get_start_iter(), 
                         buf.get_end_iter())