SVN merge
I'll probably get laughed at by git/mercurial/darcs/whatever fanboys for even mentioning that I use subversion, but whatever. Just so I don't forget:
If, in subversion, you want to merge changes on a branch to the mainline, then the following is wrong:
svn merge http://svnserver/branches/foo/ http://svnserver/trunk/ .
Instead, you should use this:
svn merge http://svnserver/branches/foo@REV http://svnserver/branches/foo@HEAD .
With the current directory being a checkout from /trunk/,
and REV
being the revision where /branches/foo and
/trunk started to diverge; that is, either the revision where
the branch was made, or the one where they were brought back in sync
with a merge in either direction.
Now hopefully I don't forget this for next time.
why not this?:
???
If, in subversion, you want to merge changes, you should be using svk ;-). It can find the value of @REV for you, even when you update the branch from mainline and merge it repeatedly (which quickly becomes pain to do manually).
Of course truly distributed version control (git, hg, bzr) makes branches even easier to use, but if you have to work with svn, svk is really useful. Unless you want use the ability of git or bzr (don't know about hg) to branch from and merge to subversion.