是否可以关闭“svn导出”的关键字替换?
我想使用 svn export 从 Subversion 存储库中导出一堆文件。而且我还希望放弃对这些文件中找到的任何关键字的关键字扩展,无论此文件上的 svn:keywords 属性如何。有办法做到这一点吗?
我这样做是因为我想将存储库中的文件与一组不在存储库中且具有未扩展关键字的相同文件进行比较。很久很久以前,我在 CVS 中有一个存储库。很久以前,我进行了一次向 Subversion 的国旗日转换。现在,我正在尝试将整个历史记录转换为 Mercurial,并且我想使用 diff 来准确识别 Subversion 中的哪个版本与 CVS 中的最后一个版本最接近,而不必费力地处理扩展的关键字差异。
I would like to use svn export
to export a bunch of files out of a Subversion repository. And I also wish to forgo keyword expansion on any of the keywords found in these files regardless of the svn:keywords
property on this file. Is there a way to do this?
I'm doing this because I want to compare the files in the repository against a set of those same files that are not in the repository and have unexpanded keywords. A long long time ago I had a repository in CVS. A long time ago I did a flag day conversion to Subversion. Now I'm trying to convert the whole history to Mercurial and I want to identify exactly which version in Subversion corresponds most closely to the last version in CVS using diff without having to wade through expanded keyword differences.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
它已在 SVN 1.7(2011-10-11 发布)中作为
--ignore-keywords
选项实现到
svn导出
:http://svn. haxx.se/users/archive-2010-09/0187.shtml
It has been implemented in SVN 1.7 (released 2011-10-11) as a
--ignore-keywords
optionto
svn export
:http://svn.haxx.se/users/archive-2010-09/0187.shtml
恐怕不是。您必须设置您的 diff 工具以忽略这些差异。
I'm afraid not. You'll have to set up your diff tool to ignore those differences.
您可以使用 Git 来完成此任务。
该命令完成后,您唯一拥有的额外内容是 svn export 不会拥有的顶级目录中的 .git 目录。删除该目录,您将获得与关闭关键字的 svn export 等效的内容。
You can use Git to accomplish this.
Once that command is complete, the only thing you have extra that you wouldn't have with svn export is a .git directory in the top level directory. Remove that directory and you'll have an equivalent to svn export with keywords off.