måndag 12 maj 2008

Messing with SVN

I have started using SVN to track some of my packages. It's really
nice, I can definetely recomend it. However, as a newbee it's easy to
screw things up, and I did. My directory that I'm tracking is a source
directory to a project I'm working on where I use GNU autotools to
handle the compilation and such. This is all really nice, but a lite
tricky. Anyway, when a stated I used autoscan to create the stuff I
need. What I didn't discover was that autoscan actually didn't create
the required files INSTALL and COPYING, but rather linked to these files
which were stored somewhere in /usr/share. I wanted the files to be in
the code directory so I, stupid stupid me, did
rm INSTALL COPYING; touch INSTALL COPYING
The made svn freak out with (to me) unexplainable errors like
svn: 'COPYING' is in the way of the resource actually under version control
and
svn: Commit failed (details follow):
svn: Entry '/home/ravn/Work/eig/INSTALL' has unexpectedly changed special status

To solve this: remove the files with svn:
svn rm COPYING --force
--force have to be used since there is something wrong. After removing, commit:
svn commit -m "FINALLY"
When this is done, the files can be added again, this time with svn:
touch INSTALL
COPYING; svn add INSTALL COPYING; svn commit -m "Yes!"

That's it folks, easy as that ;-)