svn mergeinfo

We've slowly started to utilize Subversion branching and merging. Previously, due to some policy beyond my control, the project was branched, merged, and reviewed manually through me. But luckily these days, we've slowly started to truly utilize actual Subversion branching and merging. It will take a while for all of us to familiarize and settle down on such development style.

Several commands regarding branching and merging.

1. To create a branch
$ svn cp ^/trunk ^/branch/feature-x

2. To visualize the history of branching
$ svn mergeinfo ^/trunk ^/branch/feature-x

    youngest common ancestor
    |         last full merge
    |         |        tip of branch
    |         |        |         repository path

    100               120   
    |                  |      
  -------| |------------         trunk
     \                        
      \                       
       --| |------------         branches/feature_x
                       |      
                       120 

3. To merge from trunk to feature branch
$ svn merge ^/trunk ^/branches/feature-x

4. To check what have been merged into your branch
$ svn mergeinfo ^/trunk ^/branches/feature-x --show-revs merged

5. To check what have NOT been merged into your branch
$ svn mergeinfo ^/trunk ^/branches/feature-x --show-revs eligible

No comments:

Post a Comment