--- a/Plugins/VcsPlugins/vcsMercurial/PurgeExtension/purge.py Sun Mar 30 22:00:14 2014 +0200 +++ b/Plugins/VcsPlugins/vcsMercurial/PurgeExtension/purge.py Thu Apr 03 23:05:31 2014 +0200 @@ -9,8 +9,8 @@ from __future__ import unicode_literals try: - str = unicode # __IGNORE_WARNING__ -except (NameError): + str = unicode +except NameError: pass import os @@ -21,8 +21,6 @@ from ..HgExtension import HgExtension from ..HgDialog import HgDialog -import Preferences - class Purge(HgExtension): """ @@ -56,8 +54,7 @@ """ purgeEntries = [] - args = [] - args.append("purge") + args = self.vcs.initCommand("purge") args.append("--print") if all: args.append("--all") @@ -68,7 +65,6 @@ if out: purgeEntries = out.strip().split() else: - ioEncoding = Preferences.getSystem("IOEncoding") process = QProcess() process.setWorkingDirectory(repodir) process.start('hg', args) @@ -78,7 +74,7 @@ if finished and process.exitCode() == 0: purgeEntries = str( process.readAllStandardOutput(), - ioEncoding, 'replace').strip().split() + self.vcs.getEncoding(), 'replace').strip().split() return purgeEntries @@ -98,21 +94,20 @@ return if all: - title = self.trUtf8("Purge All Files") - message = self.trUtf8( + title = self.tr("Purge All Files") + message = self.tr( """Do really want to delete all files not tracked by""" """ Mercurial (including ignored ones)?""") else: - title = self.trUtf8("Purge Files") - message = self.trUtf8( + title = self.tr("Purge Files") + message = self.tr( """Do really want to delete files not tracked by Mercurial?""") entries = self.__getEntries(repodir, all) from UI.DeleteFilesConfirmationDialog import \ DeleteFilesConfirmationDialog dlg = DeleteFilesConfirmationDialog(None, title, message, entries) if dlg.exec_() == QDialog.Accepted: - args = [] - args.append("purge") + args = self.vcs.initCommand("purge") if all: args.append("--all") args.append("-v")