svn 命令行相当于“git log -p”?
使用 svn 命令行工具是否有相当于 git log -p 的工具? svn log -v
显示文件名但不显示更改。
我想查看之前提交引入的补丁。如果不可能,是否有办法获取由单个先前提交引入的补丁(不与头进行比较,仅与变更集进行比较)?
Is there an equivalent of git log -p
using the svn command line tool? svn log -v
shows file names but not changes.
I would like to see the patches introduced by prior commits. If not possible, is there a way to get the patch (not compared to head, just the changeset) introduced by a single previous commit?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
svn log --diff
相当于git log -p
。对于单个修订版,您可以使用 svn diff -c,在 git 中将是
git show
。svn log --diff
is the equivalent ofgit log -p
.For a single revision you can use
svn diff -c <revision>
which in git would begit show <revision>
.没有完全匹配;因为,git 处理文件,而 svn 处理文件系统。然而,也有一些势均力敌的比赛。
svn diff
完成了git log -p
的大部分工作。 其他人已经写过了关于如何使用 svn 命令制作和应用补丁的很好的教程。我想你可能会发现它很有用。请注意,虽然本教程针对上次签出的版本制作了本地更改的补丁文件,但您还可以使用
-r 4:7
选项构建修订版 4 和 7 之间所有更改的补丁。用于识别特定修订的svn log
和svn diff
的某种组合可能会给你你想要的。There's not an exact match; because, git deals with files while svn deals with filesystems. However, there are close matches.
svn diff
does most of whatgit log -p
does. Someone else has already written up a nice tutorial on how to make and apply patches using svn commands. I think you might find it useful.Note that while the tutorial makes a patch file of local changes against the last checked out version, you can also use the
-r 4:7
options to construct a patch of all changes between revisions 4 and 7. Some combination ofsvn log
to identify the specific revisions andsvn diff
probably will give you exactly what you want.