Brian Bird
2006-07-19 13:14:57 UTC
Is there any way to force subversion to ignore the fact that a locally
modified folder has been entirely replaced by something else and just tell
it to save the current working copy over the repository as a new version?
For example:
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
Subversion will not let me use the new directory because it already knows
about a previous one. The only solutions I've found from this list or from
google is to remove the directory and re-run svn update, but this loses any
changes from the new directory.
I want to be able to tell subversion to remove the old directory and add the
new one as a replacement, including any files inside. If any files have been
added/deleted then the files in the new directory should be taken as the
right thing. Something like a "svn add -force directory"
The best solution I can think of is to do the following:
mv directory directory.new
svn up
svn remove directory
svn ci
mv directory.new directory
svn add directory
svn ci
but this seems very long winded.
FYI, the 'other program' in this case is Firefox and the directory is where
it stores extensions. Whenever an extension is updated, the directory gets
replaced, but Firefox doesn't know anything about subversion so it deletes
the .svn directory too. However, this means I have no control over how the
old directory gets replaced by the new one.
Any suggestions appreciated.
Briann
modified folder has been entirely replaced by something else and just tell
it to save the current working copy over the repository as a new version?
For example:
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
Subversion will not let me use the new directory because it already knows
about a previous one. The only solutions I've found from this list or from
google is to remove the directory and re-run svn update, but this loses any
changes from the new directory.
I want to be able to tell subversion to remove the old directory and add the
new one as a replacement, including any files inside. If any files have been
added/deleted then the files in the new directory should be taken as the
right thing. Something like a "svn add -force directory"
The best solution I can think of is to do the following:
mv directory directory.new
svn up
svn remove directory
svn ci
mv directory.new directory
svn add directory
svn ci
but this seems very long winded.
FYI, the 'other program' in this case is Firefox and the directory is where
it stores extensions. Whenever an extension is updated, the directory gets
replaced, but Firefox doesn't know anything about subversion so it deletes
the .svn directory too. However, this means I have no control over how the
old directory gets replaced by the new one.
Any suggestions appreciated.
Briann