[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Problem committing project with Xcode

From: Ryan Schmidt <subversion-2007b_at_ryandesign.com>
Date: Mon, 14 Jan 2008 14:10:55 -0600

On Jan 14, 2008, at 08:06, zauhar wrote:

> If I do the commit manually, it looks like this:
>
> [cabriolet:~/SVN/bemSolver08/trunk] zauhar% svn commit -m "This is
> a test commit - no substantive changes"
> svn: Commit failed (details follow):
> svn: Directory '/Users/zauhar/SVN/bemSolver08/trunk/build/
> bemSolver08.build/bemSolver08.pbxindex/strings.pbxstrings/.svn'
> containing working copy admin area is missing
>
> If I do a non-recursive commit:
>
> [cabriolet:~/SVN/bemSolver08/trunk] zauhar% svn commit -m "This is
> a test commit - no substantive changes" -N
>
> there is no error!
>
> So, the issue seems to be an attempt to commit something from the
> 'build' subdirectory. I had already seen warnings in online FAQs
> about including the Xcode build directory in version control,

Yes, you should not have the build directory under version control.

> and included the
> following in the file ~/.subversion/config :
>
> global-ignores = build *.mode1 *.pbxuser *~.nib .DS_Store *~
>
> (I forget who I copied this from.) Apparently, this should cause
> svn to ignore anything in the build directory. Why does this not
> work? Is there something else I need to do?

The "ignore" features in Subversion only ignore things that have no
yet been added to the repository. The build directory is already
added to the repository, therefore "ignore" has no effect.

You should remove the build directory from version control. If you
care about its contents (warning: untested!):

cd /Users/zauhar/SVN/bemSolver08/trunk
cp -R build build-real
svn rm build
svn ci build -m "removing build directory from version control"
mv build-real build

Then you should delete all the now-unnecessary and confusing .svn
directories that might still be left in the build directory.Something
like this (warning: untested!):

find build -name .svn -type d -print0 | xargs -0 rm -rf

If you don't care about the contents of the build directory, you can
skip the above and just:

svn rm build
svn ci build -m "removing build directory from version control"

You should probably also add "build" to the svn:ignores of the trunk
directory

svn propedit svn:ignores .

and add "build" on a new line when your editor pops up. Save it and
close. Then commit.

You can now remove "build" from global-ignores. (It probably doesn't
belong there; who's to say that some other project you're working on
doesn't have a file or directory called "build" that you actually do
want in version control?)

The above is one solution, which involves the build directory not
being under version control. The other option is that you do want the
build directory under version control, but none of its contents. In
this case, you would not add "build" to the svn:ignores property of
the trunk directory; instead you would add "*" to the svn:ignores
property of the build directory.

You would also still need to remove the contents of the build
directory from the repository. If you don't care about the contents
of the build directory:

cd build
svn rm *
svn propset svn:ignores '*' .
svn ci -m "removing contents of build directory"

If you do care about the contents, you will have to do the song and
dance routine as above to copy each item in the build directory to a
new temporary name, then "svn rm" the original item. Do this for all
items, then commit. Then move the temporary copies back to their real
names.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-01-14 21:12:15 CET

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.