Show More
@@ -96,7 +96,7 b' class CustomLockFactory(FileLock):' | |||
|
96 | 96 | # set non-blocking, this will cause an exception if we cannot acquire a lock |
|
97 | 97 | operation |= fcntl.LOCK_NB |
|
98 | 98 | start_lock_time = time.time() |
|
99 | timeout = 60 * 5 # 5min | |
|
99 | timeout = 60 * 15 # 15min | |
|
100 | 100 | while True: |
|
101 | 101 | try: |
|
102 | 102 | flock_org(fd, operation) |
@@ -76,6 +76,7 b' var showRepoSize = function(target, repo' | |||
|
76 | 76 | var url = pyroutes.url('repo_stats', |
|
77 | 77 | {"repo_name": repo_name, "commit_id": commit_id}); |
|
78 | 78 | |
|
79 | container.show(); | |
|
79 | 80 | if (!container.hasClass('loaded')) { |
|
80 | 81 | $.ajax({url: url}) |
|
81 | 82 | .complete(function (data) { |
@@ -83,9 +83,9 b'' | |||
|
83 | 83 | </div> |
|
84 | 84 | </div> |
|
85 | 85 | |
|
86 | <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;"> | |
|
86 | <div class="fieldset"> | |
|
87 | 87 | <div class="left-label-summary"> |
|
88 | ${_('Information')}: | |
|
88 | | |
|
89 | 89 | </div> |
|
90 | 90 | <div class="right-content"> |
|
91 | 91 | <div class="commit-info"> |
@@ -105,28 +105,42 b'' | |||
|
105 | 105 | ## commits |
|
106 | 106 | <span class="tag"> |
|
107 | 107 | % if commit_rev == -1: |
|
108 |
${_ungettext('%(num)s Commit', '%(num)s Commits', 0) % {'num': 0}} |
|
|
108 | ${_ungettext('%(num)s Commit', '%(num)s Commits', 0) % {'num': 0}} | |
|
109 | 109 | % else: |
|
110 | 110 | <a href="${h.route_path('repo_changelog', repo_name=c.repo_name)}"> |
|
111 |
${_ungettext('%(num)s Commit', '%(num)s Commits', commit_rev) % {'num': commit_rev}}</a> |
|
|
111 | ${_ungettext('%(num)s Commit', '%(num)s Commits', commit_rev) % {'num': commit_rev}}</a> | |
|
112 | 112 | % endif |
|
113 | 113 | </span> |
|
114 | 114 | |
|
115 | 115 | ## forks |
|
116 | 116 | <span class="tag"> |
|
117 | 117 | <a title="${_('Number of Repository Forks')}" href="${h.route_path('repo_forks_show_all', repo_name=c.repo_name)}"> |
|
118 |
${c.repository_forks} ${_ungettext('Fork', 'Forks', c.repository_forks)}</a> |
|
|
118 | ${c.repository_forks} ${_ungettext('Fork', 'Forks', c.repository_forks)}</a> | |
|
119 | 119 | </span> |
|
120 | 120 | |
|
121 |
|
|
|
122 | % if commit_rev == -1: | |
|
123 | <span class="stats-bullet">0 B</span> | |
|
124 | % else: | |
|
125 | <span class="stats-bullet" id="repo_size_container"> | |
|
126 | ${_('Calculating Repository Size...')} | |
|
127 | </span> | |
|
128 | % endif | |
|
121 | </div> | |
|
122 | </div> | |
|
123 | </div> | |
|
124 | </div> | |
|
129 | 125 | |
|
126 | <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;"> | |
|
127 | <div class="left-label-summary"> | |
|
128 | ${_('Repository size')}: | |
|
129 | </div> | |
|
130 | <div class="right-content"> | |
|
131 | <div class="commit-info"> | |
|
132 | <div class="tags"> | |
|
133 | ## repo size | |
|
134 | % if commit_rev == -1: | |
|
135 | <span class="stats-bullet">0 B</span> | |
|
136 | % else: | |
|
137 | <span> | |
|
138 | <a href="#showSize" onclick="calculateSize(); $(this).hide(); return false" id="show-repo-size">Show repository size</a> | |
|
139 | </span> | |
|
140 | <span class="stats-bullet" id="repo_size_container" style="display:none"> | |
|
141 | ${_('Calculating Repository Size...')} | |
|
142 | </span> | |
|
143 | % endif | |
|
130 | 144 | </div> |
|
131 | 145 | </div> |
|
132 | 146 | </div> |
@@ -106,8 +106,8 b'' | |||
|
106 | 106 | }); |
|
107 | 107 | |
|
108 | 108 | |
|
109 | // load details on summary page expand | |
|
110 | $('#summary_details_expand').on('click', function() { | |
|
109 | // calculate size of repository | |
|
110 | calculateSize = function () { | |
|
111 | 111 | |
|
112 | 112 | var callback = function (data) { |
|
113 | 113 | % if c.show_stats: |
@@ -115,13 +115,9 b'' | |||
|
115 | 115 | % endif |
|
116 | 116 | }; |
|
117 | 117 | |
|
118 | showRepoSize( | |
|
119 | 'repo_size_container', | |
|
120 | templateContext.repo_name, | |
|
121 | templateContext.repo_landing_commit, | |
|
122 | callback); | |
|
118 | showRepoSize('repo_size_container', templateContext.repo_name, templateContext.repo_landing_commit, callback); | |
|
123 | 119 | |
|
124 |
} |
|
|
120 | } | |
|
125 | 121 | |
|
126 | 122 | }) |
|
127 | 123 | </script> |
General Comments 0
You need to be logged in to leave comments.
Login now