Thu, 21 Oct 2010 19:13:17 +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:54:49 2010 +0200 +++ b/Plugins/VcsPlugins/vcsMercurial/HgDialog.py Thu Oct 21 19:13:17 2010 +0200 @@ -69,14 +69,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 and lastLine.strip()[0] in "0123456789": - 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): """ @@ -177,6 +169,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:54:49 2010 +0200 +++ b/Plugins/VcsPlugins/vcsMercurial/hg.py Thu Oct 21 19:13:17 2010 +0200 @@ -406,6 +406,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)