[c-c check-mapping] fix dumb name error and add a warning about inlined crossed relation stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 20 Aug 2010 17:08:08 +0200
branchstable
changeset 6132 440df442d705
parent 6131 087c5a168010
child 6133 6f3eabbbdf2e
child 6138 65f5e488f983
[c-c check-mapping] fix dumb name error and add a warning about inlined crossed relation
server/checkintegrity.py
server/serverctl.py
--- a/server/checkintegrity.py	Fri Aug 20 10:59:57 2010 +0200
+++ b/server/checkintegrity.py	Fri Aug 20 17:08:08 2010 +0200
@@ -408,9 +408,13 @@
                     elif not somethingprinted and rschema not in seen:
                         print 'you may want to specify something for %s' % rschema
                         seen.add(rschema)
-            elif not ttypes:
-                warning('relation %s with %s as %s is supported but no target '
-                        'type supported', rschema, role, eschema)
+            else:
+                if not ttypes:
+                    warning('relation %s with %s as %s is supported but no target '
+                            'type supported', rschema, role, eschema)
+                if rschema in mapping['cross_relations'] and rschema.inlined:
+                    error('you should unline relation %s which is supported and '
+                          'may be crossed ', rschema)
     for rschema in mapping['support_relations'].values():
         if rschema in META_RTYPES:
             continue
--- a/server/serverctl.py	Fri Aug 20 10:59:57 2010 +0200
+++ b/server/serverctl.py	Fri Aug 20 17:08:08 2010 +0200
@@ -891,7 +891,7 @@
         config.quick_start = True
         mih = config.migration_handler(connect=False, verbosity=1)
         repo = mih.repo_connect() # necessary to get cubes
-        checkintegrity(config.load_schema(), load_mapping_file(mappingfile))
+        check_mapping(config.load_schema(), load_mapping_file(mappingfile))
 
 register_commands( (CreateInstanceDBCommand,
                     InitInstanceCommand,