Subversion (SVN) and static libraries (.a files) c

2019-01-18 23:54发布

问题:

I can't add .a files (static libraries) into my repository. Why?

Is there a way to "force" SVN to accept them (at least as static files...)?

回答1:

The svn:ignore property contains a list of file patterns which certain Subversion operations will ignore.

Also do you have a configuration file that global-ignores. It is a list of whitespace-delimited globs which describe the names of files and directories

The svn status, svn add, and svn import commands also ignore files that match the list.

To override for a certain instance, use the --no-ignore command-line flag:

>>>>svn help add
usage: add PATH...

Valid options:
  --targets ARG            : pass contents of file ARG as additional args
  -N [--non-recursive]     : obsolete; try --depth=files or --depth=immediates
  --depth ARG              : limit operation by depth ARG ('empty', 'files',
                            'immediates', or 'infinity')
  -q [--quiet]             : print nothing, or only summary information
  --force                  : force operation to run
  --no-ignore              : disregard default and svn:ignore property ignores
  --auto-props             : enable automatic properties
  --no-auto-props          : disable automatic properties


回答2:

Make sure your issue is caused by the SVN ignore configuration. With `svn status' your '*.a' file will be missing, while 'svn status --no-ignore' shall display it with a question mark in front.

Open the Subversion configuration file in your home directory:

~/.subversion/config

Search for the 'global-ignores' section:

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

Remove *.a from the list of ignored files.