Subversion diff --summaryize仅显示旧路径 [英] Subversion diff --summarize only shows old paths

查看:158
本文介绍了Subversion diff --summaryize仅显示旧路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我这样做:

svn diff
   --summarize
   --old http.../svn/project/trunk
   --new http.../svn/project/branches/branch

我得到这样的列表:

D      http.../svn/project/trunk/deletedFile
A      http.../svn/project/trunk/addedFile
M      http.../svn/project/trunk/modifiedFile

它仅显示旧路径。有没有办法获得新途径?我正在解析此输出,我想获取以下路径:

It only shows the old paths. Is there a way to get the new paths as well? I'm parsing this output, and I'd like to get these paths:

http.../svn/project/branches/branch/deletedFile
http.../svn/project/branches/branch/addedFile
http.../svn/project/branches/branch/modifiedFile


推荐答案

您正在比较主干和分支的HEAD,本质上是在询问主干需要做什么使其与分支相同?,所以答案就在于对主干的更改。如果您交换旧文件和新文件,就分支而言,您将获得相同的文件列表,但操作相反。

You are comparing the HEAD of trunk and the branch, essentially asking "what needs to happen to trunk to make it the same as branch?", so the answer is in terms of changes to trunk. If you swap old and new, you will get the same list of files, in terms of the branch, but with the opposite operation.

如果在分支而不是主干,然后运行现有的差异(旧=中继,新=分支),您会看到:

If a file was added in the branch and not trunk, and you run your existing diff (old=trunk, new=branch) you see:

A    http:.../project/trunk/file

如果您将新旧交换(新=分支,旧= trunk),您将得到:

If you swap old and new (new=branch, old=trunk), you'll get:

D    http:.../project/branches/branch/file

这篇关于Subversion diff --summaryize仅显示旧路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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