Pull

svn update

If there are conflicts, then an (e) edit option is available.  SVN isn’t smart enough to notice that resolving the conflict can be complete at edit completion, so you have to mark each such resolved change (r) resolved explicitly after invoking edit.

For unfathomable reasons, SVN (e)dit conflicts are shown in ‘diff -u’ output instead of ‘diff3 -m’.  I’m hoping that oddity can be confligured away.

svn status -u : if you mark a merge conflict as deferred, then this will show what all the contributors were.  In particular, you can construct a ‘diff3 -m’ command for such a deferred conflict, by running:

$ svn status -u | grep -A3 ^C
C            30427   lz_ios/lz_ios_srv/src/ios_config.c
?                    lz_ios/lz_ios_srv/src/ios_config.c.mine
?                    lz_ios/lz_ios_srv/src/ios_config.c.r30417
?                    lz_ios/lz_ios_srv/src/ios_config.c.r30427

From this you can run:

$ diff3 -m \
                    lz_ios/lz_ios_srv/src/ios_config.c.mine \
                    lz_ios/lz_ios_srv/src/ios_config.c.r30417 \
                    lz_ios/lz_ios_srv/src/ios_config.c.r30427 \
> lz_ios/lz_ios_srv/src/ios_config.c

After resolving the conflict, and updating the file, you must run:

svn resolve –accept=working foo.c # (say)

Merge branch

For a branch off of the project ‘foo’ :

svn up
svn merge --accept postpone ^/foo/trunk
svn commit 

Then resolve conflicts as above with ‘svn update’

Push (local branch, or local changes to trunk)

$ svn commit

Query stuff

svn diff, and svn log.

Cleanup state from failed update

When running over flaky wireless, my svn update’s failed a few times.  You have to run ‘svn cleanup’ to handle such a failure (but it tells you to do so).

Build tree root and repo info

‘svn info’ gives you useful information about the build tree you are in (the svn checkout).

List files and other info for a commit

svn log -v -r 30414

Commit selectively.

List the files:

svn ci -F ../../tools/svn-commit.tmp `cat c`