allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [1/3] allura git commit: [#8231] copy some repo settings when forking
Date Tue, 18 Sep 2018 17:59:48 GMT
Repository: allura
Updated Branches:
  refs/heads/db/8231 [created] 572fe0f26


[#8231] copy some repo settings when forking


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/96cb9d08
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/96cb9d08
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/96cb9d08

Branch: refs/heads/db/8231
Commit: 96cb9d08971033a59ef469152e13c6e0d5bbaf7b
Parents: c3bc5d1
Author: Dave Brondsema <dave@brondsema.net>
Authored: Tue Sep 18 13:46:04 2018 -0400
Committer: Dave Brondsema <dave@brondsema.net>
Committed: Tue Sep 18 13:46:04 2018 -0400

----------------------------------------------------------------------
 ForgeGit/forgegit/git_main.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/96cb9d08/ForgeGit/forgegit/git_main.py
----------------------------------------------------------------------
diff --git a/ForgeGit/forgegit/git_main.py b/ForgeGit/forgegit/git_main.py
index 050addb..cfdb7b0 100644
--- a/ForgeGit/forgegit/git_main.py
+++ b/ForgeGit/forgegit/git_main.py
@@ -82,19 +82,20 @@ class ForgeGitApp(RepositoryApp):
     def install(self, project):
         '''Create repo object for this tool'''
         super(ForgeGitApp, self).install(project)
-        GM.Repository(
+        repo = GM.Repository(
             name=self.config.options.mount_point + '.git',
             tool='git',
             status='initializing',
             fs_path=self.config.options.get('fs_path'))
         ThreadLocalORMSession.flush_all()
-        cloned_from_project_id = self.config.options.get(
-            'cloned_from_project_id')
+        cloned_from_project_id = self.config.options.get('cloned_from_project_id')
         cloned_from_repo_id = self.config.options.get('cloned_from_repo_id')
         init_from_url = self.config.options.get('init_from_url')
         init_from_path = self.config.options.get('init_from_path')
         if cloned_from_project_id is not None:
             cloned_from = GM.Repository.query.get(_id=cloned_from_repo_id)
+            repo.default_branch_name = cloned_from.default_branch_name
+            repo.additional_viewable_extensions = cloned_from.additional_viewable_extensions
             allura.tasks.repo_tasks.clone.post(
                 cloned_from_path=cloned_from.full_fs_path,
                 cloned_from_name=cloned_from.app.config.script_name(),


Mime
View raw message