Show More
@@ -27,7 +27,7 b' fixes' | |||
|
27 | 27 | - fixed file browser bug, when switching into given form revision the url was |
|
28 | 28 | not changing |
|
29 | 29 | - fixed propagation to error controller on simplehg and simplegit middlewares |
|
30 | ||
|
30 | - fixed error when trying to make a download on empty repository | |
|
31 | 31 | |
|
32 | 32 | |
|
33 | 33 | 1.1.2 (**2011-01-12**) |
@@ -154,16 +154,16 b' class FilesController(BaseController):' | |||
|
154 | 154 | '.tar.gz': ('application/x-tar', 'tgz'), |
|
155 | 155 | '.zip': ('application/zip', 'zip'), |
|
156 | 156 | } |
|
157 | ||
|
157 | ||
|
158 | 158 | fileformat = None |
|
159 | 159 | revision = None |
|
160 | ||
|
160 | ||
|
161 | 161 | for ext in archive_specs.keys(): |
|
162 | 162 | archive_spec = fname.split(ext) |
|
163 | 163 | if len(archive_spec) == 2: |
|
164 | 164 | fileformat = archive_spec[1] or ext |
|
165 | 165 | revision = archive_spec[0] |
|
166 | ||
|
166 | ||
|
167 | 167 | if not archive_specs.has_key(fileformat): |
|
168 | 168 | return _('Unknown archive type') |
|
169 | 169 | |
@@ -173,6 +173,8 b' class FilesController(BaseController):' | |||
|
173 | 173 | repo.get_changeset(revision) |
|
174 | 174 | except ChangesetDoesNotExistError: |
|
175 | 175 | return _('Unknown revision %s') % revision |
|
176 | except EmptyRepositoryError: | |
|
177 | return _('Empty repository') | |
|
176 | 178 | |
|
177 | 179 | archive = tempfile.TemporaryFile() |
|
178 | 180 | localrepo = repo.repo |
@@ -128,17 +128,20 b'' | |||
|
128 | 128 | <label>${_('Download')}:</label> |
|
129 | 129 | </div> |
|
130 | 130 | <div class="input-short"> |
|
131 | ||
|
132 | ${h.select('download_options',c.repo_info.get_changeset().raw_id,c.download_options)} | |
|
133 | %for cnt,archive in enumerate(c.repo_info._get_archives()): | |
|
134 | %if cnt >=1: | |
|
135 | | | |
|
136 |
% |
|
|
137 | <span class="tooltip" title="${_('Download %s as %s') %('tip',archive['type'])}" | |
|
138 | id="${archive['type']+'_link'}">${h.link_to(archive['type'], | |
|
139 | h.url('files_archive_home',repo_name=c.repo_info.name, | |
|
140 | fname='tip'+archive['extension']),class_="archive_icon")}</span> | |
|
141 | %endfor | |
|
131 | %if len(c.repo_info.revisions) == 0: | |
|
132 | ${_('There are no downloads yet')} | |
|
133 | %else: | |
|
134 | ${h.select('download_options',c.repo_info.get_changeset().raw_id,c.download_options)} | |
|
135 | %for cnt,archive in enumerate(c.repo_info._get_archives()): | |
|
136 | %if cnt >=1: | |
|
137 | | | |
|
138 | %endif | |
|
139 | <span class="tooltip" title="${_('Download %s as %s') %('tip',archive['type'])}" | |
|
140 | id="${archive['type']+'_link'}">${h.link_to(archive['type'], | |
|
141 | h.url('files_archive_home',repo_name=c.repo_info.name, | |
|
142 | fname='tip'+archive['extension']),class_="archive_icon")}</span> | |
|
143 | %endfor | |
|
144 | %endif | |
|
142 | 145 | </div> |
|
143 | 146 | </div> |
|
144 | 147 | |
@@ -268,12 +271,11 b'' | |||
|
268 | 271 | </div> |
|
269 | 272 | |
|
270 | 273 | <div class="table"> |
|
271 | ||
|
272 | 274 | %if c.no_data: |
|
273 | 275 | <div style="padding:0 10px 10px 15px;font-size: 1.2em;">${c.no_data_msg} |
|
274 | 276 | %if h.HasPermissionAll('hg.admin')('enable stats on from summary'): |
|
275 | 277 | [${h.link_to(_('enable'),h.url('edit_repo',repo_name=c.repo_name))}] |
|
276 | %endif | |
|
278 | %endif | |
|
277 | 279 | </div> |
|
278 | 280 | %endif: |
|
279 | 281 | <div id="commit_history" style="width:460px;height:300px;float:left"></div> |
General Comments 0
You need to be logged in to leave comments.
Login now