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

RE: svn add "already under version control"

From: Brian Bird <brian.bird_at_securetrading.com>
Date: 2006-07-20 10:11:17 CEST

Thanks for the suggestions. I know my request is breaking the 'rules' of
svn, but I was hoping there would be a neat way to tell subversion "I'm
sorry I did it wrongly, but can you just believe that what I have now is
what I actually want".

I've ended up writing a little script to move the directories around until
subversion is happy. It's not perfect but I'm sure any of the other
solutions would work just as well.

> -----Original Message-----
> From: Gavin Lambert [mailto:gavinl@compacsort.com]
> Sent: 19 July 2006 23:54
> To: 'Brian Bird'
> Cc: users@subversion.tigris.org
> Subject: RE: svn add "already under version control"
> Quoth Brian Bird <mailto:brian.bird@securetrading.com>:
> > mkdir directory # the real directory has several files inside
> > it too svn add directory
> > svn ci
> >
> > rm -rf directory # another program removes this directory
> > mkdir directory # it then creates an entirely new directory
> > with similar files to the original directory
> >
> > svn add directory # At this point I want to ignore the fact that
> > there is an old version of directory already in the repository
> > svn: warning: 'directory' is already under version control
> Ideally, you should use svn's own tree management commands. But it
> sounds like in this case it's out of your control.
> If they really are similar, then the main thing you need to do is to
> preserve the '.svn' folder within (and all its contents). Make a backup
> copy of it immediately following your original commit. Once the folder
> has been deleted and recreated, copy the backup back in to the new
> folder, then do any necessary 'svn rm'/'svn add' etc to account for
> deleted/new files, then commit, and finally back up the .svn folder
> again for next time.
> If the folder contains subfolders, you will need to preserve all of
> *those* .svn folders as well. And so forth.

To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Jul 20 10:12:36 2006

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.