Thu, 21 Oct 2010 19:13:49 +0200
Improved the Mercurial plugi-in to better indicate a changed project file after a pull --update and update.
Plugins/VcsPlugins/vcsMercurial/HgDialog.py | file | annotate | diff | comparison | revisions | |
Plugins/VcsPlugins/vcsMercurial/hg.py | file | annotate | diff | comparison | revisions |
--- a/Plugins/VcsPlugins/vcsMercurial/HgDialog.py Thu Oct 21 08:56:23 2010 +0200 +++ b/Plugins/VcsPlugins/vcsMercurial/HgDialog.py Thu Oct 21 19:13:49 2010 +0200 @@ -67,14 +67,6 @@ self.normal and \ self.errors.toPlainText() == "": self.accept() - - if self.__updateCommand and self.normal: - # check, if we had additions or deletions - lastLine = self.resultbox.toPlainText().splitlines()[-1] - if lastLine: - adds, merges, deletes, conflicts = \ - [int(a.split()[0]) for a in lastLine.split(",")] - self.__hasAddOrDelete = adds > 0 or deletes > 0 def on_buttonBox_clicked(self, button): """ @@ -174,6 +166,13 @@ 'replace') self.resultbox.insertPlainText(s) self.resultbox.ensureCursorVisible() + + # check for a changed project file + if self.__updateCommand: + for line in s.splitlines(): + if '.e4p' in line: + self.__hasAddOrDelete = True + break def __readStderr(self): """
--- a/Plugins/VcsPlugins/vcsMercurial/hg.py Thu Oct 21 08:56:23 2010 +0200 +++ b/Plugins/VcsPlugins/vcsMercurial/hg.py Thu Oct 21 19:13:49 2010 +0200 @@ -401,6 +401,8 @@ args.append('update') self.addArguments(args, self.options['global']) self.addArguments(args, self.options['update']) + if "-v" not in args and "--verbose" not in args: + args.append("-v") if revision is not None: args.append("-r") args.append(revision)