Thu, 05 Dec 2013 19:01:12 +0100
Implemented a workaround for a bug in recent pysvn versions.
--- a/Documentation/Help/source.qhp Sun Nov 24 16:44:52 2013 +0100 +++ b/Documentation/Help/source.qhp Thu Dec 05 19:01:12 2013 +0100 @@ -9650,6 +9650,7 @@ <keyword name="Subversion" id="Subversion" ref="eric5.Plugins.VcsPlugins.vcsSubversion.subversion.html#Subversion" /> <keyword name="Subversion (Constructor)" id="Subversion (Constructor)" ref="eric5.Plugins.VcsPlugins.vcsPySvn.subversion.html#Subversion.__init__" /> <keyword name="Subversion (Constructor)" id="Subversion (Constructor)" ref="eric5.Plugins.VcsPlugins.vcsSubversion.subversion.html#Subversion.__init__" /> + <keyword name="Subversion.__isVersioned" id="Subversion.__isVersioned" ref="eric5.Plugins.VcsPlugins.vcsPySvn.subversion.html#Subversion.__isVersioned" /> <keyword name="Subversion.__svnURL" id="Subversion.__svnURL" ref="eric5.Plugins.VcsPlugins.vcsPySvn.subversion.html#Subversion.__svnURL" /> <keyword name="Subversion.__svnURL" id="Subversion.__svnURL" ref="eric5.Plugins.VcsPlugins.vcsSubversion.subversion.html#Subversion.__svnURL" /> <keyword name="Subversion.__vcsAllRegisteredStates_wc" id="Subversion.__vcsAllRegisteredStates_wc" ref="eric5.Plugins.VcsPlugins.vcsPySvn.subversion.html#Subversion.__vcsAllRegisteredStates_wc" />
--- a/Documentation/Source/eric5.Plugins.VcsPlugins.vcsPySvn.subversion.html Sun Nov 24 16:44:52 2013 +0100 +++ b/Documentation/Source/eric5.Plugins.VcsPlugins.vcsPySvn.subversion.html Thu Dec 05 19:01:12 2013 +0100 @@ -66,6 +66,9 @@ <td><a href="#Subversion.__init__">Subversion</a></td> <td>Constructor</td> </tr><tr> +<td><a href="#Subversion.__isVersioned">__isVersioned</a></td> +<td>Private method to check, if the given status indicates a versioned state.</td> +</tr><tr> <td><a href="#Subversion.__svnURL">__svnURL</a></td> <td>Private method to format a url for subversion.</td> </tr><tr> @@ -276,6 +279,22 @@ <dd> name of this object (string) </dd> +</dl><a NAME="Subversion.__isVersioned" ID="Subversion.__isVersioned"></a> +<h4>Subversion.__isVersioned</h4> +<b>__isVersioned</b>(<i>status</i>) +<p> + Private method to check, if the given status indicates a + versioned state. +</p><dl> +<dt><i>status</i></dt> +<dd> +status object to check (pysvn.PysvnStatus) +</dd> +</dl><dl> +<dt>Returns:</dt> +<dd> +flag indicating a versioned state (boolean) +</dd> </dl><a NAME="Subversion.__svnURL" ID="Subversion.__svnURL"></a> <h4>Subversion.__svnURL</h4> <b>__svnURL</b>(<i>url</i>)
--- a/Plugins/VcsPlugins/vcsPySvn/subversion.py Sun Nov 24 16:44:52 2013 +0100 +++ b/Plugins/VcsPlugins/vcsPySvn/subversion.py Thu Dec 05 19:01:12 2013 +0100 @@ -1436,7 +1436,7 @@ dirs = [x for x in names.keys() if os.path.isdir(x)] for file in allFiles: name = os.path.normcase(file.path) - if file.is_versioned: + if self.__isVersioned(file): if name in names: names[name] = self.canBeCommitted dn = name @@ -1509,7 +1509,7 @@ locker.unlock() for file in allFiles: name = os.path.normcase(file.path) - if file.is_versioned: + if self.__isVersioned(file): if name in names: names[name] = self.canBeCommitted self.statusCache[name] = self.canBeCommitted @@ -1520,6 +1520,25 @@ return names + def __isVersioned(self, status): + """ + Private method to check, if the given status indicates a + versioned state. + + @param status status object to check (pysvn.PysvnStatus) + @return flag indicating a versioned state (boolean) + """ + return status["text_status"] in [ + pysvn.wc_status_kind.normal, + pysvn.wc_status_kind.added, + pysvn.wc_status_kind.missing, + pysvn.wc_status_kind.deleted, + pysvn.wc_status_kind.replaced, + pysvn.wc_status_kind.modified, + pysvn.wc_status_kind.merged, + pysvn.wc_status_kind.conflicted, + ] + def clearStatusCache(self): """ Public method to clear the status cache.