Plugins/VcsPlugins/vcsPySvn/SvnDialog.py

changeset 945
8cd4d08fa9f6
parent 791
9ec2ac20e54e
child 1083
dc680a0ce221
equal deleted inserted replaced
944:1b59c4ba121e 945:8cd4d08fa9f6
17 from .SvnDialogMixin import SvnDialogMixin 17 from .SvnDialogMixin import SvnDialogMixin
18 from .Ui_SvnDialog import Ui_SvnDialog 18 from .Ui_SvnDialog import Ui_SvnDialog
19 19
20 import Preferences 20 import Preferences
21 21
22
22 class SvnDialog(QDialog, SvnDialogMixin, Ui_SvnDialog): 23 class SvnDialog(QDialog, SvnDialogMixin, Ui_SvnDialog):
23 """ 24 """
24 Class implementing a dialog to show the output of a pysvn action. 25 Class implementing a dialog to show the output of a pysvn action.
25 """ 26 """
26 def __init__(self, text, command, pysvnClient, parent = None, log = ""): 27 def __init__(self, text, command, pysvnClient, parent=None, log=""):
27 """ 28 """
28 Constructor 29 Constructor
29 30
30 @param text text to be shown by the label (string) 31 @param text text to be shown by the label (string)
31 @param command svn command to be executed (display purposes only) 32 @param command svn command to be executed (display purposes only)
77 elif eventDict["path"] != "" and \ 78 elif eventDict["path"] != "" and \
78 svnNotifyActionMap[eventDict["action"]] is not None: 79 svnNotifyActionMap[eventDict["action"]] is not None:
79 mime = eventDict["mime_type"] == "application/octet-stream" and \ 80 mime = eventDict["mime_type"] == "application/octet-stream" and \
80 self.trUtf8(" (binary)") or "" 81 self.trUtf8(" (binary)") or ""
81 msg = self.trUtf8("{0} {1}{2}\n")\ 82 msg = self.trUtf8("{0} {1}{2}\n")\
82 .format(self.trUtf8(svnNotifyActionMap[eventDict["action"]]), 83 .format(self.trUtf8(svnNotifyActionMap[eventDict["action"]]),
83 eventDict["path"], 84 eventDict["path"],
84 mime) 85 mime)
85 if eventDict["action"] in \ 86 if eventDict["action"] in \
86 [pysvn.wc_notify_action.add, pysvn.wc_notify_action.commit_added, 87 [pysvn.wc_notify_action.add, pysvn.wc_notify_action.commit_added,
87 pysvn.wc_notify_action.commit_deleted, pysvn.wc_notify_action.delete, 88 pysvn.wc_notify_action.commit_deleted, pysvn.wc_notify_action.delete,
88 pysvn.wc_notify_action.update_add, pysvn.wc_notify_action.update_delete]: 89 pysvn.wc_notify_action.update_add, pysvn.wc_notify_action.update_delete]:
89 self.__hasAddOrDelete = True 90 self.__hasAddOrDelete = True
90 if msg: 91 if msg:
91 self.showMessage(msg) 92 self.showMessage(msg)
92 93

eric ide

mercurial