You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by ke...@apache.org on 2018/09/20 13:26:59 UTC

[1/3] allura git commit: [#8231] don't actually change the repo (web process might not have permission to, and this can get called from get_default_branch() automatically

Repository: allura
Updated Branches:
  refs/heads/master f78c70d13 -> 411f59b0d


[#8231] don't actually change the repo (web process might not have permission to, and this can get called from get_default_branch() automatically


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

Branch: refs/heads/master
Commit: 411f59b0dde7dba6ef76bab9f6ae6abf47bab5d1
Parents: 29fb958
Author: Dave Brondsema <da...@brondsema.net>
Authored: Tue Sep 18 13:58:43 2018 -0400
Committer: root <ro...@sft-box-5.v32.lw.sourceforge.com>
Committed: Thu Sep 20 13:24:41 2018 +0000

----------------------------------------------------------------------
 Allura/allura/templates/repo/admin_extensions.html | 2 +-
 ForgeGit/forgegit/model/git_repo.py                | 2 --
 2 files changed, 1 insertion(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/411f59b0/Allura/allura/templates/repo/admin_extensions.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/repo/admin_extensions.html b/Allura/allura/templates/repo/admin_extensions.html
index f3801cf..8a96885 100644
--- a/Allura/allura/templates/repo/admin_extensions.html
+++ b/Allura/allura/templates/repo/admin_extensions.html
@@ -35,7 +35,7 @@
   <hr>
   <div class="grid-13">&nbsp;</div>
   <div class="grid-13">
-    <input type="button" value="Save" class="submit">
+    <input type="submit" value="Save" class="submit">
     {{lib.csrf_token()}}
   </div>
   {% endif %}

http://git-wip-us.apache.org/repos/asf/allura/blob/411f59b0/ForgeGit/forgegit/model/git_repo.py
----------------------------------------------------------------------
diff --git a/ForgeGit/forgegit/model/git_repo.py b/ForgeGit/forgegit/model/git_repo.py
index 950c0c8..a2d55db 100644
--- a/ForgeGit/forgegit/model/git_repo.py
+++ b/ForgeGit/forgegit/model/git_repo.py
@@ -616,8 +616,6 @@ class GitImplementation(M.RepositoryImplementation):
     def set_default_branch(self, name):
         if not name:
             return
-        # HEAD should point to default branch
-        self._git.git.symbolic_ref('HEAD', 'refs/heads/%s' % name)
         self._repo.default_branch_name = name
         session(self._repo).flush(self._repo)
 


[3/3] allura git commit: [#8231] copy some repo settings when forking

Posted by ke...@apache.org.
[#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 <da...@brondsema.net>
Authored: Tue Sep 18 13:46:04 2018 -0400
Committer: root <ro...@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(),


[2/3] allura git commit: [#8231] make viewable extensions dialog work nicer

Posted by ke...@apache.org.
[#8231] make viewable extensions dialog work nicer


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

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

----------------------------------------------------------------------
 Allura/allura/lib/repository.py                 |  4 ++--
 .../allura/templates/repo/admin_extensions.html | 23 +++++---------------
 2 files changed, 8 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/29fb958d/Allura/allura/lib/repository.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/repository.py b/Allura/allura/lib/repository.py
index d89f4c2..c176a63 100644
--- a/Allura/allura/lib/repository.py
+++ b/Allura/allura/lib/repository.py
@@ -258,8 +258,8 @@ class RepoAdminController(DefaultAdminController):
     @expose()
     @require_post()
     def set_extensions(self, **post_data):
-        self.repo.additional_viewable_extensions = post_data[
-            'additional_viewable_extensions']
+        self.repo.additional_viewable_extensions = post_data['additional_viewable_extensions']
+        redirect(request.referer)
 
     @without_trailing_slash
     @expose('jinja:allura:templates/repo/default_branch.html')

http://git-wip-us.apache.org/repos/asf/allura/blob/29fb958d/Allura/allura/templates/repo/admin_extensions.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/repo/admin_extensions.html b/Allura/allura/templates/repo/admin_extensions.html
index e09a77a..f3801cf 100644
--- a/Allura/allura/templates/repo/admin_extensions.html
+++ b/Allura/allura/templates/repo/admin_extensions.html
@@ -16,12 +16,14 @@
        specific language governing permissions and limitations
        under the License.
 -#}
-<form>
+{% import 'allura:templates/jinja_master/lib.html' as lib with context %}
+
+<form method="post" action="{{c.project.url()}}admin/{{app.config.options.mount_point}}/set_extensions">
   <label class="grid-13">Extensions:</label>
   <div class="grid-13">
     {% if allow_config %}
       <input type="text" name="additional_viewable_extensions"
-             id="additional_viewable_extensions" title="e.g., .svnignore,.gitignore,.ini"
+             id="additional_viewable_extensions" placeholder=".ini, .foo, Makefile"
              {% if additional_viewable_extensions %} value="{{additional_viewable_extensions}}"{% endif %}/>
     {% else %}
       <span>{{additional_viewable_extensions}}</span>
@@ -33,21 +35,8 @@
   <hr>
   <div class="grid-13">&nbsp;</div>
   <div class="grid-13">
-    <input type="button" onclick="save_extensions()" value="Save">
+    <input type="button" value="Save" class="submit">
+    {{lib.csrf_token()}}
   </div>
   {% endif %}
 </form>
-{% if allow_config %}
-  <script type="text/javascript">
-    function save_extensions() {
-        var cval = $.cookie('_session_id');
-        $.post('{{c.project.url()}}admin/{{app.config.options.mount_point}}/set_extensions', {
-            additional_viewable_extensions: $('#additional_viewable_extensions').val(),
-            _session_id:cval
-        },
-        function () {
-            location.reload();
-        });
-    }
-  </script>
-{% endif %}