# HG changeset patch # User Adrien Di Mascio # Date 1304060910 -7200 # Node ID 1144a2d90314a3c5fcc125da19c6d0717e279132 # Parent acd7f0e9f2762f55c9501ca769d263d6a69fb39d# Parent 771f594c12a283df2a278567ce8cdfc5e8a32546 merge diff -r acd7f0e9f276 -r 1144a2d90314 cwconfig.py --- a/cwconfig.py Thu Apr 28 20:41:44 2011 +0200 +++ b/cwconfig.py Fri Apr 29 09:08:30 2011 +0200 @@ -1070,9 +1070,10 @@ def instance_md5_version(self): import hashlib infos = [] - for pkg in self.cubes(): + for pkg in sorted(self.cubes()): version = self.cube_version(pkg) infos.append('%s-%s' % (pkg, version)) + infos.append('cubicweb-%s' % str(self.cubicweb_version())) return hashlib.md5(';'.join(infos)).hexdigest() def load_configuration(self): diff -r acd7f0e9f276 -r 1144a2d90314 cwvreg.py --- a/cwvreg.py Thu Apr 28 20:41:44 2011 +0200 +++ b/cwvreg.py Fri Apr 29 09:08:30 2011 +0200 @@ -402,10 +402,8 @@ if not isinstance(view, class_deprecated)] try: view = self._select_best(views, req, rset=rset, **kwargs) - if view.linkable(): + if view is not None and view.linkable(): yield view - except NoSelectableObject: - continue except Exception: self.exception('error while trying to select %s view for %s', vid, rset) diff -r acd7f0e9f276 -r 1144a2d90314 devtools/testlib.py --- a/devtools/testlib.py Thu Apr 28 20:41:44 2011 +0200 +++ b/devtools/testlib.py Fri Apr 29 09:08:30 2011 +0200 @@ -562,6 +562,8 @@ if views: try: view = viewsvreg._select_best(views, req, rset=rset) + if view is None: + raise NoSelectableObject((req,), {'rset':rset}, views) if view.linkable(): yield view else: diff -r acd7f0e9f276 -r 1144a2d90314 misc/migration/3.10.9_Any.py --- a/misc/migration/3.10.9_Any.py Thu Apr 28 20:41:44 2011 +0200 +++ b/misc/migration/3.10.9_Any.py Fri Apr 29 09:08:30 2011 +0200 @@ -15,14 +15,14 @@ nbops = rset.rowcount enabled = interactive_mode with progress(title=title, nbops=nbops, size=30, enabled=enabled) as pb: - with hooks_control(session, session.HOOKS_DENY_ALL, 'integrity'): - for i, row in enumerate(rset): + for i, row in enumerate(rset): + with hooks_control(session, session.HOOKS_DENY_ALL, 'integrity'): data = {'eid': row[0], 'cwuri': row[1].replace(u'/eid', u'')} rql('SET X cwuri %(cwuri)s WHERE X eid %(eid)s', data) - if not i % 100: # commit every 100 entities to limit memory consumption - pb.text = "%i committed" % i - commit(ask_confirm=False) - pb.update() + if not i % 100: # commit every 100 entities to limit memory consumption + pb.text = "%i committed" % i + commit(ask_confirm=False) + pb.update() commit(ask_confirm=False) try: diff -r acd7f0e9f276 -r 1144a2d90314 utils.py --- a/utils.py Thu Apr 28 20:41:44 2011 +0200 +++ b/utils.py Fri Apr 29 09:08:30 2011 +0200 @@ -230,7 +230,10 @@ Request objects use a HTMLHead instance to ease adding of javascripts and stylesheets """ - js_unload_code = u'jQuery(window).unload(unloadPageData);' + js_unload_code = u'''if (typeof(pageDataUnloaded) == 'undefined') { + jQuery(window).unload(unloadPageData); + pageDataUnloaded = true; +}''' # Making