wiki:SvnMerging

Merging with Subversion

  • Why merge? Merging one way or another is the only way to combine two different versions of the code. It can be done manually or using the svn merge command.
  • Subversion is not smart. Subversion only compares text changes within segments of files. If there is no apparent conflict, it will perform the merge. It does not, and cannot, understand changes that are related to logical changes (for example, changes to the meaning of a variable, or the type of a variable that is declared somewhere else).
  • Manually is usually best. Use svn or Winmerge to check for modifications, but combine files using hand edits, ideally with a tool like Winmerge or Xemacs.
  • Sometimes automatic is more appropriate. For example, if you want to add the new copyright statements and reference to Licence_ROMS.txt into every file in your branch, like the trunk does now, and you have otherwise not changed much in your branch, it is way quicker to use svn merge.
  • svn merge is not what you think. The syntax is not intuitive...in particular, the
    From: (start URL and revision of the range to merge)
    
    and
    To: (end URL and revision of the range to merge)
    

sections of the GUI are easy to misinterpret. Both refer to the code from which you will get your changes. The code to which your changes will be made (pending any conflicts) is the working copy...determined by context (where you did the right-click) in the GUI.

Last modified 17 years ago Last modified on 02/12/07 03:17:17
Note: See TracWiki for help on using the wiki.