Discussion:
svn update: force conflicts to be overwritten?
Greg Ercolano
17 years ago
Permalink
Is there an easy way to do an 'svn update' that *overwrites* all
files instead of doing a 'conflict' or 'merge'? ie. more like a tar
extraction to write over all the source files with the latest release.

The man pages and 'svn help update' don't seem to give an indication.

Like many of you, I often hand-tweak fltk to add print statements
and stuff just to check things, but if left behind, this messes up
an 'svn update' by conflicting the files instead of overwriting them,
leaving me with a half-updated fltk, and causes weird bugs that
really aren't there.

Unless one is particularly vigilant to see that single 'C'
(conflict) character go by in the voluminous output of an update,
you can miss it, and end up with a partial update that has to be
fixed by hand.
Albrecht Schlosser
17 years ago
Permalink
Post by Greg Ercolano
Is there an easy way to do an 'svn update' that *overwrites* all
files instead of doing a 'conflict' or 'merge'? ie. more like a tar
extraction to write over all the source files with the latest release.
I'm not quite sure about it, but recently I got a prompt sometimes
letting mit choose what to do with conflicts. Maybe a newer svn version
or something else...
Post by Greg Ercolano
The man pages and 'svn help update' don't seem to give an indication.
You can alway do an svn revert before svn update, or even after this
partial update, and then another update.
...
After a bigger update, I always do an svn stat after the update and look
for C in the first column.

Albrecht
Fabien Costantini
17 years ago
Permalink
Post by Greg Ercolano
Is there an easy way to do an 'svn update' that *overwrites* all
files instead of doing a 'conflict' or 'merge'? ie. more like a tar
extraction to write over all the source files with the latest release.
Basically, no.
You can use svn stat and make a unix shell script that sed filters all lines starting with 'C' and pipe and select the second column2 corresponding to the name file, and pipe to svn revert, then use svn up as usual.

This way you have a (faster) alternative to svn co and non conflicted files would keep your mods.
That said, it would need confirmation as it could be very devastating if you forgot that you developped code you wanted to keep.

Fabien
Duncan Gibson
17 years ago
Permalink
Post by Greg Ercolano
Is there an easy way to do an 'svn update' that *overwrites* all
files instead of doing a 'conflict' or 'merge'? ie. more like a tar
extraction to write over all the source files with the latest release.
Zap you debug changes with 'svn revert -R . ' then 'svn update' ?

(Or for just a few files, move them to a safe locatio, then update)

D
matthiasm
17 years ago
Permalink
Post by Duncan Gibson
Post by Greg Ercolano
Is there an easy way to do an 'svn update' that *overwrites* all
files instead of doing a 'conflict' or 'merge'? ie. more like a tar
extraction to write over all the source files with the latest release.
Zap you debug changes with 'svn revert -R . ' then 'svn update' ?
I like to check the current version out into an all new dirctory, then
manuall diff them and copy from a to b (or b to a, whichever is less
work). svn keeps the history in the repository and none in the local
files, so there is no difference between an updatead and a freshly
checked out version.

----
http://robowerk.com/

Fabien Costantini
17 years ago
Permalink
Post by Fabien Costantini
all lines starting with 'C'
Read:
All lines starting with 'C' from the svn up command output, not svn stat.

Fabien
Loading...