subversion:如何:修改后的工作副本和备用分支之间的区别?

发布于 2024-09-08 18:14:26 字数 345 浏览 5 评论 0原文

我已经尝试过了。

我的工作副本基于

svn://foo.net/svn/repo/branch/yyy

I想要与分支 xxx 进行比较的修改版本。我已经尝试过

svn diff --old=svn://foo.net/svn/repo/branch/xxx --new=. 

,但这似乎只是简写

svn diff --old=svn://foo.net/svn/repo/branch/xxx --new=svn://foo.net/svn/repo/branch/yyy

I have tried.

My working copy is based on but a modified version of

svn://foo.net/svn/repo/branch/yyy

I want to diff against branch xxx. I have tried

svn diff --old=svn://foo.net/svn/repo/branch/xxx --new=. 

but that only seems like shorthand for

svn diff --old=svn://foo.net/svn/repo/branch/xxx --new=svn://foo.net/svn/repo/branch/yyy

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(2

动听の歌 2024-09-15 18:14:26

似乎 subversion 不允许将工作副本与 url 进行比较。 --old 和 --new 都必须是 WC 或 URL。

我认为有一个解决方法 - 您可以检查您的 xxx 分支,然后比较 2 个工作副本。

svn checkout svn://foo.net/svn/repo/branch/xxx xxx_branch

svn diff xxx_branch yyy_modified_wc

diff -u xxx_branch yyy_modified_wc

编辑 正如 Pavel 注意到的 svn diff 这种形式不比较 xxx 和 yyy - 它只显示 xxx 和 的本地修改yyy。 svn diff --old=xxx --new=yyy 似乎不允许(至少在 svn 客户端 1.6.17 中)。要比较 xxx 和 yyy,需要 diff 命令。 Pavel,10x 通知

Seems that subversion doesn't allow to compare working copy with url. Both --old and --new need to be either WC or URL.

I think there's a workaround though - you may checkout your xxx branch and then compare 2 working copies.

svn checkout svn://foo.net/svn/repo/branch/xxx xxx_branch

svn diff xxx_branch yyy_modified_wc

diff -u xxx_branch yyy_modified_wc

Edit As Pavel noticed svn diff in this form doesn't compare xxx and yyy - it just shows local modifications of xxx and yyy. svn diff --old=xxx --new=yyy seems not allowed (at least in svn client 1.6.17). To compare xxx and yyy diff command is needed. Pavel, 10x for the notice

晚雾 2024-09-15 18:14:26

您还可以比较两个网址:速度更快,因为您不必签出另一个分支。

svn info # grap url
svn diff localUrl distantUrl

You can also compare between two urls : it's faster because you don't have to checkout the other branch.

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