如何只还原SVN工作副本中的目录? [英] How do you revert ONLY directories in an SVN working copy?

查看:88
本文介绍了如何只还原SVN工作副本中的目录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想还原SVN工作副本中的目录和所有子目录,以便它们与存储库匹配,但我不想触摸其中的任何文件目录。

I want to revert a directory and all sub-directories in an SVN working copy so they match the repository but I don't want to touch any files inside those directories.

我的一个SVN应用程序在我的工作副本中的每个目录上递归设置了SVN属性,但我想还原这些更改以使其不再突出显示并尝试提交SVN属性的更改。只是简单地将其更改为与HEAD相匹配就不会起作用。

One of my SVN applications recursively set an SVN property on every directory in my working copy but I want to revert those changes to stop it highlighting them and trying to commit the changes to the SVN properties. Simply changing it to match the HEAD doesn't work.

有什么想法吗?我已经阅读了各种SVN资源,但似乎没有一个能处理这种情况。

Any ideas? I've read through various SVN resources but none of them seem to deal with this edge case.

推荐答案

您可以使用查找结合 svn还原

find . -type d | grep -v .svn | xargs svn revert

除非您使用<$ c $,否则不会触摸目录中的任何文件c> -R 选项(相当于-depth = infinity )。

This won't touch any files inside the directories unless you use the -Roption (which is equivalent of --depth=infinity).

这篇关于如何只还原SVN工作副本中的目录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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