svn 命令行相当于“git log -p”?

发布于 2024-12-07 08:27:55 字数 146 浏览 0 评论 0原文

使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

GRAY°灰色天空 2024-12-14 08:27:55

svn log --diff 相当于 git log -p

对于单个修订版,您可以使用 svn diff -c,在 git 中将是 git show

svn log --diff is the equivalent of git log -p.

For a single revision you can use svn diff -c <revision> which in git would be git show <revision>.

空气里的味道 2024-12-14 08:27:55

没有完全匹配;因为,git 处理文件,而 svn 处理文件系统。然而,也有一些势均力敌的比赛。

svn diff 完成了 git log -p 的大部分工作。 其他人已经写过了关于如何使用 svn 命令制作和应用补丁的很好的教程。我想你可能会发现它很有用。

请注意,虽然本教程针对上次签出的版本制作了本地更改的补丁文件,但您还可以使用 -r 4:7 选项构建修订版 4 和 7 之间所有更改的补丁。用于识别特定修订的 svn logsvn 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 what git 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 of svn log to identify the specific revisions and svn diff probably will give you exactly what you want.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文