Fixed an issue with creating a new project with VCS control.

Sun, 17 Jan 2010 13:41:01 +0000

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 17 Jan 2010 13:41:01 +0000
changeset 71
f21321d97145
parent 70
888a0ea077a3
child 72
015c7e35bd84

Fixed an issue with creating a new project with VCS control.

APIs/Python3/eric5.api file | annotate | diff | comparison | revisions
Documentation/Help/source.qch file | annotate | diff | comparison | revisions
Documentation/Source/eric5.Project.Project.html file | annotate | diff | comparison | revisions
Plugins/VcsPlugins/vcsPySvn/subversion.py file | annotate | diff | comparison | revisions
Plugins/VcsPlugins/vcsSubversion/subversion.py file | annotate | diff | comparison | revisions
Project/Project.py file | annotate | diff | comparison | revisions
eric5.e4p file | annotate | diff | comparison | revisions
--- a/APIs/Python3/eric5.api	Sun Jan 17 12:21:06 2010 +0000
+++ b/APIs/Python3/eric5.api	Sun Jan 17 13:41:01 2010 +0000
@@ -3810,7 +3810,7 @@
 eric5.Project.Project.Project.checkLanguageFiles?4()
 eric5.Project.Project.Project.checkVCSStatus?4()
 eric5.Project.Project.Project.clearStatusMonitorCachedState?4(name)
-eric5.Project.Project.Project.closeProject?4(reopen = False)
+eric5.Project.Project.Project.closeProject?4(reopen = False, noSave = False)
 eric5.Project.Project.Project.copyDirectory?4(olddn, newdn)
 eric5.Project.Project.Project.dbgKeynames?7
 eric5.Project.Project.Project.deleteDirectory?4(dn)
Binary file Documentation/Help/source.qch has changed
--- a/Documentation/Source/eric5.Project.Project.html	Sun Jan 17 12:21:06 2010 +0000
+++ b/Documentation/Source/eric5.Project.Project.html	Sun Jan 17 13:41:01 2010 +0000
@@ -1284,13 +1284,16 @@
 </dd>
 </dl><a NAME="Project.closeProject" ID="Project.closeProject"></a>
 <h4>Project.closeProject</h4>
-<b>closeProject</b>(<i>reopen = False</i>)
+<b>closeProject</b>(<i>reopen = False, noSave = False</i>)
 <p>
         Public slot to close the current project.
 </p><dl>
 <dt><i>reopen=</i></dt>
 <dd>
 flag indicating a reopening of the project (boolean)
+</dd><dt><i>noSave=</i></dt>
+<dd>
+flag indicating to not perform save actions (boolean)
 </dd>
 </dl><dl>
 <dt>Returns:</dt>
--- a/Plugins/VcsPlugins/vcsPySvn/subversion.py	Sun Jan 17 12:21:06 2010 +0000
+++ b/Plugins/VcsPlugins/vcsPySvn/subversion.py	Sun Jan 17 13:41:01 2010 +0000
@@ -252,6 +252,7 @@
                 project.closeProject()
                 return
             shutil.rmtree(tmpProjectDir, True)
+            project.closeProject(noSave = True)
             project.openProject(pfn)
         
     def vcsImport(self, vcsDataDict, projectDir, noDialog = False):
@@ -296,22 +297,20 @@
         locker = QMutexLocker(self.vcsExecutionMutex)
         cwd = os.getcwd()
         os.chdir(os.path.join(tmpDir, project))
-        opts = self.options['global'] + self.options['update']
+        opts = self.options['global']
         recurse = "--non-recursive" not in opts
-        ignore = "--ignore" in opts
         url = self.__svnURL(vcsDir)
         client = self.getClient()
         if not noDialog:
             dlg = \
                 SvnDialog(self.trUtf8('Importing project into Subversion repository'),
-                          "import%s%s --message %s ." % \
+                          "import%s --message %s ." % \
                             ((not recurse) and " --non-recursive" or "", 
-                             ignore and " --ignore" or "",
                              msg),
                     client)
             QApplication.processEvents()
         try:
-            rev = client.import_(".", url, msg, recurse, ignore)
+            rev = client.import_(".", url, msg, recurse, ignore = True)
             status = True
         except pysvn.ClientError as e:
             status = False
--- a/Plugins/VcsPlugins/vcsSubversion/subversion.py	Sun Jan 17 12:21:06 2010 +0000
+++ b/Plugins/VcsPlugins/vcsSubversion/subversion.py	Sun Jan 17 13:41:01 2010 +0000
@@ -245,6 +245,7 @@
                 project.closeProject()
                 return
             shutil.rmtree(tmpProjectDir, True)
+            project.closeProject(noSave = True)
             project.openProject(pfn)
         
     def vcsImport(self, vcsDataDict, projectDir, noDialog = False):
@@ -1818,4 +1819,4 @@
         @param interval check interval for the monitor thread in seconds (integer)
         @return reference to the monitor thread (QThread)
         """
-        return SvnStatusMonitorThread(interval, project.ppath, self)
\ No newline at end of file
+        return SvnStatusMonitorThread(interval, project.ppath, self)
--- a/Project/Project.py	Sun Jan 17 12:21:06 2010 +0000
+++ b/Project/Project.py	Sun Jan 17 13:41:01 2010 +0000
@@ -2917,11 +2917,12 @@
         self.profiledata        and self.profiledata.close()
         self.applicationDiagram and self.applicationDiagram.close()
         
-    def closeProject(self, reopen = False):
+    def closeProject(self, reopen = False, noSave = False):
         """
         Public slot to close the current project.
         
         @keyparam reopen flag indicating a reopening of the project (boolean)
+        @keyparam noSave flag indicating to not perform save actions (boolean)
         @return flag indicating success (boolean)
         """
         # save the list of recently opened projects
@@ -2934,17 +2935,19 @@
             return False
         
         # save the user project properties
-        self.__writeUserProperties()
+        if not noSave:
+            self.__writeUserProperties()
         
         # save the project session file being quiet about error
         if reopen:
             self.__writeSession(quiet = True, indicator = "_tmp")
-        elif Preferences.getProject("AutoSaveSession"):
+        elif Preferences.getProject("AutoSaveSession") and not noSave:
             self.__writeSession(quiet = True)
         
         # save the project debugger properties file being quiet about error
         if Preferences.getProject("AutoSaveDbgProperties") and \
-           self.isDebugPropertiesLoaded():
+           self.isDebugPropertiesLoaded() and \
+           not noSave:
             self.__writeDebugProperties(True)
         
         # now save all open modified files of the project
@@ -2968,7 +2971,8 @@
                 self.__statusMonitorStatus)
         
         # now save the tasks
-        self.__writeTasks()
+        if not noSave:
+            self.__writeTasks()
         self.ui.taskViewer.clearProjectTasks()
         self.ui.taskViewer.setProjectOpen(False)
         
--- a/eric5.e4p	Sun Jan 17 12:21:06 2010 +0000
+++ b/eric5.e4p	Sun Jan 17 13:41:01 2010 +0000
@@ -1050,7 +1050,6 @@
         </key>
         <value>
           <list>
-            <string></string>
           </list>
         </value>
         <key>
@@ -1058,7 +1057,6 @@
         </key>
         <value>
           <list>
-            <string></string>
           </list>
         </value>
         <key>
@@ -1066,7 +1064,6 @@
         </key>
         <value>
           <list>
-            <string></string>
           </list>
         </value>
         <key>
@@ -1074,7 +1071,6 @@
         </key>
         <value>
           <list>
-            <string></string>
           </list>
         </value>
         <key>
@@ -1082,7 +1078,6 @@
         </key>
         <value>
           <list>
-            <string></string>
           </list>
         </value>
         <key>
@@ -1090,7 +1085,6 @@
         </key>
         <value>
           <list>
-            <string></string>
           </list>
         </value>
         <key>
@@ -1098,7 +1092,6 @@
         </key>
         <value>
           <list>
-            <string></string>
           </list>
         </value>
         <key>
@@ -1106,7 +1099,6 @@
         </key>
         <value>
           <list>
-            <string></string>
           </list>
         </value>
         <key>
@@ -1114,7 +1106,6 @@
         </key>
         <value>
           <list>
-            <string></string>
           </list>
         </value>
         <key>
@@ -1122,7 +1113,7 @@
         </key>
         <value>
           <list>
-            <string></string>
+            <string>--show-updates</string>
           </list>
         </value>
         <key>
@@ -1130,7 +1121,6 @@
         </key>
         <value>
           <list>
-            <string></string>
           </list>
         </value>
         <key>
@@ -1138,7 +1128,6 @@
         </key>
         <value>
           <list>
-            <string></string>
           </list>
         </value>
       </dict>

eric ide

mercurial