用户登录

Drupal资源链接

http://zhupou.cn
drupal布道者,改成了"老葛的Drupal培训班",专心于培训事业
http://drupal.org
官方网站
http://drupalchina.org
中文的官方网站
http://acquia.com/
本站就是用这个版本构建的

用patch命令来打补丁

使用drupal也有一段时间了,当看到有补丁时一向使用手工来打

--- drush_make.download.inc	2 Jun 2010 15:57:21 -0000	1.1.2.32
+++ drush_make.download.inc 4 Jun 2010 13:25:33 -0000
@@ -96,7 +96,7 @@ class DrushMakeDownload_Get extends Drus
drush_shell_exec('tar -tf %s', $filename);
$info = drush_shell_exec_output();
if ($info) {
- list($first_line) = drush_shell_exec_output();
+ $first_line = $info[count($info) - 1];
list($directory) = explode('/', $first_line);
drush_make_cd($this->project->tmp_path, 'tar -xf %s', $filename);
drush_op('unlink', $filename);

 

但有一天看到有个补丁将近8K,怎么办?特地找了一些.patch文件的使用

在windows中有几种方式可用

http://drupal.org/node/60179

1、用GnuWin32Unxutils, 或Cygwin,这些都是命令行工具

2、使用图形的工具TortoiseSVN or the IDE Eclipse.

以Gnuwin32为例来说明

下载:patch程序


使用下面的命令:

patch {file} {patch} --verbose --binary

还可以将这个命令做成批命令与右键关联,在这里有例子

这里有一个更好的东东,http://drupal.org/node/75790#comment-2615716