--- a/eric6/Plugins/VcsPlugins/vcsMercurial/hg.py Sat Aug 24 18:25:37 2019 +0200 +++ b/eric6/Plugins/VcsPlugins/vcsMercurial/hg.py Sat Aug 24 18:26:11 2019 +0200 @@ -273,15 +273,19 @@ """ return True - def vcsConvertProject(self, vcsDataDict, project): + def vcsConvertProject(self, vcsDataDict, project, addAll=True): """ Public method to convert an uncontrolled project to a version controlled project. @param vcsDataDict dictionary of data required for the conversion + @type dict @param project reference to the project object + @type Project + @param addAll flag indicating to add all files to the repository + @type bool """ - success = self.vcsImport(vcsDataDict, project.ppath)[0] + success = self.vcsImport(vcsDataDict, project.ppath, addAll=addAll)[0] if not success: E5MessageBox.critical( self.__ui, @@ -295,15 +299,21 @@ project.closeProject() project.openProject(pfn) - def vcsImport(self, vcsDataDict, projectDir, noDialog=False): + def vcsImport(self, vcsDataDict, projectDir, noDialog=False, addAll=True): """ Public method used to import the project into the Mercurial repository. @param vcsDataDict dictionary of data required for the import + @type dict @param projectDir project directory (string) + @type str @param noDialog flag indicating quiet operations - @return flag indicating an execution without errors (boolean) - and a flag indicating the version controll status (boolean) + @type bool + @param addAll flag indicating to add all files to the repository + @type bool + @return tuple containing a flag indicating an execution without errors + and a flag indicating the version controll status + @rtype tuple of (bool, bool) """ msg = vcsDataDict["message"] if not msg: @@ -323,7 +333,7 @@ if not os.path.exists(ignoreName): status = self.hgCreateIgnoreFile(projectDir) - if status: + if status and addAll: args = self.initCommand("commit") args.append('--addremove') args.append('--message')