##// END OF EJS Templates
updated CONTRIBUTORS...
marcink -
r2058:fb51a6fc beta
parent child Browse files
Show More
@@ -1,18 +1,19 b''
1 List of contributors to RhodeCode project:
1 List of contributors to RhodeCode project:
2 Marcin Kuźmiński <marcin@python-works.com>
2 Marcin Kuźmiński <marcin@python-works.com>
3 Lukasz Balcerzak <lukaszbalcerzak@gmail.com>
3 Lukasz Balcerzak <lukaszbalcerzak@gmail.com>
4 Jason Harris <jason@jasonfharris.com>
4 Jason Harris <jason@jasonfharris.com>
5 Thayne Harbaugh <thayne@fusionio.com>
5 Thayne Harbaugh <thayne@fusionio.com>
6 cejones
6 cejones
7 Thomas Waldmann <tw-public@gmx.de>
7 Thomas Waldmann <tw-public@gmx.de>
8 Lorenzo M. Catucci <lorenzo@sancho.ccd.uniroma2.it>
8 Lorenzo M. Catucci <lorenzo@sancho.ccd.uniroma2.it>
9 Dmitri Kuznetsov
9 Dmitri Kuznetsov
10 Jared Bunting <jared.bunting@peachjean.com>
10 Jared Bunting <jared.bunting@peachjean.com>
11 Steve Romanow <slestak989@gmail.com>
11 Steve Romanow <slestak989@gmail.com>
12 Augosto Hermann <augusto.herrmann@planejamento.gov.br>
12 Augosto Hermann <augusto.herrmann@planejamento.gov.br>
13 Ankit Solanki <ankit.solanki@gmail.com>
13 Ankit Solanki <ankit.solanki@gmail.com>
14 Liad Shani <liadff@gmail.com>
14 Liad Shani <liadff@gmail.com>
15 Les Peabody <lpeabody@gmail.com>
15 Les Peabody <lpeabody@gmail.com>
16 Jonas Oberschweiber <jonas.oberschweiber@d-velop.de>
16 Jonas Oberschweiber <jonas.oberschweiber@d-velop.de>
17 Matt Zuba <matt.zuba@goodwillaz.org>
17 Matt Zuba <matt.zuba@goodwillaz.org>
18 Aras Pranckevicius <aras@unity3d.com> No newline at end of file
18 Aras Pranckevicius <aras@unity3d.com>
19 Tony Bussieres <t.bussieres@gmail.com>
@@ -1,533 +1,534 b''
1 .. _changelog:
1 .. _changelog:
2
2
3 Changelog
3 Changelog
4 =========
4 =========
5
5
6
6
7 1.3.2 (**2012-XX-XX**)
7 1.3.2 (**2012-XX-XX**)
8 ----------------------
8 ----------------------
9
9
10 :status: in-progress
10 :status: in-progress
11 :branch: beta
11 :branch: beta
12
12
13 news
13 news
14 ++++
14 ++++
15
15
16
16
17 fixes
17 fixes
18 +++++
18 +++++
19
19
20 - fixed git protocol issues with repos-groups
20 - fixed git protocol issues with repos-groups
21 - fixed git remote repos validator that prevented from cloning remote git repos
21 - fixed git remote repos validator that prevented from cloning remote git repos
22 - fixes #370 ending slashes fixes for repo and groups
22 - fixes #370 ending slashes fixes for repo and groups
23 - fixes #368 improved git-protocol detection to handle other clients
23
24
24 1.3.1 (**2012-02-27**)
25 1.3.1 (**2012-02-27**)
25 ----------------------
26 ----------------------
26
27
27 news
28 news
28 ++++
29 ++++
29
30
30
31
31 fixes
32 fixes
32 +++++
33 +++++
33
34
34 - redirection loop occurs when remember-me wasn't checked during login
35 - redirection loop occurs when remember-me wasn't checked during login
35 - fixes issues with git blob history generation
36 - fixes issues with git blob history generation
36 - don't fetch branch for git in file history dropdown. Causes unneeded slowness
37 - don't fetch branch for git in file history dropdown. Causes unneeded slowness
37
38
38 1.3.0 (**2012-02-26**)
39 1.3.0 (**2012-02-26**)
39 ----------------------
40 ----------------------
40
41
41 news
42 news
42 ++++
43 ++++
43
44
44 - code review, inspired by github code-comments
45 - code review, inspired by github code-comments
45 - #215 rst and markdown README files support
46 - #215 rst and markdown README files support
46 - #252 Container-based and proxy pass-through authentication support
47 - #252 Container-based and proxy pass-through authentication support
47 - #44 branch browser. Filtering of changelog by branches
48 - #44 branch browser. Filtering of changelog by branches
48 - mercurial bookmarks support
49 - mercurial bookmarks support
49 - new hover top menu, optimized to add maximum size for important views
50 - new hover top menu, optimized to add maximum size for important views
50 - configurable clone url template with possibility to specify protocol like
51 - configurable clone url template with possibility to specify protocol like
51 ssh:// or http:// and also manually alter other parts of clone_url.
52 ssh:// or http:// and also manually alter other parts of clone_url.
52 - enabled largefiles extension by default
53 - enabled largefiles extension by default
53 - optimized summary file pages and saved a lot of unused space in them
54 - optimized summary file pages and saved a lot of unused space in them
54 - #239 option to manually mark repository as fork
55 - #239 option to manually mark repository as fork
55 - #320 mapping of commit authors to RhodeCode users
56 - #320 mapping of commit authors to RhodeCode users
56 - #304 hashes are displayed using monospace font
57 - #304 hashes are displayed using monospace font
57 - diff configuration, toggle white lines and context lines
58 - diff configuration, toggle white lines and context lines
58 - #307 configurable diffs, whitespace toggle, increasing context lines
59 - #307 configurable diffs, whitespace toggle, increasing context lines
59 - sorting on branches, tags and bookmarks using YUI datatable
60 - sorting on branches, tags and bookmarks using YUI datatable
60 - improved file filter on files page
61 - improved file filter on files page
61 - implements #330 api method for listing nodes ar particular revision
62 - implements #330 api method for listing nodes ar particular revision
62 - #73 added linking issues in commit messages to chosen issue tracker url
63 - #73 added linking issues in commit messages to chosen issue tracker url
63 based on user defined regular expression
64 based on user defined regular expression
64 - added linking of changesets in commit messages
65 - added linking of changesets in commit messages
65 - new compact changelog with expandable commit messages
66 - new compact changelog with expandable commit messages
66 - firstname and lastname are optional in user creation
67 - firstname and lastname are optional in user creation
67 - #348 added post-create repository hook
68 - #348 added post-create repository hook
68 - #212 global encoding settings is now configurable from .ini files
69 - #212 global encoding settings is now configurable from .ini files
69 - #227 added repository groups permissions
70 - #227 added repository groups permissions
70 - markdown gets codehilite extensions
71 - markdown gets codehilite extensions
71 - new API methods, delete_repositories, grante/revoke permissions for groups
72 - new API methods, delete_repositories, grante/revoke permissions for groups
72 and repos
73 and repos
73
74
74
75
75 fixes
76 fixes
76 +++++
77 +++++
77
78
78 - rewrote dbsession management for atomic operations, and better error handling
79 - rewrote dbsession management for atomic operations, and better error handling
79 - fixed sorting of repo tables
80 - fixed sorting of repo tables
80 - #326 escape of special html entities in diffs
81 - #326 escape of special html entities in diffs
81 - normalized user_name => username in api attributes
82 - normalized user_name => username in api attributes
82 - fixes #298 ldap created users with mixed case emails created conflicts
83 - fixes #298 ldap created users with mixed case emails created conflicts
83 on saving a form
84 on saving a form
84 - fixes issue when owner of a repo couldn't revoke permissions for users
85 - fixes issue when owner of a repo couldn't revoke permissions for users
85 and groups
86 and groups
86 - fixes #271 rare JSON serialization problem with statistics
87 - fixes #271 rare JSON serialization problem with statistics
87 - fixes #337 missing validation check for conflicting names of a group with a
88 - fixes #337 missing validation check for conflicting names of a group with a
88 repositories group
89 repositories group
89 - #340 fixed session problem for mysql and celery tasks
90 - #340 fixed session problem for mysql and celery tasks
90 - fixed #331 RhodeCode mangles repository names if the a repository group
91 - fixed #331 RhodeCode mangles repository names if the a repository group
91 contains the "full path" to the repositories
92 contains the "full path" to the repositories
92 - #355 RhodeCode doesn't store encrypted LDAP passwords
93 - #355 RhodeCode doesn't store encrypted LDAP passwords
93
94
94 1.2.5 (**2012-01-28**)
95 1.2.5 (**2012-01-28**)
95 ----------------------
96 ----------------------
96
97
97 news
98 news
98 ++++
99 ++++
99
100
100 fixes
101 fixes
101 +++++
102 +++++
102
103
103 - #340 Celery complains about MySQL server gone away, added session cleanup
104 - #340 Celery complains about MySQL server gone away, added session cleanup
104 for celery tasks
105 for celery tasks
105 - #341 "scanning for repositories in None" log message during Rescan was missing
106 - #341 "scanning for repositories in None" log message during Rescan was missing
106 a parameter
107 a parameter
107 - fixed creating archives with subrepos. Some hooks were triggered during that
108 - fixed creating archives with subrepos. Some hooks were triggered during that
108 operation leading to crash.
109 operation leading to crash.
109 - fixed missing email in account page.
110 - fixed missing email in account page.
110 - Reverted Mercurial to 2.0.1 for windows due to bug in Mercurial that makes
111 - Reverted Mercurial to 2.0.1 for windows due to bug in Mercurial that makes
111 forking on windows impossible
112 forking on windows impossible
112
113
113 1.2.4 (**2012-01-19**)
114 1.2.4 (**2012-01-19**)
114 ----------------------
115 ----------------------
115
116
116 news
117 news
117 ++++
118 ++++
118
119
119 - RhodeCode is bundled with mercurial series 2.0.X by default, with
120 - RhodeCode is bundled with mercurial series 2.0.X by default, with
120 full support to largefiles extension. Enabled by default in new installations
121 full support to largefiles extension. Enabled by default in new installations
121 - #329 Ability to Add/Remove Groups to/from a Repository via AP
122 - #329 Ability to Add/Remove Groups to/from a Repository via AP
122 - added requires.txt file with requirements
123 - added requires.txt file with requirements
123
124
124 fixes
125 fixes
125 +++++
126 +++++
126
127
127 - fixes db session issues with celery when emailing admins
128 - fixes db session issues with celery when emailing admins
128 - #331 RhodeCode mangles repository names if the a repository group
129 - #331 RhodeCode mangles repository names if the a repository group
129 contains the "full path" to the repositories
130 contains the "full path" to the repositories
130 - #298 Conflicting e-mail addresses for LDAP and RhodeCode users
131 - #298 Conflicting e-mail addresses for LDAP and RhodeCode users
131 - DB session cleanup after hg protocol operations, fixes issues with
132 - DB session cleanup after hg protocol operations, fixes issues with
132 `mysql has gone away` errors
133 `mysql has gone away` errors
133 - #333 doc fixes for get_repo api function
134 - #333 doc fixes for get_repo api function
134 - #271 rare JSON serialization problem with statistics enabled
135 - #271 rare JSON serialization problem with statistics enabled
135 - #337 Fixes issues with validation of repository name conflicting with
136 - #337 Fixes issues with validation of repository name conflicting with
136 a group name. A proper message is now displayed.
137 a group name. A proper message is now displayed.
137 - #292 made ldap_dn in user edit readonly, to get rid of confusion that field
138 - #292 made ldap_dn in user edit readonly, to get rid of confusion that field
138 doesn't work
139 doesn't work
139 - #316 fixes issues with web description in hgrc files
140 - #316 fixes issues with web description in hgrc files
140
141
141 1.2.3 (**2011-11-02**)
142 1.2.3 (**2011-11-02**)
142 ----------------------
143 ----------------------
143
144
144 news
145 news
145 ++++
146 ++++
146
147
147 - added option to manage repos group for non admin users
148 - added option to manage repos group for non admin users
148 - added following API methods for get_users, create_user, get_users_groups,
149 - added following API methods for get_users, create_user, get_users_groups,
149 get_users_group, create_users_group, add_user_to_users_groups, get_repos,
150 get_users_group, create_users_group, add_user_to_users_groups, get_repos,
150 get_repo, create_repo, add_user_to_repo
151 get_repo, create_repo, add_user_to_repo
151 - implements #237 added password confirmation for my account
152 - implements #237 added password confirmation for my account
152 and admin edit user.
153 and admin edit user.
153 - implements #291 email notification for global events are now sent to all
154 - implements #291 email notification for global events are now sent to all
154 administrator users, and global config email.
155 administrator users, and global config email.
155
156
156 fixes
157 fixes
157 +++++
158 +++++
158
159
159 - added option for passing auth method for smtp mailer
160 - added option for passing auth method for smtp mailer
160 - #276 issue with adding a single user with id>10 to usergroups
161 - #276 issue with adding a single user with id>10 to usergroups
161 - #277 fixes windows LDAP settings in which missing values breaks the ldap auth
162 - #277 fixes windows LDAP settings in which missing values breaks the ldap auth
162 - #288 fixes managing of repos in a group for non admin user
163 - #288 fixes managing of repos in a group for non admin user
163
164
164 1.2.2 (**2011-10-17**)
165 1.2.2 (**2011-10-17**)
165 ----------------------
166 ----------------------
166
167
167 news
168 news
168 ++++
169 ++++
169
170
170 - #226 repo groups are available by path instead of numerical id
171 - #226 repo groups are available by path instead of numerical id
171
172
172 fixes
173 fixes
173 +++++
174 +++++
174
175
175 - #259 Groups with the same name but with different parent group
176 - #259 Groups with the same name but with different parent group
176 - #260 Put repo in group, then move group to another group -> repo becomes unavailable
177 - #260 Put repo in group, then move group to another group -> repo becomes unavailable
177 - #258 RhodeCode 1.2 assumes egg folder is writable (lockfiles problems)
178 - #258 RhodeCode 1.2 assumes egg folder is writable (lockfiles problems)
178 - #265 ldap save fails sometimes on converting attributes to booleans,
179 - #265 ldap save fails sometimes on converting attributes to booleans,
179 added getter and setter into model that will prevent from this on db model level
180 added getter and setter into model that will prevent from this on db model level
180 - fixed problems with timestamps issues #251 and #213
181 - fixed problems with timestamps issues #251 and #213
181 - fixes #266 RhodeCode allows to create repo with the same name and in
182 - fixes #266 RhodeCode allows to create repo with the same name and in
182 the same parent as group
183 the same parent as group
183 - fixes #245 Rescan of the repositories on Windows
184 - fixes #245 Rescan of the repositories on Windows
184 - fixes #248 cannot edit repos inside a group on windows
185 - fixes #248 cannot edit repos inside a group on windows
185 - fixes #219 forking problems on windows
186 - fixes #219 forking problems on windows
186
187
187 1.2.1 (**2011-10-08**)
188 1.2.1 (**2011-10-08**)
188 ----------------------
189 ----------------------
189
190
190 news
191 news
191 ++++
192 ++++
192
193
193
194
194 fixes
195 fixes
195 +++++
196 +++++
196
197
197 - fixed problems with basic auth and push problems
198 - fixed problems with basic auth and push problems
198 - gui fixes
199 - gui fixes
199 - fixed logger
200 - fixed logger
200
201
201 1.2.0 (**2011-10-07**)
202 1.2.0 (**2011-10-07**)
202 ----------------------
203 ----------------------
203
204
204 news
205 news
205 ++++
206 ++++
206
207
207 - implemented #47 repository groups
208 - implemented #47 repository groups
208 - implemented #89 Can setup google analytics code from settings menu
209 - implemented #89 Can setup google analytics code from settings menu
209 - implemented #91 added nicer looking archive urls with more download options
210 - implemented #91 added nicer looking archive urls with more download options
210 like tags, branches
211 like tags, branches
211 - implemented #44 into file browsing, and added follow branch option
212 - implemented #44 into file browsing, and added follow branch option
212 - implemented #84 downloads can be enabled/disabled for each repository
213 - implemented #84 downloads can be enabled/disabled for each repository
213 - anonymous repository can be cloned without having to pass default:default
214 - anonymous repository can be cloned without having to pass default:default
214 into clone url
215 into clone url
215 - fixed #90 whoosh indexer can index chooses repositories passed in command
216 - fixed #90 whoosh indexer can index chooses repositories passed in command
216 line
217 line
217 - extended journal with day aggregates and paging
218 - extended journal with day aggregates and paging
218 - implemented #107 source code lines highlight ranges
219 - implemented #107 source code lines highlight ranges
219 - implemented #93 customizable changelog on combined revision ranges -
220 - implemented #93 customizable changelog on combined revision ranges -
220 equivalent of githubs compare view
221 equivalent of githubs compare view
221 - implemented #108 extended and more powerful LDAP configuration
222 - implemented #108 extended and more powerful LDAP configuration
222 - implemented #56 users groups
223 - implemented #56 users groups
223 - major code rewrites optimized codes for speed and memory usage
224 - major code rewrites optimized codes for speed and memory usage
224 - raw and diff downloads are now in git format
225 - raw and diff downloads are now in git format
225 - setup command checks for write access to given path
226 - setup command checks for write access to given path
226 - fixed many issues with international characters and unicode. It uses utf8
227 - fixed many issues with international characters and unicode. It uses utf8
227 decode with replace to provide less errors even with non utf8 encoded strings
228 decode with replace to provide less errors even with non utf8 encoded strings
228 - #125 added API KEY access to feeds
229 - #125 added API KEY access to feeds
229 - #109 Repository can be created from external Mercurial link (aka. remote
230 - #109 Repository can be created from external Mercurial link (aka. remote
230 repository, and manually updated (via pull) from admin panel
231 repository, and manually updated (via pull) from admin panel
231 - beta git support - push/pull server + basic view for git repos
232 - beta git support - push/pull server + basic view for git repos
232 - added followers page and forks page
233 - added followers page and forks page
233 - server side file creation (with binary file upload interface)
234 - server side file creation (with binary file upload interface)
234 and edition with commits powered by codemirror
235 and edition with commits powered by codemirror
235 - #111 file browser file finder, quick lookup files on whole file tree
236 - #111 file browser file finder, quick lookup files on whole file tree
236 - added quick login sliding menu into main page
237 - added quick login sliding menu into main page
237 - changelog uses lazy loading of affected files details, in some scenarios
238 - changelog uses lazy loading of affected files details, in some scenarios
238 this can improve speed of changelog page dramatically especially for
239 this can improve speed of changelog page dramatically especially for
239 larger repositories.
240 larger repositories.
240 - implements #214 added support for downloading subrepos in download menu.
241 - implements #214 added support for downloading subrepos in download menu.
241 - Added basic API for direct operations on rhodecode via JSON
242 - Added basic API for direct operations on rhodecode via JSON
242 - Implemented advanced hook management
243 - Implemented advanced hook management
243
244
244 fixes
245 fixes
245 +++++
246 +++++
246
247
247 - fixed file browser bug, when switching into given form revision the url was
248 - fixed file browser bug, when switching into given form revision the url was
248 not changing
249 not changing
249 - fixed propagation to error controller on simplehg and simplegit middlewares
250 - fixed propagation to error controller on simplehg and simplegit middlewares
250 - fixed error when trying to make a download on empty repository
251 - fixed error when trying to make a download on empty repository
251 - fixed problem with '[' chars in commit messages in journal
252 - fixed problem with '[' chars in commit messages in journal
252 - fixed #99 Unicode errors, on file node paths with non utf-8 characters
253 - fixed #99 Unicode errors, on file node paths with non utf-8 characters
253 - journal fork fixes
254 - journal fork fixes
254 - removed issue with space inside renamed repository after deletion
255 - removed issue with space inside renamed repository after deletion
255 - fixed strange issue on formencode imports
256 - fixed strange issue on formencode imports
256 - fixed #126 Deleting repository on Windows, rename used incompatible chars.
257 - fixed #126 Deleting repository on Windows, rename used incompatible chars.
257 - #150 fixes for errors on repositories mapped in db but corrupted in
258 - #150 fixes for errors on repositories mapped in db but corrupted in
258 filesystem
259 filesystem
259 - fixed problem with ascendant characters in realm #181
260 - fixed problem with ascendant characters in realm #181
260 - fixed problem with sqlite file based database connection pool
261 - fixed problem with sqlite file based database connection pool
261 - whoosh indexer and code stats share the same dynamic extensions map
262 - whoosh indexer and code stats share the same dynamic extensions map
262 - fixes #188 - relationship delete of repo_to_perm entry on user removal
263 - fixes #188 - relationship delete of repo_to_perm entry on user removal
263 - fixes issue #189 Trending source files shows "show more" when no more exist
264 - fixes issue #189 Trending source files shows "show more" when no more exist
264 - fixes issue #197 Relative paths for pidlocks
265 - fixes issue #197 Relative paths for pidlocks
265 - fixes issue #198 password will require only 3 chars now for login form
266 - fixes issue #198 password will require only 3 chars now for login form
266 - fixes issue #199 wrong redirection for non admin users after creating a repository
267 - fixes issue #199 wrong redirection for non admin users after creating a repository
267 - fixes issues #202, bad db constraint made impossible to attach same group
268 - fixes issues #202, bad db constraint made impossible to attach same group
268 more than one time. Affects only mysql/postgres
269 more than one time. Affects only mysql/postgres
269 - fixes #218 os.kill patch for windows was missing sig param
270 - fixes #218 os.kill patch for windows was missing sig param
270 - improved rendering of dag (they are not trimmed anymore when number of
271 - improved rendering of dag (they are not trimmed anymore when number of
271 heads exceeds 5)
272 heads exceeds 5)
272
273
273 1.1.8 (**2011-04-12**)
274 1.1.8 (**2011-04-12**)
274 ----------------------
275 ----------------------
275
276
276 news
277 news
277 ++++
278 ++++
278
279
279 - improved windows support
280 - improved windows support
280
281
281 fixes
282 fixes
282 +++++
283 +++++
283
284
284 - fixed #140 freeze of python dateutil library, since new version is python2.x
285 - fixed #140 freeze of python dateutil library, since new version is python2.x
285 incompatible
286 incompatible
286 - setup-app will check for write permission in given path
287 - setup-app will check for write permission in given path
287 - cleaned up license info issue #149
288 - cleaned up license info issue #149
288 - fixes for issues #137,#116 and problems with unicode and accented characters.
289 - fixes for issues #137,#116 and problems with unicode and accented characters.
289 - fixes crashes on gravatar, when passed in email as unicode
290 - fixes crashes on gravatar, when passed in email as unicode
290 - fixed tooltip flickering problems
291 - fixed tooltip flickering problems
291 - fixed came_from redirection on windows
292 - fixed came_from redirection on windows
292 - fixed logging modules, and sql formatters
293 - fixed logging modules, and sql formatters
293 - windows fixes for os.kill issue #133
294 - windows fixes for os.kill issue #133
294 - fixes path splitting for windows issues #148
295 - fixes path splitting for windows issues #148
295 - fixed issue #143 wrong import on migration to 1.1.X
296 - fixed issue #143 wrong import on migration to 1.1.X
296 - fixed problems with displaying binary files, thanks to Thomas Waldmann
297 - fixed problems with displaying binary files, thanks to Thomas Waldmann
297 - removed name from archive files since it's breaking ui for long repo names
298 - removed name from archive files since it's breaking ui for long repo names
298 - fixed issue with archive headers sent to browser, thanks to Thomas Waldmann
299 - fixed issue with archive headers sent to browser, thanks to Thomas Waldmann
299 - fixed compatibility for 1024px displays, and larger dpi settings, thanks to
300 - fixed compatibility for 1024px displays, and larger dpi settings, thanks to
300 Thomas Waldmann
301 Thomas Waldmann
301 - fixed issue #166 summary pager was skipping 10 revisions on second page
302 - fixed issue #166 summary pager was skipping 10 revisions on second page
302
303
303
304
304 1.1.7 (**2011-03-23**)
305 1.1.7 (**2011-03-23**)
305 ----------------------
306 ----------------------
306
307
307 news
308 news
308 ++++
309 ++++
309
310
310 fixes
311 fixes
311 +++++
312 +++++
312
313
313 - fixed (again) #136 installation support for FreeBSD
314 - fixed (again) #136 installation support for FreeBSD
314
315
315
316
316 1.1.6 (**2011-03-21**)
317 1.1.6 (**2011-03-21**)
317 ----------------------
318 ----------------------
318
319
319 news
320 news
320 ++++
321 ++++
321
322
322 fixes
323 fixes
323 +++++
324 +++++
324
325
325 - fixed #136 installation support for FreeBSD
326 - fixed #136 installation support for FreeBSD
326 - RhodeCode will check for python version during installation
327 - RhodeCode will check for python version during installation
327
328
328 1.1.5 (**2011-03-17**)
329 1.1.5 (**2011-03-17**)
329 ----------------------
330 ----------------------
330
331
331 news
332 news
332 ++++
333 ++++
333
334
334 - basic windows support, by exchanging pybcrypt into sha256 for windows only
335 - basic windows support, by exchanging pybcrypt into sha256 for windows only
335 highly inspired by idea of mantis406
336 highly inspired by idea of mantis406
336
337
337 fixes
338 fixes
338 +++++
339 +++++
339
340
340 - fixed sorting by author in main page
341 - fixed sorting by author in main page
341 - fixed crashes with diffs on binary files
342 - fixed crashes with diffs on binary files
342 - fixed #131 problem with boolean values for LDAP
343 - fixed #131 problem with boolean values for LDAP
343 - fixed #122 mysql problems thanks to striker69
344 - fixed #122 mysql problems thanks to striker69
344 - fixed problem with errors on calling raw/raw_files/annotate functions
345 - fixed problem with errors on calling raw/raw_files/annotate functions
345 with unknown revisions
346 with unknown revisions
346 - fixed returned rawfiles attachment names with international character
347 - fixed returned rawfiles attachment names with international character
347 - cleaned out docs, big thanks to Jason Harris
348 - cleaned out docs, big thanks to Jason Harris
348
349
349 1.1.4 (**2011-02-19**)
350 1.1.4 (**2011-02-19**)
350 ----------------------
351 ----------------------
351
352
352 news
353 news
353 ++++
354 ++++
354
355
355 fixes
356 fixes
356 +++++
357 +++++
357
358
358 - fixed formencode import problem on settings page, that caused server crash
359 - fixed formencode import problem on settings page, that caused server crash
359 when that page was accessed as first after server start
360 when that page was accessed as first after server start
360 - journal fixes
361 - journal fixes
361 - fixed option to access repository just by entering http://server/<repo_name>
362 - fixed option to access repository just by entering http://server/<repo_name>
362
363
363 1.1.3 (**2011-02-16**)
364 1.1.3 (**2011-02-16**)
364 ----------------------
365 ----------------------
365
366
366 news
367 news
367 ++++
368 ++++
368
369
369 - implemented #102 allowing the '.' character in username
370 - implemented #102 allowing the '.' character in username
370 - added option to access repository just by entering http://server/<repo_name>
371 - added option to access repository just by entering http://server/<repo_name>
371 - celery task ignores result for better performance
372 - celery task ignores result for better performance
372
373
373 fixes
374 fixes
374 +++++
375 +++++
375
376
376 - fixed ehlo command and non auth mail servers on smtp_lib. Thanks to
377 - fixed ehlo command and non auth mail servers on smtp_lib. Thanks to
377 apollo13 and Johan Walles
378 apollo13 and Johan Walles
378 - small fixes in journal
379 - small fixes in journal
379 - fixed problems with getting setting for celery from .ini files
380 - fixed problems with getting setting for celery from .ini files
380 - registration, password reset and login boxes share the same title as main
381 - registration, password reset and login boxes share the same title as main
381 application now
382 application now
382 - fixed #113: to high permissions to fork repository
383 - fixed #113: to high permissions to fork repository
383 - fixed problem with '[' chars in commit messages in journal
384 - fixed problem with '[' chars in commit messages in journal
384 - removed issue with space inside renamed repository after deletion
385 - removed issue with space inside renamed repository after deletion
385 - db transaction fixes when filesystem repository creation failed
386 - db transaction fixes when filesystem repository creation failed
386 - fixed #106 relation issues on databases different than sqlite
387 - fixed #106 relation issues on databases different than sqlite
387 - fixed static files paths links to use of url() method
388 - fixed static files paths links to use of url() method
388
389
389 1.1.2 (**2011-01-12**)
390 1.1.2 (**2011-01-12**)
390 ----------------------
391 ----------------------
391
392
392 news
393 news
393 ++++
394 ++++
394
395
395
396
396 fixes
397 fixes
397 +++++
398 +++++
398
399
399 - fixes #98 protection against float division of percentage stats
400 - fixes #98 protection against float division of percentage stats
400 - fixed graph bug
401 - fixed graph bug
401 - forced webhelpers version since it was making troubles during installation
402 - forced webhelpers version since it was making troubles during installation
402
403
403 1.1.1 (**2011-01-06**)
404 1.1.1 (**2011-01-06**)
404 ----------------------
405 ----------------------
405
406
406 news
407 news
407 ++++
408 ++++
408
409
409 - added force https option into ini files for easier https usage (no need to
410 - added force https option into ini files for easier https usage (no need to
410 set server headers with this options)
411 set server headers with this options)
411 - small css updates
412 - small css updates
412
413
413 fixes
414 fixes
414 +++++
415 +++++
415
416
416 - fixed #96 redirect loop on files view on repositories without changesets
417 - fixed #96 redirect loop on files view on repositories without changesets
417 - fixed #97 unicode string passed into server header in special cases (mod_wsgi)
418 - fixed #97 unicode string passed into server header in special cases (mod_wsgi)
418 and server crashed with errors
419 and server crashed with errors
419 - fixed large tooltips problems on main page
420 - fixed large tooltips problems on main page
420 - fixed #92 whoosh indexer is more error proof
421 - fixed #92 whoosh indexer is more error proof
421
422
422 1.1.0 (**2010-12-18**)
423 1.1.0 (**2010-12-18**)
423 ----------------------
424 ----------------------
424
425
425 news
426 news
426 ++++
427 ++++
427
428
428 - rewrite of internals for vcs >=0.1.10
429 - rewrite of internals for vcs >=0.1.10
429 - uses mercurial 1.7 with dotencode disabled for maintaining compatibility
430 - uses mercurial 1.7 with dotencode disabled for maintaining compatibility
430 with older clients
431 with older clients
431 - anonymous access, authentication via ldap
432 - anonymous access, authentication via ldap
432 - performance upgrade for cached repos list - each repository has its own
433 - performance upgrade for cached repos list - each repository has its own
433 cache that's invalidated when needed.
434 cache that's invalidated when needed.
434 - performance upgrades on repositories with large amount of commits (20K+)
435 - performance upgrades on repositories with large amount of commits (20K+)
435 - main page quick filter for filtering repositories
436 - main page quick filter for filtering repositories
436 - user dashboards with ability to follow chosen repositories actions
437 - user dashboards with ability to follow chosen repositories actions
437 - sends email to admin on new user registration
438 - sends email to admin on new user registration
438 - added cache/statistics reset options into repository settings
439 - added cache/statistics reset options into repository settings
439 - more detailed action logger (based on hooks) with pushed changesets lists
440 - more detailed action logger (based on hooks) with pushed changesets lists
440 and options to disable those hooks from admin panel
441 and options to disable those hooks from admin panel
441 - introduced new enhanced changelog for merges that shows more accurate results
442 - introduced new enhanced changelog for merges that shows more accurate results
442 - new improved and faster code stats (based on pygments lexers mapping tables,
443 - new improved and faster code stats (based on pygments lexers mapping tables,
443 showing up to 10 trending sources for each repository. Additionally stats
444 showing up to 10 trending sources for each repository. Additionally stats
444 can be disabled in repository settings.
445 can be disabled in repository settings.
445 - gui optimizations, fixed application width to 1024px
446 - gui optimizations, fixed application width to 1024px
446 - added cut off (for large files/changesets) limit into config files
447 - added cut off (for large files/changesets) limit into config files
447 - whoosh, celeryd, upgrade moved to paster command
448 - whoosh, celeryd, upgrade moved to paster command
448 - other than sqlite database backends can be used
449 - other than sqlite database backends can be used
449
450
450 fixes
451 fixes
451 +++++
452 +++++
452
453
453 - fixes #61 forked repo was showing only after cache expired
454 - fixes #61 forked repo was showing only after cache expired
454 - fixes #76 no confirmation on user deletes
455 - fixes #76 no confirmation on user deletes
455 - fixes #66 Name field misspelled
456 - fixes #66 Name field misspelled
456 - fixes #72 block user removal when he owns repositories
457 - fixes #72 block user removal when he owns repositories
457 - fixes #69 added password confirmation fields
458 - fixes #69 added password confirmation fields
458 - fixes #87 RhodeCode crashes occasionally on updating repository owner
459 - fixes #87 RhodeCode crashes occasionally on updating repository owner
459 - fixes #82 broken annotations on files with more than 1 blank line at the end
460 - fixes #82 broken annotations on files with more than 1 blank line at the end
460 - a lot of fixes and tweaks for file browser
461 - a lot of fixes and tweaks for file browser
461 - fixed detached session issues
462 - fixed detached session issues
462 - fixed when user had no repos he would see all repos listed in my account
463 - fixed when user had no repos he would see all repos listed in my account
463 - fixed ui() instance bug when global hgrc settings was loaded for server
464 - fixed ui() instance bug when global hgrc settings was loaded for server
464 instance and all hgrc options were merged with our db ui() object
465 instance and all hgrc options were merged with our db ui() object
465 - numerous small bugfixes
466 - numerous small bugfixes
466
467
467 (special thanks for TkSoh for detailed feedback)
468 (special thanks for TkSoh for detailed feedback)
468
469
469
470
470 1.0.2 (**2010-11-12**)
471 1.0.2 (**2010-11-12**)
471 ----------------------
472 ----------------------
472
473
473 news
474 news
474 ++++
475 ++++
475
476
476 - tested under python2.7
477 - tested under python2.7
477 - bumped sqlalchemy and celery versions
478 - bumped sqlalchemy and celery versions
478
479
479 fixes
480 fixes
480 +++++
481 +++++
481
482
482 - fixed #59 missing graph.js
483 - fixed #59 missing graph.js
483 - fixed repo_size crash when repository had broken symlinks
484 - fixed repo_size crash when repository had broken symlinks
484 - fixed python2.5 crashes.
485 - fixed python2.5 crashes.
485
486
486
487
487 1.0.1 (**2010-11-10**)
488 1.0.1 (**2010-11-10**)
488 ----------------------
489 ----------------------
489
490
490 news
491 news
491 ++++
492 ++++
492
493
493 - small css updated
494 - small css updated
494
495
495 fixes
496 fixes
496 +++++
497 +++++
497
498
498 - fixed #53 python2.5 incompatible enumerate calls
499 - fixed #53 python2.5 incompatible enumerate calls
499 - fixed #52 disable mercurial extension for web
500 - fixed #52 disable mercurial extension for web
500 - fixed #51 deleting repositories don't delete it's dependent objects
501 - fixed #51 deleting repositories don't delete it's dependent objects
501
502
502
503
503 1.0.0 (**2010-11-02**)
504 1.0.0 (**2010-11-02**)
504 ----------------------
505 ----------------------
505
506
506 - security bugfix simplehg wasn't checking for permissions on commands
507 - security bugfix simplehg wasn't checking for permissions on commands
507 other than pull or push.
508 other than pull or push.
508 - fixed doubled messages after push or pull in admin journal
509 - fixed doubled messages after push or pull in admin journal
509 - templating and css corrections, fixed repo switcher on chrome, updated titles
510 - templating and css corrections, fixed repo switcher on chrome, updated titles
510 - admin menu accessible from options menu on repository view
511 - admin menu accessible from options menu on repository view
511 - permissions cached queries
512 - permissions cached queries
512
513
513 1.0.0rc4 (**2010-10-12**)
514 1.0.0rc4 (**2010-10-12**)
514 --------------------------
515 --------------------------
515
516
516 - fixed python2.5 missing simplejson imports (thanks to Jens Bäckman)
517 - fixed python2.5 missing simplejson imports (thanks to Jens Bäckman)
517 - removed cache_manager settings from sqlalchemy meta
518 - removed cache_manager settings from sqlalchemy meta
518 - added sqlalchemy cache settings to ini files
519 - added sqlalchemy cache settings to ini files
519 - validated password length and added second try of failure on paster setup-app
520 - validated password length and added second try of failure on paster setup-app
520 - fixed setup database destroy prompt even when there was no db
521 - fixed setup database destroy prompt even when there was no db
521
522
522
523
523 1.0.0rc3 (**2010-10-11**)
524 1.0.0rc3 (**2010-10-11**)
524 -------------------------
525 -------------------------
525
526
526 - fixed i18n during installation.
527 - fixed i18n during installation.
527
528
528 1.0.0rc2 (**2010-10-11**)
529 1.0.0rc2 (**2010-10-11**)
529 -------------------------
530 -------------------------
530
531
531 - Disabled dirsize in file browser, it's causing nasty bug when dir renames
532 - Disabled dirsize in file browser, it's causing nasty bug when dir renames
532 occure. After vcs is fixed it'll be put back again.
533 occure. After vcs is fixed it'll be put back again.
533 - templating/css rewrites, optimized css. No newline at end of file
534 - templating/css rewrites, optimized css.
@@ -1,247 +1,251 b''
1 # -*- coding: utf-8 -*-
1 # -*- coding: utf-8 -*-
2 """
2 """
3 rhodecode.lib.middleware.simplegit
3 rhodecode.lib.middleware.simplegit
4 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5
5
6 SimpleGit middleware for handling git protocol request (push/clone etc.)
6 SimpleGit middleware for handling git protocol request (push/clone etc.)
7 It's implemented with basic auth function
7 It's implemented with basic auth function
8
8
9 :created_on: Apr 28, 2010
9 :created_on: Apr 28, 2010
10 :author: marcink
10 :author: marcink
11 :copyright: (C) 2010-2012 Marcin Kuzminski <marcin@python-works.com>
11 :copyright: (C) 2010-2012 Marcin Kuzminski <marcin@python-works.com>
12 :license: GPLv3, see COPYING for more details.
12 :license: GPLv3, see COPYING for more details.
13 """
13 """
14 # This program is free software: you can redistribute it and/or modify
14 # This program is free software: you can redistribute it and/or modify
15 # it under the terms of the GNU General Public License as published by
15 # it under the terms of the GNU General Public License as published by
16 # the Free Software Foundation, either version 3 of the License, or
16 # the Free Software Foundation, either version 3 of the License, or
17 # (at your option) any later version.
17 # (at your option) any later version.
18 #
18 #
19 # This program is distributed in the hope that it will be useful,
19 # This program is distributed in the hope that it will be useful,
20 # but WITHOUT ANY WARRANTY; without even the implied warranty of
20 # but WITHOUT ANY WARRANTY; without even the implied warranty of
21 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 # GNU General Public License for more details.
22 # GNU General Public License for more details.
23 #
23 #
24 # You should have received a copy of the GNU General Public License
24 # You should have received a copy of the GNU General Public License
25 # along with this program. If not, see <http://www.gnu.org/licenses/>.
25 # along with this program. If not, see <http://www.gnu.org/licenses/>.
26
26
27 import os
27 import os
28 import re
28 import re
29 import logging
29 import logging
30 import traceback
30 import traceback
31
31
32 from dulwich import server as dulserver
32 from dulwich import server as dulserver
33
33
34
34
35 class SimpleGitUploadPackHandler(dulserver.UploadPackHandler):
35 class SimpleGitUploadPackHandler(dulserver.UploadPackHandler):
36
36
37 def handle(self):
37 def handle(self):
38 write = lambda x: self.proto.write_sideband(1, x)
38 write = lambda x: self.proto.write_sideband(1, x)
39
39
40 graph_walker = dulserver.ProtocolGraphWalker(self,
40 graph_walker = dulserver.ProtocolGraphWalker(self,
41 self.repo.object_store,
41 self.repo.object_store,
42 self.repo.get_peeled)
42 self.repo.get_peeled)
43 objects_iter = self.repo.fetch_objects(
43 objects_iter = self.repo.fetch_objects(
44 graph_walker.determine_wants, graph_walker, self.progress,
44 graph_walker.determine_wants, graph_walker, self.progress,
45 get_tagged=self.get_tagged)
45 get_tagged=self.get_tagged)
46
46
47 # Do they want any objects?
47 # Do they want any objects?
48 if objects_iter is None or len(objects_iter) == 0:
48 if objects_iter is None or len(objects_iter) == 0:
49 return
49 return
50
50
51 self.progress("counting objects: %d, done.\n" % len(objects_iter))
51 self.progress("counting objects: %d, done.\n" % len(objects_iter))
52 dulserver.write_pack_objects(dulserver.ProtocolFile(None, write),
52 dulserver.write_pack_objects(dulserver.ProtocolFile(None, write),
53 objects_iter, len(objects_iter))
53 objects_iter, len(objects_iter))
54 messages = []
54 messages = []
55 messages.append('thank you for using rhodecode')
55 messages.append('thank you for using rhodecode')
56
56
57 for msg in messages:
57 for msg in messages:
58 self.progress(msg + "\n")
58 self.progress(msg + "\n")
59 # we are done
59 # we are done
60 self.proto.write("0000")
60 self.proto.write("0000")
61
61
62 dulserver.DEFAULT_HANDLERS = {
62 dulserver.DEFAULT_HANDLERS = {
63 'git-upload-pack': SimpleGitUploadPackHandler,
63 'git-upload-pack': SimpleGitUploadPackHandler,
64 'git-receive-pack': dulserver.ReceivePackHandler,
64 'git-receive-pack': dulserver.ReceivePackHandler,
65 }
65 }
66
66
67 from dulwich.repo import Repo
67 from dulwich.repo import Repo
68 from dulwich.web import HTTPGitApplication
68 from dulwich.web import HTTPGitApplication
69
69
70 from paste.httpheaders import REMOTE_USER, AUTH_TYPE
70 from paste.httpheaders import REMOTE_USER, AUTH_TYPE
71
71
72 from rhodecode.lib import safe_str
72 from rhodecode.lib import safe_str
73 from rhodecode.lib.base import BaseVCSController
73 from rhodecode.lib.base import BaseVCSController
74 from rhodecode.lib.auth import get_container_username
74 from rhodecode.lib.auth import get_container_username
75 from rhodecode.lib.utils import is_valid_repo
75 from rhodecode.lib.utils import is_valid_repo
76 from rhodecode.model.db import User
76 from rhodecode.model.db import User
77
77
78 from webob.exc import HTTPNotFound, HTTPForbidden, HTTPInternalServerError
78 from webob.exc import HTTPNotFound, HTTPForbidden, HTTPInternalServerError
79
79
80 log = logging.getLogger(__name__)
80 log = logging.getLogger(__name__)
81
81
82
82
83 GIT_PROTO_PAT = re.compile(r'git-upload-pack|git-receive-pack|info\/refs')
83 GIT_PROTO_PAT = re.compile(r'git-upload-pack|git-receive-pack|info\/refs')
84
84
85
85 def is_git(action):
86 def is_git(action):
86 return action in ['pull','push']
87 return action in ['pull','push']
87
88
89
88 class SimpleGit(BaseVCSController):
90 class SimpleGit(BaseVCSController):
89
91
90 def _handle_request(self, environ, start_response):
92 def _handle_request(self, environ, start_response):
91 #======================================================================
93 #======================================================================
92 # GET ACTION PULL or PUSH
94 # GET ACTION PULL or PUSH
93 #======================================================================
95 #======================================================================
94 action = self.__get_action(environ)
96 action = self.__get_action(environ)
95
97
96 if not is_git(action):
98 if not is_git(action):
97 return self.application(environ, start_response)
99 return self.application(environ, start_response)
98
100
99 proxy_key = 'HTTP_X_REAL_IP'
101 proxy_key = 'HTTP_X_REAL_IP'
100 def_key = 'REMOTE_ADDR'
102 def_key = 'REMOTE_ADDR'
101 ipaddr = environ.get(proxy_key, environ.get(def_key, '0.0.0.0'))
103 ipaddr = environ.get(proxy_key, environ.get(def_key, '0.0.0.0'))
102 username = None
104 username = None
103 # skip passing error to error controller
105 # skip passing error to error controller
104 environ['pylons.status_code_redirect'] = True
106 environ['pylons.status_code_redirect'] = True
105
107
106 #======================================================================
108 #======================================================================
107 # EXTRACT REPOSITORY NAME FROM ENV
109 # EXTRACT REPOSITORY NAME FROM ENV
108 #======================================================================
110 #======================================================================
109 try:
111 try:
110 repo_name = self.__get_repository(environ)
112 repo_name = self.__get_repository(environ)
111 log.debug('Extracted repo name is %s' % repo_name)
113 log.debug('Extracted repo name is %s' % repo_name)
112 except:
114 except:
113 return HTTPInternalServerError()(environ, start_response)
115 return HTTPInternalServerError()(environ, start_response)
114
116
115
117
116 #======================================================================
118 #======================================================================
117 # CHECK ANONYMOUS PERMISSION
119 # CHECK ANONYMOUS PERMISSION
118 #======================================================================
120 #======================================================================
119 if action in ['pull', 'push']:
121 if action in ['pull', 'push']:
120 anonymous_user = self.__get_user('default')
122 anonymous_user = self.__get_user('default')
121 username = anonymous_user.username
123 username = anonymous_user.username
122 anonymous_perm = self._check_permission(action, anonymous_user,
124 anonymous_perm = self._check_permission(action, anonymous_user,
123 repo_name)
125 repo_name)
124
126
125 if anonymous_perm is not True or anonymous_user.active is False:
127 if anonymous_perm is not True or anonymous_user.active is False:
126 if anonymous_perm is not True:
128 if anonymous_perm is not True:
127 log.debug('Not enough credentials to access this '
129 log.debug('Not enough credentials to access this '
128 'repository as anonymous user')
130 'repository as anonymous user')
129 if anonymous_user.active is False:
131 if anonymous_user.active is False:
130 log.debug('Anonymous access is disabled, running '
132 log.debug('Anonymous access is disabled, running '
131 'authentication')
133 'authentication')
132 #==============================================================
134 #==============================================================
133 # DEFAULT PERM FAILED OR ANONYMOUS ACCESS IS DISABLED SO WE
135 # DEFAULT PERM FAILED OR ANONYMOUS ACCESS IS DISABLED SO WE
134 # NEED TO AUTHENTICATE AND ASK FOR AUTH USER PERMISSIONS
136 # NEED TO AUTHENTICATE AND ASK FOR AUTH USER PERMISSIONS
135 #==============================================================
137 #==============================================================
136
138
137 # Attempting to retrieve username from the container
139 # Attempting to retrieve username from the container
138 username = get_container_username(environ, self.config)
140 username = get_container_username(environ, self.config)
139
141
140 # If not authenticated by the container, running basic auth
142 # If not authenticated by the container, running basic auth
141 if not username:
143 if not username:
142 self.authenticate.realm = \
144 self.authenticate.realm = \
143 safe_str(self.config['rhodecode_realm'])
145 safe_str(self.config['rhodecode_realm'])
144 result = self.authenticate(environ)
146 result = self.authenticate(environ)
145 if isinstance(result, str):
147 if isinstance(result, str):
146 AUTH_TYPE.update(environ, 'basic')
148 AUTH_TYPE.update(environ, 'basic')
147 REMOTE_USER.update(environ, result)
149 REMOTE_USER.update(environ, result)
148 username = result
150 username = result
149 else:
151 else:
150 return result.wsgi_application(environ, start_response)
152 return result.wsgi_application(environ, start_response)
151
153
152 #==============================================================
154 #==============================================================
153 # CHECK PERMISSIONS FOR THIS REQUEST USING GIVEN USERNAME
155 # CHECK PERMISSIONS FOR THIS REQUEST USING GIVEN USERNAME
154 #==============================================================
156 #==============================================================
155 if action in ['pull', 'push']:
157 if action in ['pull', 'push']:
156 try:
158 try:
157 user = self.__get_user(username)
159 user = self.__get_user(username)
158 if user is None or not user.active:
160 if user is None or not user.active:
159 return HTTPForbidden()(environ, start_response)
161 return HTTPForbidden()(environ, start_response)
160 username = user.username
162 username = user.username
161 except:
163 except:
162 log.error(traceback.format_exc())
164 log.error(traceback.format_exc())
163 return HTTPInternalServerError()(environ,
165 return HTTPInternalServerError()(environ,
164 start_response)
166 start_response)
165
167
166 #check permissions for this repository
168 #check permissions for this repository
167 perm = self._check_permission(action, user,
169 perm = self._check_permission(action, user,
168 repo_name)
170 repo_name)
169 if perm is not True:
171 if perm is not True:
170 return HTTPForbidden()(environ, start_response)
172 return HTTPForbidden()(environ, start_response)
171
173
172 #===================================================================
174 #===================================================================
173 # GIT REQUEST HANDLING
175 # GIT REQUEST HANDLING
174 #===================================================================
176 #===================================================================
175
177
176 repo_path = safe_str(os.path.join(self.basepath, repo_name))
178 repo_path = safe_str(os.path.join(self.basepath, repo_name))
177 log.debug('Repository path is %s' % repo_path)
179 log.debug('Repository path is %s' % repo_path)
178
180
179 # quick check if that dir exists...
181 # quick check if that dir exists...
180 if is_valid_repo(repo_name, self.basepath) is False:
182 if is_valid_repo(repo_name, self.basepath) is False:
181 return HTTPNotFound()(environ, start_response)
183 return HTTPNotFound()(environ, start_response)
182
184
183 try:
185 try:
184 #invalidate cache on push
186 #invalidate cache on push
185 if action == 'push':
187 if action == 'push':
186 self._invalidate_cache(repo_name)
188 self._invalidate_cache(repo_name)
187 log.info('%s action on GIT repo "%s"' % (action, repo_name))
189 log.info('%s action on GIT repo "%s"' % (action, repo_name))
188 app = self.__make_app(repo_name, repo_path)
190 app = self.__make_app(repo_name, repo_path)
189 return app(environ, start_response)
191 return app(environ, start_response)
190 except Exception:
192 except Exception:
191 log.error(traceback.format_exc())
193 log.error(traceback.format_exc())
192 return HTTPInternalServerError()(environ, start_response)
194 return HTTPInternalServerError()(environ, start_response)
193
195
194 def __make_app(self, repo_name, repo_path):
196 def __make_app(self, repo_name, repo_path):
195 """
197 """
196 Make an wsgi application using dulserver
198 Make an wsgi application using dulserver
197
199
198 :param repo_name: name of the repository
200 :param repo_name: name of the repository
199 :param repo_path: full path to the repository
201 :param repo_path: full path to the repository
200 """
202 """
201
203
202 _d = {'/' + repo_name: Repo(repo_path)}
204 _d = {'/' + repo_name: Repo(repo_path)}
203 backend = dulserver.DictBackend(_d)
205 backend = dulserver.DictBackend(_d)
204 gitserve = HTTPGitApplication(backend)
206 gitserve = HTTPGitApplication(backend)
205
207
206 return gitserve
208 return gitserve
207
209
208 def __get_repository(self, environ):
210 def __get_repository(self, environ):
209 """
211 """
210 Get's repository name out of PATH_INFO header
212 Get's repository name out of PATH_INFO header
211
213
212 :param environ: environ where PATH_INFO is stored
214 :param environ: environ where PATH_INFO is stored
213 """
215 """
214 try:
216 try:
215 environ['PATH_INFO'] = self._get_by_id(environ['PATH_INFO'])
217 environ['PATH_INFO'] = self._get_by_id(environ['PATH_INFO'])
216 repo_name = '/'.join(environ['PATH_INFO'].split('/')[1:])
218 repo_name = '/'.join(environ['PATH_INFO'].split('/')[1:])
217 repo_name = GIT_PROTO_PAT.split(repo_name)
219 repo_name = GIT_PROTO_PAT.split(repo_name)
218 if repo_name:
220 if repo_name:
219 repo_name = repo_name[0]
221 repo_name = repo_name[0]
220
222
221 if repo_name.endswith('/'):
223 if repo_name.endswith('/'):
222 repo_name = repo_name.rstrip('/')
224 repo_name = repo_name.rstrip('/')
223 except:
225 except:
224 log.error(traceback.format_exc())
226 log.error(traceback.format_exc())
225 raise
227 raise
226
228
227 return repo_name
229 return repo_name
228
230
229 def __get_user(self, username):
231 def __get_user(self, username):
230 return User.get_by_username(username)
232 return User.get_by_username(username)
231
233
232 def __get_action(self, environ):
234 def __get_action(self, environ):
233 """Maps git request commands into a pull or push command.
235 """
236 Maps git request commands into a pull or push command.
234
237
235 :param environ:
238 :param environ:
236 """
239 """
237 service = environ['QUERY_STRING'].split('=')
240 service = environ['QUERY_STRING'].split('=')
238 if len(service) > 1:
241 if len(service) > 1:
239 service_cmd = service[1]
242 service_cmd = service[1]
240 mapping = {'git-receive-pack': 'push',
243 mapping = {
244 'git-receive-pack': 'push',
241 'git-upload-pack': 'pull',
245 'git-upload-pack': 'pull',
242 }
246 }
243
247
244 return mapping.get(service_cmd,
248 return mapping.get(service_cmd,
245 service_cmd if service_cmd else 'other')
249 service_cmd if service_cmd else 'other')
246 else:
250 else:
247 return 'other'
251 return 'other'
General Comments 0
You need to be logged in to leave comments. Login now