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