--- a/Plugins/VcsPlugins/vcsMercurial/PurgeExtension/purge.py Tue Mar 07 18:53:18 2017 +0100 +++ b/Plugins/VcsPlugins/vcsMercurial/PurgeExtension/purge.py Tue Mar 07 19:46:57 2017 +0100 @@ -43,20 +43,20 @@ if self.purgeListDialog is not None: self.purgeListDialog.close() - def __getEntries(self, repodir, all): + def __getEntries(self, repodir, deleteAll): """ Private method to get a list of files/directories being purged. @param repodir directory name of the repository (string) - @param all flag indicating to delete all files including ignored ones - (boolean) + @param deleteAll flag indicating to delete all files including ignored + ones (boolean) @return name of the current patch (string) """ purgeEntries = [] args = self.vcs.initCommand("purge") args.append("--print") - if all: + if deleteAll: args.append("--all") client = self.vcs.getClient() @@ -78,13 +78,13 @@ return purgeEntries - def hgPurge(self, name, all=False): + def hgPurge(self, name, deleteAll=False): """ Public method to purge files and directories not tracked by Mercurial. @param name file/directory name (string) - @param all flag indicating to delete all files including ignored ones - (boolean) + @param deleteAll flag indicating to delete all files including ignored + ones (boolean) """ # find the root of the repo repodir = self.vcs.splitPath(name)[0] @@ -93,7 +93,7 @@ if os.path.splitdrive(repodir)[1] == os.sep: return - if all: + if deleteAll: title = self.tr("Purge All Files") message = self.tr( """Do really want to delete all files not tracked by""" @@ -102,13 +102,13 @@ title = self.tr("Purge Files") message = self.tr( """Do really want to delete files not tracked by Mercurial?""") - entries = self.__getEntries(repodir, all) + entries = self.__getEntries(repodir, deleteAll) from UI.DeleteFilesConfirmationDialog import \ DeleteFilesConfirmationDialog dlg = DeleteFilesConfirmationDialog(None, title, message, entries) if dlg.exec_() == QDialog.Accepted: args = self.vcs.initCommand("purge") - if all: + if deleteAll: args.append("--all") args.append("-v") @@ -117,13 +117,13 @@ if res: dia.exec_() - def hgPurgeList(self, name, all=False): + def hgPurgeList(self, name, deleteAll=False): """ Public method to list files and directories not tracked by Mercurial. @param name file/directory name (string) - @param all flag indicating to list all files including ignored ones - (boolean) + @param deleteAll flag indicating to list all files including ignored + ones (boolean) """ # find the root of the repo repodir = self.vcs.splitPath(name)[0] @@ -132,7 +132,7 @@ if os.path.splitdrive(repodir)[1] == os.sep: return - entries = self.__getEntries(repodir, all) + entries = self.__getEntries(repodir, deleteAll) from .HgPurgeListDialog import HgPurgeListDialog self.purgeListDialog = HgPurgeListDialog(entries) self.purgeListDialog.show()