Drupal应用补丁
Drupal apply patch
我尝试使用 Putty 为模块打补丁
patch -p1 change_frequency_option-1811692-35.patch
但我收到错误 -bash: patch: command not found
。
这种情况下如何打补丁?
UPD
我没有机会在服务器上使用命令 patch -p1 < change_frequency_option-1811692-35.patch
,所以我尝试使用 git
应用补丁
git apply -v --directory=sites/all/modules/xmlsitemap change_frequency_option-1811692-35.patch
但在这种情况下我得到了错误
$ git apply -v --directory=sites/all/modules/xmlsitemap change_frequency_option-1811692-35.patch
正在检查补丁 sites/all/modules/xmlsitemap/xmlsitemap.admin.inc...
正在检查补丁 sites/all/modules/xmlsitemap/xmlsitemap.generate.inc...
错误:搜索时:
如果($save_custom){
$查询->条件('status_override', 0);
$查询->条件('priority_override', 0);
}
return $query->execute();
错误:补丁失败:sites/all/modules/xmlsitemap/xmlsitemap.generate.inc:545
错误:sites/all/modules/xmlsitemap/xmlsitemap.generate.inc:补丁不适用
正在检查补丁 sites/all/modules/xmlsitemap/xmlsitemap.install...
正在检查补丁 sites/all/modules/xmlsitemap/xmlsitemap.js...
正在检查补丁 sites/all/modules/xmlsitemap/xmlsitemap.module...
正在检查补丁 sites/all/modules/xmlsitemap/xmlsitemap_menu/xmlsitemap_menu.module...
正在检查补丁 sites/all/modules/xmlsitemap/xmlsitemap_node/xmlsitemap_node.module...
正在检查补丁 sites/all/modules/xmlsitemap/xmlsitemap_node/xmlsitemap_node.test...
正在检查补丁 sites/all/modules/xmlsitemap/xmlsitemap_taxonomy/xmlsitemap_taxonomy.module...
正在检查补丁 sites/all/modules/xmlsitemap/xmlsitemap_user/xmlsitemap_user.module...
检查补丁 sites/all/modules/xmlsitemap/xmlsitemap_user/xmlsitemap_user.test...
怎么了?我是不是做错了什么?
尝试安装补丁命令。如果它是 ubuntu 类似的东西:
sudo apt-get install patch
使用
git 应用-v path/file.补丁
我尝试使用 Putty 为模块打补丁
patch -p1 change_frequency_option-1811692-35.patch
但我收到错误 -bash: patch: command not found
。
这种情况下如何打补丁?
UPD
我没有机会在服务器上使用命令 patch -p1 < change_frequency_option-1811692-35.patch
,所以我尝试使用 git
应用补丁
git apply -v --directory=sites/all/modules/xmlsitemap change_frequency_option-1811692-35.patch
但在这种情况下我得到了错误
$ git apply -v --directory=sites/all/modules/xmlsitemap change_frequency_option-1811692-35.patch 正在检查补丁 sites/all/modules/xmlsitemap/xmlsitemap.admin.inc... 正在检查补丁 sites/all/modules/xmlsitemap/xmlsitemap.generate.inc... 错误:搜索时: 如果($save_custom){ $查询->条件('status_override', 0); $查询->条件('priority_override', 0); }
return $query->execute();
错误:补丁失败:sites/all/modules/xmlsitemap/xmlsitemap.generate.inc:545 错误:sites/all/modules/xmlsitemap/xmlsitemap.generate.inc:补丁不适用 正在检查补丁 sites/all/modules/xmlsitemap/xmlsitemap.install... 正在检查补丁 sites/all/modules/xmlsitemap/xmlsitemap.js... 正在检查补丁 sites/all/modules/xmlsitemap/xmlsitemap.module... 正在检查补丁 sites/all/modules/xmlsitemap/xmlsitemap_menu/xmlsitemap_menu.module... 正在检查补丁 sites/all/modules/xmlsitemap/xmlsitemap_node/xmlsitemap_node.module... 正在检查补丁 sites/all/modules/xmlsitemap/xmlsitemap_node/xmlsitemap_node.test... 正在检查补丁 sites/all/modules/xmlsitemap/xmlsitemap_taxonomy/xmlsitemap_taxonomy.module... 正在检查补丁 sites/all/modules/xmlsitemap/xmlsitemap_user/xmlsitemap_user.module... 检查补丁 sites/all/modules/xmlsitemap/xmlsitemap_user/xmlsitemap_user.test...
怎么了?我是不是做错了什么?
尝试安装补丁命令。如果它是 ubuntu 类似的东西:
sudo apt-get install patch
使用 git 应用-v path/file.补丁