Commits

Steve Borho  committed 386a210

history: add a validator for file patterns

Closes #1467

  • Participants
  • Parent commits 53bc2c2
  • Branches stable

Comments (0)

Files changed (1)

File tortoisehg/hgtk/history.py

                 gdialog.Prompt(_('Invalid date specification'),
                                str(e), self).run()
                 return False
+        elif mode == MODE_FILEPATS:
+            try:
+                match.match(self.repo.root, self.repo.root, text)
+            except (ValueError, util.Abort), e:
+                gdialog.Prompt(_('Invalid file pattern'),
+                               str(e), self).run()
+                return False
         return ret
 
     def activate_filter(self, text, mode):