获取当前和先前修订号的 svn diff 命令 [英] Command to get svn diff of current and previous revision number

查看:27
本文介绍了获取当前和先前修订号的 svn diff 命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何通过命令行获取当前和以前版本号的文件内容差异?

How can I get diff in file content of current and previous revision number by command line?

我怎样才能获得以前的修订号?

And how can I get previous revision number?

推荐答案

根据您的评论,您希望查看不在您的工作副本中的项目的当前版本和先前版本之间的差异.为此,您需要知道项目的 URL(例如 svn://[repo_root]/[path]/[item]),我假设您知道.然后执行以下操作:

As per your comments you'd like to see differences between the current and previous versions of an item that is not in your working copy. For that you need to know the item's URL (e.g. svn://[repo_root]/[path]/[item]) which I assume you do. Then you do the following:

svn info <item-URL>

将包含(除其他外)最后的更改修订版.使用修订号 R 运行:

will contain (among other things) the last change revision. With that revision number R you run:

svn diff -c <R> <item-URL>

它会给你最后的提交差异.

and it will give you the last commit diff.

这篇关于获取当前和先前修订号的 svn diff 命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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