Force SVN update / checkout to overwrite local files
Asked Answered
T

5

15

i'm planning to run (on my server!)

svn update

to update my LIVE website with updates. However, i'm worried about 'C' conflicts which will prevent my site scripts from functioning. How can I force the checkout / update process to overwrite all local files (on my server!)?

I know one solution would be to do this on a separate directory - any thing else more efficient?

i've looked at Force an SVN checkout command to overwrite current files

I dont have --force option

Tabloid answered 1/5, 2011 at 15:21 Comment(1)
Please clarify: Why would you be worried about conflicts? Do you have local changes on your server that aren't committed to SVN? If so, what do you want to happen to those changes? If not, an "svn update" command shouldn't cause any conflicts.Ultramarine
F
5

Would clicking the directory and Reverting it to the base then updating have the same effect?

Forked answered 1/5, 2011 at 15:24 Comment(1)
sorry, this is on the server itselfTabloid
C
15

If you don't have --force option i think you do not have either the --accept. The svn update have a new option called --accept to "specify automatic conflict resolution action". It could be: postopone, mine-conflict, theirs-conflict, edit, launch, theirs-full, mine-full or base.

An svn help update will help!

Cloudy answered 2/5, 2011 at 2:18 Comment(0)
F
5

Would clicking the directory and Reverting it to the base then updating have the same effect?

Forked answered 1/5, 2011 at 15:24 Comment(1)
sorry, this is on the server itselfTabloid
R
3

You should ask Subversion to update your working copy. If merges are necessary, Subversion will tell you. If not, you'll have the latest of everything else.

I think a better solution is to merge your code into Subversion, completely blow away your working copy, and then checking out clean from the project.

Your repository should contain all meaningful code, not your working copy.

Rhabdomancy answered 1/5, 2011 at 15:41 Comment(1)
sorry, this is on the server itselfTabloid
R
2

I could go on about artefact management and content delivery independent to source control, however as I understand it, this is refreshing web server content directly from SVN, where the web server content may have been altered manually. If you are wanting to script this then "clicking the directory" will not work, however this is what I use

svn update --accept theirs-full
Ragan answered 2/7, 2020 at 22:34 Comment(0)
H
0

I know this is a super old question, but I was trying to find how to do this myself and came up with this:

svn status --no-ignore | grep '^\?' | sed 's/^\? //' | xargs -Ixx rm -rf xx

Basically, this lists all unversioned files in your repository, then pipes that list to a forced rm to for purging. This deleted ALL unversioned files without prompt, so make sure you know what you're doing.

Hisakohisbe answered 3/6, 2014 at 13:6 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.