• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

allura


Commit MetaInfo

修訂9942793c2cf8a8d5b85949bc75c213e9597d26ba (tree)
時間2010-05-19 22:25:05
作者Rick Copeland <rcopeland@geek...>
CommiterRick Copeland

Log Message

Add neighborhood prefixes to all repository paths

Change Summary

差異

--- a/ForgeGit/forgegit/git_main.py
+++ b/ForgeGit/forgegit/git_main.py
@@ -108,12 +108,10 @@ class ForgeGitApp(Application):
108108 create=[role_developer],
109109 write=[role_developer],
110110 admin=c.project.acl['tool'])
111- repo = model.GitRepository()
112- repo.name = self.config.options.mount_point + '.git'
113- repo.fs_path = '/git/' + c.project.shortname + '/'
114- repo.url_path = '/' + c.project.shortname + '/'
115- repo.tool = 'git'
116- repo.status = 'initing'
111+ repo = model.GitRepository(
112+ name=self.config.options.mount_point + '.git',
113+ tool='git',
114+ status='initing')
117115 ThreadLocalORMSession.flush_all()
118116 cloned_from_id = self.config.options.get('cloned_from')
119117 if cloned_from_id is not None:
--- a/ForgeHg/forgehg/hg_main.py
+++ b/ForgeHg/forgehg/hg_main.py
@@ -110,12 +110,10 @@ class ForgeHgApp(Application):
110110 write=[role_developer],
111111 create=[role_developer],
112112 admin=c.project.acl['tool'])
113- repo = model.HgRepository()
114- repo.name = self.config.options.mount_point
115- repo.fs_path = '/hg/' + c.project.shortname + '/'
116- repo.url_path = '/' + c.project.shortname + '/'
117- repo.tool = 'hg'
118- repo.status = 'initing'
113+ repo = model.HgRepository(
114+ name=self.config.options.mount_point,
115+ tool='hg',
116+ status='initing')
119117 ThreadLocalORMSession.flush_all()
120118 cloned_from_id = self.config.options.get('cloned_from')
121119 if cloned_from_id is not None:
--- a/ForgeSVN/forgesvn/svn_main.py
+++ b/ForgeSVN/forgesvn/svn_main.py
@@ -92,8 +92,6 @@ class ForgeSVNApp(Application):
9292 admin=c.project.acl['tool'])
9393 repo = model.SVNRepository(
9494 name=self.config.options.mount_point,
95- fs_path='/svn/' + c.project.shortname + '/',
96- url_path = '/' + c.project.shortname + '/',
9795 tool = 'svn',
9896 status = 'creating')
9997 g.publish('audit', 'scm.svn.init', dict(repo_name=repo.name, repo_path=repo.fs_path))
--- a/pyforge/pyforge/model/repository.py
+++ b/pyforge/pyforge/model/repository.py
@@ -21,6 +21,19 @@ class Repository(Artifact):
2121 status=FieldProperty(str)
2222 email_address=''
2323
24+ def __init__(self, **kw):
25+ if 'name' in kw and 'tool' in kw:
26+ if 'fs_path' not in kw:
27+ kw['fs_path'] = '/' + os.path.join(
28+ kw['tool'],
29+ pylons.c.project.url()[1:],
30+ kw['name'])
31+ if 'url_path' not in kw:
32+ kw['url_path'] = os.path.join(
33+ pylons.c.project.url(),
34+ kw['name'])
35+ super(Repository, self).__init__(**kw)
36+
2437 def url(self):
2538 return self.app_config.url()
2639