[serverctl] fix schema-diff command
authorJulien Cristau <julien.cristau@logilab.fr>
Tue, 07 Jul 2015 14:13:39 +0200
changeset 10527 2379f136d48c
parent 10526 459d6f24754b
child 10528 992a54e0df41
[serverctl] fix schema-diff command It hadn't been ported away from dbapi.
server/serverctl.py
--- a/server/serverctl.py	Tue Jul 07 14:13:10 2015 +0200
+++ b/server/serverctl.py	Tue Jul 07 14:13:39 2015 +0200
@@ -1038,11 +1038,11 @@
 
     def run(self, args):
         from yams.diff import schema_diff
+        from cubicweb import repoapi
         appid = args.pop(0)
         diff_tool = args.pop(0)
         config = ServerConfiguration.config_for(appid)
-        repo, cnx = repo_cnx(config)
-        cnx.close()
+        repo = repoapi.get_repository(config=config)
         fsschema = config.load_schema(expand_cubes=True)
         schema_diff(fsschema, repo.schema, permissionshandler, diff_tool, ignore=('eid',))