71 self.accept() |
71 self.accept() |
72 |
72 |
73 if self.__updateCommand and self.normal: |
73 if self.__updateCommand and self.normal: |
74 # check, if we had additions or deletions |
74 # check, if we had additions or deletions |
75 lastLine = self.resultbox.toPlainText().splitlines()[-1] |
75 lastLine = self.resultbox.toPlainText().splitlines()[-1] |
76 if lastLine: |
76 if lastLine and lastLine.strip()[0] in "0123456789": |
77 adds, merges, deletes, conflicts = \ |
77 adds, merges, deletes, conflicts = \ |
78 [int(a.split()[0]) for a in lastLine.split(",")] |
78 [int(a.split()[0]) for a in lastLine.split(",")] |
79 self.__hasAddOrDelete = adds > 0 or deletes > 0 |
79 self.__hasAddOrDelete = adds > 0 or deletes > 0 |
80 |
80 |
81 def on_buttonBox_clicked(self, button): |
81 def on_buttonBox_clicked(self, button): |
111 self.errorGroup.hide() |
111 self.errorGroup.hide() |
112 self.normal = False |
112 self.normal = False |
113 self.intercept = False |
113 self.intercept = False |
114 |
114 |
115 self.__hasAddOrDelete = False |
115 self.__hasAddOrDelete = False |
116 self.__updateCommand = args[0] == "update" |
116 if args[0] == "update" or \ |
|
117 (args[0] == "pull" and "--update" in args[1:]): |
|
118 self.__updateCommand = True |
117 |
119 |
118 self.proc = QProcess() |
120 self.proc = QProcess() |
119 |
121 |
120 if showArgs: |
122 if showArgs: |
121 self.resultbox.append(' '.join(args)) |
123 self.resultbox.append(' '.join(args)) |