eclipse 如何恢复颠覆忽略?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/14658662/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 19:56:10  来源:igfitidea点击:

How to revert a subversion ignore?

linuxeclipsesvnversion-control

提问by Click Upvote

I've run the following command via commandline:

我已经通过命令行运行了以下命令:

svn propset svn:ignore "*.classpath" .

I wanted to only ignore the .classpathfile.

我只想忽略该.classpath文件。

However, this seems to have messed things up and now a lot of directories seem to be ignored.

然而,这似乎把事情搞砸了,现在很多目录似乎都被忽略了。

How do I revert this and start over?

我该如何还原并重新开始?

采纳答案by Lazy Badger

Note

笔记

For this svn:ignore you effectively said "ignore in the currect directory only files with extension classpath": patterns for filenames in Subversion uses only OS-specific glob-pattern, not regexps

对于这个 svn:ignore 你有效地说“在当前目录中仅忽略具有扩展类路径的文件”:Subversion 中的文件名模式仅使用特定于操作系统的全局模式,而不是正则表达式

Fixes for syntax of DaFunix

修复 DaFunix 的语法

  • List all svn-properties and their valuesin somepath: svn proplist -v <PATH>|<URL>. For your case

    svn proplist -v .

  • 列出所有SVN的属性和它们的值somepathsvn proplist -v <PATH>|<URL>。对于您的情况

    svn proplist -v 。

Sample output for my URL

我的 URL 的示例输出

>svn proplist -v http://mayorat.ursinecorner.ru:8088/svn/Hello/trunk/
Properties on 'http://mayorat.ursinecorner.ru:8088/svn/Hello/trunk':
  bugtraq:logregex
    ([Ff][Ss])\s#
    (\d+)
  svn:mergeinfo
    /branches/Greetings:3-12
    /branches/i18n:18-20
  • List single svn:property value(with known name): svn propget <PROPERTY> <PATH>|<URL>. For your case

    svn propget svn:ignore .

  • 列出单一的svn:属性值(已知姓名): svn propget <PROPERTY> <PATH>|<URL>。对于您的情况

    svn propget svn:ignore 。

Sample output for my URL (same as before for proplist)

我的 URL 的示例输出(与之前的 proplist 相同)

>svn propget bugtraq:logregex http://mayorat.ursinecorner.ru:8088/svn/Hello/trunk/
([Ff][Ss])\s#
(\d+)

Both proplist and propget operations are RO, will change nothing

proplist 和 propget 操作都是 RO,不会改变什么

In order to fix bad definition of property you can

为了修复属性的错误定义,您可以

or

或者

Delete bad property and re-create it in correct form:

删除坏属性并以正确的形式重新创建它:

svn propdel svn:ignore . & svn propset svn:ignore "classpath" .(maybe use propset with -R option to define ignore resursively for the whole subtree)

svn propdel svn:ignore . & svn propset svn:ignore "classpath" .(也许使用带有 -R 选项的 propset 为整个子树递归定义忽略)

or (as suggested by John Brodie) edit and fix current definition

或(如 John Brodie 所建议的)编辑并修复当前定义

svn propedit svn:ignore .and in editor window "*.classpath" change to "classpath", save

svn propedit svn:ignore .并在编辑器窗口“*.classpath”更改为“classpath”,保存

PSDon't forget:

PS不要忘记:

  • commit correct form of added property
  • remove from versioned code previously (possibly) added classpath files: svn:ignore affect only unversioned new files, already added to repo files with current ignore-pattern must be unversioned by hand
  • 提交正确形式的附加属性
  • 从先前(可能)添加的类路径文件中删除版本化代码:svn:ignore 仅影响未版本化的新文件,已添加到具有当前忽略模式的 repo 文件必须手动取消版本化

回答by John Brodie

svn propedit svn:ignore .should bring up your editor, where you can remove the offending ignores one at a time.

svn propedit svn:ignore .应该调出您的编辑器,您可以在其中一次删除有问题的忽略项。