--- a/Plugins/VcsPlugins/vcsMercurial/hg.py Mon May 28 15:59:36 2012 +0200 +++ b/Plugins/VcsPlugins/vcsMercurial/hg.py Tue May 29 20:59:40 2012 +0200 @@ -78,6 +78,8 @@ committed = pyqtSignal() activeExtensionsChanged = pyqtSignal() + IgnoreFileName = ".hgignore" + def __init__(self, plugin, parent=None, name=None): """ Constructor @@ -1114,6 +1116,18 @@ """ return "Mercurial" + def vcsInitConfig(self, project): + """ + Public method to initialize the VCS configuration. + + This method ensures, that an ignore file exists. + + @param project reference to the project (Project) + """ + ignoreName = os.path.join(project.getProjectPath(), Hg.IgnoreFileName) + if not os.path.exists(ignoreName): + self.hgCreateIgnoreFile(project.getProjectPath(), autoAdd=True) + def vcsCleanup(self, name): """ Public method used to cleanup the working directory. @@ -1990,6 +2004,8 @@ ignorePatterns = [ "glob:.eric5project", "glob:_eric5project", + "glob:.eric4project", + "glob:_eric4project", "glob:.ropeproject", "glob:_ropeproject", "glob:.directory", @@ -1999,10 +2015,13 @@ "glob:**.bak", "glob:**.rej", "glob:**~", + "glob:cur", + "glob:tmp", "glob:__pycache__", + "glob:**.DS_Store", ] - ignoreName = os.path.join(name, ".hgignore") + ignoreName = os.path.join(name, Hg.IgnoreFileName) if os.path.exists(ignoreName): res = E5MessageBox.yesNo(self.__ui, self.trUtf8("Create .hgignore file"),