SVN won't import *.a library
Asked Answered
B

6

27

I've got a compiled static library (with an "a" extension) I want to include in my SVN repository but adding it never works (no problems adding other types of items). If I change the extension (e.g., "library.a" --> "library.b"), the add works. Why is the "a" extension failing? Is there a way around this without renaming the file?

Blatherskite answered 6/3, 2010 at 22:48 Comment(3)
What does "svn status --no-ignore" tell you ? Does it see the *.a files ?Pooley
The I in front means the file is being ignored. Since the global is not ignoring you have a local ignore. do "svn propedit svn:ignore"Pooley
This was also discussed here: #2125803Wilheminawilhide
P
57

Have you checked your global ignore settings. On linux they are stored in ~/.subversion/config

The default on my machine is :

global-ignores = *.o *.lo *.la *.al .libs *.so *.so.[0-9]* *.a *.pyc *.pyo

so it ignores *.a files

more info here

You should be able to add the file with

svn add "file" --no-ignore

to bypass any ignore rule set.

If the command:

svn status --no-ignore

returns with I in front you have a local Ignore. Run:

svn propedit svn:ignore
Pooley answered 6/3, 2010 at 22:51 Comment(4)
Thanks for this. I'm on Mac OS X and in my ~/.subversion/config file, the global-ignores is set to the default: global-ignores = *.o *.lo *.la #*# .*.rej *.rej .*~ *~ .#* .DS_Store which does not include *.a.Blatherskite
I'm on OS-X (10.8.latest) and my global-ignores is commented out, which I read to mean "no global-ignores." Yet, whenever I add a directory with a library .a file (example: 3rd party libs, such as Flurry), it always skips the .a file. Then my client can't build, then I go back and svn add somelib.a explicitly, then all is good. Is there a way to turn off this default "skip all the .a-s" behaviour? Thanks!Mccollum
@Mccollum You must not comment the global-ignores out! Make sure that they are not commented out but remove the *.a from the list of ignored files then it will work.Fonz
Maybe its worth to add that - in TortoiseSVN - these global ignores can be found and editied in the TortoiseSVN settings itself (rightclick -> Settings/General)Hillier
E
4

So, I suggest actually edit that ~/.subversion/config file to allow .a files again:

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

Because I have a lot of those .a files in my projects.

Ertha answered 28/7, 2015 at 10:25 Comment(1)
I had to the very same thing w/1.7. Even when commented out, SVN decided to global ignore files anyway. Violation of the principle of least surprise for sure. What am I not understanding?Mantissa
S
3

On Mac OSX (Lion) I'm using SCPlugin (http://scplugin.tigris.org/).

This adds a nice finder popup with SVN commands on it and it allows me to add *.a files when svnx or xcode don't allow it.

I suspect it's actually a bug as it's clearly ignoring the correct ignore settings (ironically), but for those who don't want to mess with terminal, it's proving handy.

EDIT: SmartSVN also allows you to see ignored files so they can be added as any normal file. Just check the 'ignored files' options under the view menu.

Sliver answered 1/5, 2012 at 15:53 Comment(0)
V
1

By the way, if you're using SVN import (i.e., not a working copy), you can override the global ignores with:

--config-option=config:miscellany:global-ignores=[new ignores]
Vichyssoise answered 3/12, 2012 at 23:28 Comment(0)
K
1

We can add library on svn:

svn add library.a --no-ignore

After add svn need to be update:

svn update

Commit changes on svn using:

svn commit -m "library.a added on svn"
Kenn answered 21/1, 2014 at 5:38 Comment(0)
C
0

I have met this question recently, this is my way:

svn import --no-ignore --force  svn://destination
Crinum answered 17/12, 2012 at 13:59 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.