Documente Academic
Documente Profesional
Documente Cultură
Agenda
Introductions The Essentials Bumps in the Road From 1.5.0 to 1.6.9 Merge Tracking in 1.7.0 and Beyond Best Practices Questions & Answers
Prerequisites
You should be a user of Subversion that routinely needs to merge. You should understand what merging is in general and how it is utilized in Subversion. You should understand what the merge tracking feature is that was added in Subversion 1.5.0. You should be ready to dive deeper technically into merge tracking.
Like any other versioned property, svn:mergeinfo can be copied. So just because a path has mergeinfo for a given merge source and revision doesnt necessarily mean a merge was literally done from that source to that path.
The implicit mergeinfo on /branches/B1 includes both its common history with trunk and its own history. If we think of this as merge info it would be:
'/trunk:420-713' '/branches/B1:714-1011'
While this mergeinfo isnt actually present in B1s explicit (or inherited) mergeinfo, Subversion acts as if it is for the purposes of determining what has been merged to the B1 branch.
Subtree Mergeinfo is explicit mergeinfo found under the root of a branch. The subtree can be a directory or a file. A subtree merge is a merge targeting some path under the root of a branch. It is one way to create subtree mergeinfo. Subtree merges targeting a file are often referred to as file merges.
Subversion handles missing subtrees using non-inheritable mergeinfo and subtree mergeinfo.
'subversion\bindings\javahl\src\org\tigris\subversion\javahl\SVNClientInterface.java'
More importantly, unlike earlier versions, only the subtrees affected by the merge have their mergeinfo updated:
1.7-dev-client>svn st M . M subversion\libsvn_client\merge.c 1.7-dev-client>svn diff --depth empty Property changes on: . ___________________________________________________________________ Modified: svn:mergeinfo Merged /trunk:r40577
None of this is a big deal in this simple example...but imagine merging a diff affecting 100's of paths in a working copy with 100's of subtrees with mergeinfo.
Renames on either side of a merge prior to 1.6.x didn't work well (skips or deletes of newer paths). Things got a bit better in 1.6.x as a tree conflict is raised in some cases, but ideally merge should automatically follow renames on either side of the merge and do the right thing. Can't automatically differentiate a real merge vs. a --record-only merge. Performance It can always be better.
DO NOT hand edit or remove svn:mergeinfo properties unless you are sure you know what you are doing (and recheck yourself) Commit all svn:mergeinfo changes
Programming language, development tool, methodology agnostic. One integrated platform built for collaboration. Onsite or SaaS deployment options. Optimized for Subversion.
Summary
There are three main types of mergeinfo: explicit, inherited, and non-inheritable. Subtree merges (merges below the branch level) are the main culprit of issues with merge tracking. A lot of progress has been made in the implementation of merge tracking since 1.5.0s release and today people should be using 1.6.9. Familiarize yourself with merging best practices, use them, and consistently refer to them before merging.
Learn More:
Subversion resources: http://www.open.collab.net/products/subversion/whatsnew.html. Join openCollabNet technical community and download CollabNet Subversion: www.collab.net. CollabNet TeamForge resources: http://www.open.collab.net/products/ctf. Virtual Conference, April 15th Agile ALM for Distributed Development Register at: http://www.open.collab.net/news/events/virtualConf2010/.