• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

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

allura


Commit MetaInfo

Revisión88a95c39fa86f447193e58c229643e0c953b4468 (tree)
Tiempo2010-10-26 03:31:42
AutorRick Copeland <rcopeland@geek...>
CommiterRick Copeland

Log Message

[#1074] - Fixes for followup push

Cambiar Resumen

Diferencia incremental

--- a/Allura/allura/model/repository.py
+++ b/Allura/allura/model/repository.py
@@ -256,7 +256,8 @@ class Repository(Artifact):
256256 self.compute_diffs(commit_ids)
257257 for head in self.heads + self.branches + self.tags:
258258 ci = self.commit(head.object_id)
259- head.count = ci.count_revisions()
259+ if ci is not None:
260+ head.count = ci.count_revisions()
260261 session(self).flush()
261262 return len(commit_ids)
262263
--- a/ForgeGit/forgegit/model/git_repo.py
+++ b/ForgeGit/forgegit/model/git_repo.py
@@ -187,7 +187,7 @@ class GitImplementation(M.RepositoryImplementation):
187187 def _setup_receive_hook(self):
188188 'Set up the git post-commit hook'
189189 text = self.post_receive_template.substitute(
190- url=tg.config.get('base_url', 'localhost:8080')
190+ url=tg.config.get('base_url', 'http://localhost:8080/')
191191 + self._repo.url()[1:] + 'refresh')
192192 fn = os.path.join(self._repo.fs_path, self._repo.name, 'hooks', 'post-receive')
193193 with open(fn, 'w') as fp:
--- a/scripts/refresh-all-repos.py
+++ b/scripts/refresh-all-repos.py
@@ -18,8 +18,14 @@ def main():
1818 for cls in (GM.Repository, HM.Repository, SM.Repository):
1919 for repo in cls.query.find():
2020 c.app = repo.app
21- repo.refresh()
22- repo._impl._setup_receive_hook()
21+ try:
22+ repo.refresh()
23+ except:
24+ log.exception('Error refreshing %r', repo)
25+ try:
26+ repo._impl._setup_receive_hook()
27+ except:
28+ log.exception('Error setting up receive hook for %r', repo)
2329
2430 if __name__ == '__main__':
2531 main()