如何获取SVN中文件/文件夹属性的历史记录? [英] How do you get the history of a file/folder property in SVN?

查看:252
本文介绍了如何获取SVN中文件/文件夹属性的历史记录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

确定何时在文件或文件夹上设置属性的最简单方法是什么?基本上,我正在寻找对属性有效的"svn责备".

What's the easiest way to determine when a property was set on a file or folder? Basically, I'm looking for an equivalent of "svn blame" that works on properties.

log子命令使您能够获取文件或文件夹的完整历史记录,包括修改属性的时间.但是,它不能区分属性修改和其他类型的修改,这当然也意味着它不会告诉您任何有关特定属性的历史记录.

The log subcommand enables one to get the complete history of a file or folder, including when the properties have been modified. However, it doesn't distinguish between a property modification and other types of modification, which of course also means that it won't tell you anything about the history of a particular property.

status命令区分属性和其他类型的修改,但仅适用于工作副本.

The status command differentiates between properties and other types of modifications, but only works on the working copy.

Blame本身仅支持文件,不支持目录,并且仅适用于内容,而不适用于属性.

Blame, itself, only supports files, not directories, and it works on the content, not the properties.

想法?

推荐答案

我能想到的最好的办法是编写一个小脚本或应用程序,该脚本或应用程序使用svn propget命令将当前属性值转储到文本文件中,然后向后浏览修订版,将属性转储到另一个文本文件并比较两者.一旦检测到更改,它将打印修订版本号(实际上是进行更改的最新修订版本号)以及提交更改的用户.

The best I can think of is to write a little script or app that uses the svn propget command to dump the current property value to a text file, and then walks back through the revisions dumping the property to another text file and comparing the two. As soon as it detects a change, it prints out the revision number (actually the later revision number that made the change) along with the user who committed it.

这是一个示例命令,用于为修订版80的字典目录转储svn:ignore属性:

Here's an example command to dump the svn:ignore property for the dictionary directory at revision 80:

svn propget -r 80 svn:ignore dictionary

这篇关于如何获取SVN中文件/文件夹属性的历史记录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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