Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 2.0.3, 2.0.4, and 2.0.5

stable postreview: show error message for incorrect plugin version. Closes issue #282

Changeset 07d77e75a3b5

Parent e0719e1536a4

by Michael De Wildt

Changes to one file · Browse files at 07d77e75a3b5 Showing diff from parent e0719e1536a4 Diff from another changeset...

 
36
37
38
 
 
 
 
39
40
41
42
43
44
45
 
 
 
 
 
 
 
 
 
46
47
48
49
50
 
 
 
 
51
52
53
 
 
54
55
 
56
57
58
 
36
37
38
39
40
41
42
43
 
 
 
 
 
 
44
45
46
47
48
49
50
51
52
53
 
 
 
 
54
55
56
57
58
59
60
61
62
63
 
64
65
66
67
@@ -36,23 +36,32 @@
  msg = _("Invalid Settings - Please provide your ReviewBoard username")   else:   rb = extensions.find("reviewboard") + plugin_msg = _("Invalid reviewboard plugin. Please download the " + + "mercurial reviewboard plugin version 3.5 or higher " + + "from the website below.\n\n" + + "http://bitbucket.org/mdelagra/mercurial-reviewboard/")   try: - pwd = self.dialog.password - #if we don't have a password send something here to skip - #the cli getpass in the extension. We will set the password - #later - if not pwd: - pwd = "None" + if float(rb.__version__[:3]) < 3.5: + msg = plugin_msg + else: + pwd = self.dialog.password + #if we don't have a password send something here to skip + #the cli getpass in the extension. We will set the password + #later + if not pwd: + pwd = "None"   - self.reviewboard = rb.make_rbclient(self.dialog.server, - self.dialog.user, - pwd) - self.loadCombos() + self.reviewboard = rb.make_rbclient(self.dialog.server, + self.dialog.user, + pwd) + self.loadCombos()     except rb.ReviewBoardError, e:   msg = e.msg + except AttributeError: + msg = plugin_msg   - self.dialog._error_message = msg + self.dialog.error_message = msg     def loadCombos(self):   #Get the index of a users previously selected repo id