如何使用 svn export 应用补丁? [英] How to apply a patch using svn export?

查看:38
本文介绍了如何使用 svn export 应用补丁?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用 svn 将补丁从一个版本的 Joomla 应用到另一个版本.我正在使用安装了 Versions 的 mac,但不介意在命令行上使用 svn.到目前为止,我已经弄清楚如何生成从一个修订版更改为另一个修订版的文件列表,但我想将这些更改的文件导出到我的工作目录.怎么做呢?我是否需要保存 diff 输出并使用 awk 处理它,或者是否有命令行选项可以将这些文件通过管道传输到导出命令中?

I'd like to use svn to apply a patch from one version of Joomla to another. I'm using a mac with Versions installed, but don't mind using svn on the command line. So far, I've figured out how to generate the list of files that changed from one revision to the other, but I want to export those changed files to my working directory. How does one go about doing that? Do I need to save the diff output and process it using awk, or is there a command line option to pipe those files into an export command?

我使用的 diff 命令是:svn diff http://joomlacode.org/svn/joomla/development/releases/1.5@11255 http://joomlacode.org/svn/joomla/development/releases/1.5@11410 --summarize

The diff command I'm using is: svn diff http://joomlacode.org/svn/joomla/development/releases/1.5@11255 http://joomlacode.org/svn/joomla/development/releases/1.5@11410 --summarize

推荐答案

用于创建补丁使用:

svn diff > ~/patch.diff

应用补丁使用:

patch -p0 -i ~/patch.diff

这篇关于如何使用 svn export 应用补丁?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆