allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kentontay...@apache.org
Subject [3/3] allura git commit: [#8231] copy some repo settings when forking
Date Thu, 20 Sep 2018 13:27:01 GMT
[#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/3b114864
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/3b114864
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/3b114864

Branch: refs/heads/master
Commit: 3b1148649fa6286eb8a4d33e7ff865ab3fe8221b
Parents: f78c70d
Author: Dave Brondsema <dave@brondsema.net>
Authored: Tue Sep 18 13:46:04 2018 -0400
Committer: root <root@sft-box-5.v32.lw.sourceforge.com>
Committed: Thu Sep 20 13:24:41 2018 +0000

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


http://git-wip-us.apache.org/repos/asf/allura/blob/3b114864/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