Commits

Anonymous committed e77edac

[entities,schema] add a name to mercurial server configuration

Comments (0)

Files changed (3)

 class MercurialServerConfig(AnyEntity):
     __regid__ = 'MercurialServerConfig'
 
-    def dc_title(self):
-        return self._cw._('mercurial-server config managing %s') % self.base_url
+    def dc_long_title(self):
+        return u'%s (%s)' % (self.name, self.base_url)
 
     @property
     def hgadmin_repo(self):
         'update': ('managers', 'owners'),
         'delete': ('managers', 'owners'),
         }
+    name = String(required=True, maxsize=128, fulltextindexed=True)
     base_url = String(required=True,
                       description=_('Base URL to access the mercurial server'))
     hgadmin_path = String(required=True, default='hgadmin')
         # the case in this fake env: we need to create receiving directory first
         self._prepare_repo(basepath, name, 'hgadmin')
         server_config = self.session.create_entity('MercurialServerConfig',
+                                                   name=u'test hgs',
                                                    base_url=u'file://' + osp.join(basepath, name),
                                                    hgadmin_path=u'hgadmin')
         source_url = 'file://%s/hgadmin' % osp.join(basepath, name)