Finished the introduction of a project hash to identify the project.

Wed, 24 Mar 2010 18:29:26 +0000

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 24 Mar 2010 18:29:26 +0000
changeset 152
ee3a13a0ad59
parent 151
00c27aeede62
child 153
ef200d69dba0

Finished the introduction of a project hash to identify the project.

APIs/Python3/eric5.api file | annotate | diff | comparison | revisions
Documentation/Help/source.qch file | annotate | diff | comparison | revisions
Documentation/Help/source.qhp file | annotate | diff | comparison | revisions
Documentation/Source/eric5.E5XML.ProjectHandler.html 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	Wed Mar 24 08:43:48 2010 +0000
+++ b/APIs/Python3/eric5.api	Wed Mar 24 18:29:26 2010 +0000
@@ -1344,6 +1344,7 @@
 eric5.E5XML.ProjectHandler.ProjectHandler.endEric4ApiParams?4()
 eric5.E5XML.ProjectHandler.ProjectHandler.endEric4DocParams?4()
 eric5.E5XML.ProjectHandler.ProjectHandler.endForm?4()
+eric5.E5XML.ProjectHandler.ProjectHandler.endHash?4()
 eric5.E5XML.ProjectHandler.ProjectHandler.endInterface?4()
 eric5.E5XML.ProjectHandler.ProjectHandler.endLanguage?4()
 eric5.E5XML.ProjectHandler.ProjectHandler.endMainScript?4()
Binary file Documentation/Help/source.qch has changed
--- a/Documentation/Help/source.qhp	Wed Mar 24 08:43:48 2010 +0000
+++ b/Documentation/Help/source.qhp	Wed Mar 24 18:29:26 2010 +0000
@@ -978,6 +978,7 @@
       <keyword name="ProjectHandler.endEric4ApiParams" id="ProjectHandler.endEric4ApiParams" ref="eric5.E5XML.ProjectHandler.html#ProjectHandler.endEric4ApiParams" />
       <keyword name="ProjectHandler.endEric4DocParams" id="ProjectHandler.endEric4DocParams" ref="eric5.E5XML.ProjectHandler.html#ProjectHandler.endEric4DocParams" />
       <keyword name="ProjectHandler.endForm" id="ProjectHandler.endForm" ref="eric5.E5XML.ProjectHandler.html#ProjectHandler.endForm" />
+      <keyword name="ProjectHandler.endHash" id="ProjectHandler.endHash" ref="eric5.E5XML.ProjectHandler.html#ProjectHandler.endHash" />
       <keyword name="ProjectHandler.endInterface" id="ProjectHandler.endInterface" ref="eric5.E5XML.ProjectHandler.html#ProjectHandler.endInterface" />
       <keyword name="ProjectHandler.endLanguage" id="ProjectHandler.endLanguage" ref="eric5.E5XML.ProjectHandler.html#ProjectHandler.endLanguage" />
       <keyword name="ProjectHandler.endMainScript" id="ProjectHandler.endMainScript" ref="eric5.E5XML.ProjectHandler.html#ProjectHandler.endMainScript" />
--- a/Documentation/Source/eric5.E5XML.ProjectHandler.html	Wed Mar 24 08:43:48 2010 +0000
+++ b/Documentation/Source/eric5.E5XML.ProjectHandler.html	Wed Mar 24 18:29:26 2010 +0000
@@ -90,6 +90,9 @@
 <td><a href="#ProjectHandler.endForm">endForm</a></td>
 <td>Handler method for the "Form" end tag.</td>
 </tr><tr>
+<td><a href="#ProjectHandler.endHash">endHash</a></td>
+<td>Handler method for the "Hash" end tag.</td>
+</tr><tr>
 <td><a href="#ProjectHandler.endInterface">endInterface</a></td>
 <td>Handler method for the "Interface" end tag.</td>
 </tr><tr>
@@ -318,6 +321,11 @@
 <b>endForm</b>(<i></i>)
 <p>
         Handler method for the "Form" end tag.
+</p><a NAME="ProjectHandler.endHash" ID="ProjectHandler.endHash"></a>
+<h4>ProjectHandler.endHash</h4>
+<b>endHash</b>(<i></i>)
+<p>
+        Handler method for the "Hash" end tag.
 </p><a NAME="ProjectHandler.endInterface" ID="ProjectHandler.endInterface"></a>
 <h4>ProjectHandler.endInterface</h4>
 <b>endInterface</b>(<i></i>)
--- a/Project/Project.py	Wed Mar 24 08:43:48 2010 +0000
+++ b/Project/Project.py	Wed Mar 24 18:29:26 2010 +0000
@@ -300,7 +300,7 @@
         for key in self.__class__.keynames:
             self.pdata[key] = []
         self.pdata["AUTHOR"] = ['']
-        self.pdata["EMAIL"] = ['']
+        self.pdata["EMAIL"] = ['']
         self.pdata["HASH"] = ['']
         self.pdata["PROGLANGUAGE"] = ["Python3"]
         self.pdata["MIXEDLANGUAGE"] = [False]
@@ -622,14 +622,14 @@
             for fn in self.pdata["OTHERS"]:
                 dn = os.path.dirname(fn)
                 if dn not in self.otherssubdirs:
-                    self.otherssubdirs.append(dn)
-            
-            # create hash value, if it doesn't have one
-            if not self.pdata["HASH"][0]:
-                hash = str(QCrytographicHash.hash(
-                    QByteArray(self.ppath), QCryptographicHash.Sha1),
-                    encoding = "utf-8")
-                self.pdata["HASH"] = [hash]
+                    self.otherssubdirs.append(dn)
+            
+            # create hash value, if it doesn't have one
+            if not self.pdata["HASH"][0]:
+                hash = str(QCryptographicHash.hash(
+                    QByteArray(self.ppath), QCryptographicHash.Sha1).toHex(),
+                    encoding = "utf-8")
+                self.pdata["HASH"] = [hash]
                 self.setDirty(True)
             
         return res
@@ -2260,12 +2260,12 @@
             self.pluginGrp.setEnabled(self.pdata["PROJECTTYPE"][0] == "E4Plugin")
             
             self.emit(SIGNAL("projectAboutToBeCreated"))
-            
-            hash = str(QCrytographicHash.hash(
-                QByteArray(self.ppath), QCryptographicHash.Sha1),
-                encoding = "utf-8")
-            self.pdata["HASH"] = [hash]
-            
+            
+            hash = str(QCryptographicHash.hash(
+                QByteArray(self.ppath), QCryptographicHash.Sha1).toHex(),
+                encoding = "utf-8")
+            self.pdata["HASH"] = [hash]
+            
             # create the project directory if it doesn't exist already
             if not os.path.isdir(self.ppath):
                 try:
--- a/eric5.e4p	Wed Mar 24 08:43:48 2010 +0000
+++ b/eric5.e4p	Wed Mar 24 18:29:26 2010 +0000
@@ -1,10 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE Project SYSTEM "Project-4.6.dtd">
+<!DOCTYPE Project SYSTEM "Project-5.0.dtd">
 <!-- eric5 project file for project eric5 -->
-<Project version="4.6">
+<Project version="5.0">
   <Language>en_US</Language>
   <ProjectWordList>Dictionaries/words.dic</ProjectWordList>
   <ProjectExcludeList>Dictionaries/excludes.dic</ProjectExcludeList>
+  <Hash>df7daa8781250f7664e6ecaeaf1361fa2efd39ee</Hash>
   <ProgLanguage mixed="1">Python3</ProgLanguage>
   <ProjectType>Qt4</ProjectType>
   <Description>eric5 is an integrated development environment for
the Python and Ruby language. It uses the PyQt4
bindings and the QScintilla2 editor widget.</Description>

eric ide

mercurial