svn propget svn:ignore . returns nothing, but svn is obviously ignoring my files

时光总嘲笑我的痴心妄想 提交于 2019-12-13 13:01:20

问题


I'm trying to add an existing iPhone project to a subversion account on unfuddle.com.

Everything seems smooth except for some .a files which are ignored. I know they are ignored because I don't see them in svn status unless I use the --no-ignore flag.

When I run

  svn propget svn:ignore .

I get no output. To make sure I wasn't crazy I ran

  svn propget --xml svn:ignore .

and get this

<?xml version="1.0"?>
<properties>
</properties>

Which means there are no entries in the ignore property?

How do I find where this ignore is coming from?


回答1:


New day. Clear head.

Thanks for the help, it certainly lead me in the right direction.

The answer is there is a default global-ignore list that is built into subversion itself, not the config files, which was where the *.a ignore was coming from.

The global ignores in my config file looked like this:

 #global-ignores = *.o *.lo *.la *.al .libs *.so *.so.[0-9]* *.a *.pyc *.pyo
 # *.rej *~ #*# .#* .*.swp .DS_Store

I figured this was fine, because I didn't want to ignore anything. I was wrong because then subversion enforces its scarcely documented default global-ignores. I changed it to this, note the exclusion of '*.a'

 global-ignores = *.o *.lo *.la *.al .libs *.so *.so.[0-9]* *.pyc *.pyo
  *.rej *~ #*# .#* .*.swp .DS_Store

At this point *.a files are no longer ignores, and my .DS_Store file is still ignored, and all is right in my world.

As GraemeF suggested, propget does not retrieve global values for svn:ignore. As Ether suggested, you can add ignored files by naming them explicitly.

The best link I found was here: http://svn.haxx.se/users/archive-2009-02/0725.shtml

This post says to me that there is a non-empty default value for global-ignores that is used if global-ignores is not set in the config file.




回答2:


You can explicitly add the file via svn add <filename> if it isn't getting picked up automatically.

Subversion config files can have files ignored ("global-ignores") -- these are usually in ~/.subversion/config and /etc/subversion/config, but there are other locations as well; see http://svnbook.red-bean.com/en/1.4/svn.advanced.confarea.html.

What command were you using to add the files? If it was svn add *, could it be as simple as the file starting with a .?




回答3:


You can also have globally ignored patterns defined in your Subversion configuration file, so maybe *.a is ignored there. See the Config section of the Subversion book.



来源:https://stackoverflow.com/questions/2125303/svn-propget-svnignore-returns-nothing-but-svn-is-obviously-ignoring-my-files

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!