If you can't read please download the document
Upload
drumm
View
5.362
Download
2
Embed Size (px)
Citation preview
How to maintain your own
branch of Drupal core
Neil Drumm
5.x branch maintainer
I am not actually going to tell you about branching Drupal. Do not do that.
This is about Drupal 5.x.
Neil has quite a knack for detecting attempts to get cruft into Drupal.
Neil has been the co-founder and maintainer of CivicSpace, the first Drupal distribution.
Dries Buytaert
http://buytaert.net/neil-drumm
One rule:
Do not commit features
from coworkers
Patch reviews
Collected 16/Sep/2007
Commits per week
Top reviewers 318 total
Collected 16/Sep/2007
Number of issues changed from needs review or ready to commit
Top patch writers 830 total
Collected 16/Sep/2007
Number of issues posting an attachment follow up
How to review a patch
Code style
if (arg(0) == 'node' && arg(1) == 'add' && $type = arg(2)) { $type = node_get_types('type', str_replace('-', '_', arg(2)));- return ''. filter_xss_admin($type->help) .'';+ + if ($help = filter_xss_admin($type->help)) {+ return ''. $help .'';+ } } }
http://drupal.org/node/112140
Functionality
+ if ($return_path && !ini_get('safe_mode')) {
+ return mail(
+ $to,
+ mime_header_encode($subject),
+ str_replace("\r", '', $body),
+ join("\n", $mimeheaders),
+ '-f'. $return_path
+ );
+ }
http://drupal.org/node/131737
Usability
// Output a list of queries executed
if (!empty($_SESSION['update_results'])) {
$output .= '';
- $output .= 'The following queries were executed';
+ $output .= 'The following status messages were returned';
foreach ($_SESSION['update_results'] as $module => $updates) {
$output .= ''. $module .' module';
http://drupal.org/node/167610
Scalability
$sql = 'SELECT DISTINCT u.uid, u.name, u.status, u.created, u.access FROM {users} u LEFT JOIN {users_roles} ur ON u.uid = ur.uid '. $filter['join'] .' WHERE u.uid != 0 '. $filter['where']; $sql .= tablesort_sql($header);- $result = pager_query($sql, 50, 0, NULL, $filter['args']);+ $count_sql = 'SELECT COUNT(DISTINCT(u.uid)) FROM {users} u LEFT JOIN {users_roles} ur ON u.uid = ur.uid '. $filter['join'] .' WHERE u.uid != 0 '. $filter['where'];+ $count_sql .= tablesort_sql($header);+ + $result = pager_query($sql, 50, 0, $count_sql, $filter['args']); $form['options'] = array( '#type' => 'fieldset',
http://drupal.org/node/137754
Security
$session_name = $cookie_domain; } else {+ // If the site is using session.cookie_secure, use $base_url as+ // session name.+ if (ini_get('session.cookie_secure')) {+ $session_name = $base_url;+ } // Otherwise use $base_url as session name, without the protocol // to use the same session identifiers across http and https.- list( , $session_name) = explode('://', $base_url, 2);+ else {+ list( , $session_name) = explode('://', $base_url, 2);+ } // We try to set the cookie domain to the hostname. // We escape the hostname because it can be modified by a visitor. if (!empty($_SERVER['HTTP_HOST'])) {
http://drupal.org/node/170310
How to review a patch
Code styleIs it readable?
FunctionalityDoes it work?
UsabilityDoes it make sense?
ScalabilityWill it scale?
SecurityIs it secure?
More at http://drupal.org/patch/review
Releases
5.0
5.1
5.2
What I learned
It is impossible to fix everything
There will be another release
Someone will find the right solution for every issue
DriesFixedNeeds workOther
Needs Review48318784
Ready to commit99428765
Steven213other
Needs review1726952
Ready to commit1325928
Gabor213other
Needs review705435
Ready to commit1614749
driesdrummkillesgobaunconed
20063800014
710008
9700016
680006
330006
3500021
170001
710003
46226011
2728014
1028026
003200
035207
0725048
1156043
2321804
9827013
17662400
220900
25121300
14153600
1802600
330000
107500
55400
105102
42282400
13621203
218809
816501
662010017
7220500
75636060
5252802
156601041
4541702
312503
84100
72900
5554015
230308
20134002
4141039
5102067
1830002
14261402
121376013
164824015
550909
33013067
314902
2529006
171252012
20072452034
201010
830502
5913800
144005
584000
2551012
256200
370108
02008
6582038
3590012
1011001
4919121
706050
7030191
3160142
680050
8911070
82524819
11940270
3280121
20202249
2421637
10602530
30150141
4480150
34269182
590040
2441730
2910170
3800290
4200920
4800530
5721070
02080
drumm213other
Needs review134349119
Ready to commit29414462
killes213other
Needs review8772131
Ready to commit1892723
Reviews
Dries1698
drumm888
chx573
killes469
Steven453
moshe weitzman326
Gabor Hojtsy321
webchick299
ChrisKennedy115
m3avrck113
Zen110
pwolanin105
RobRoy105
dmitrig0177
dww77
beginner76
Eaton71
Crell65
bdragon64
Jaza60
Reviews
chx481
killes194
webchick172
pwolanin127
Steven120
moshe weitzman111
Zen103
drumm101
ChrisKennedy98
m3avrck95
Ber Kessels90
Gabor Hojtsy78
dww78
RobRoy73
asimmonds71
Wesley Tanaka70
Eaton68
Morbus Iff67
kkaefer65
Cvbge63