ImpressCMS proudly uses SourceForge
ImpressCMS on Ohloh.net
[NewIndex :: Development :: This page]  
Tags: Development   Outdated   SVN   Subversion   Branch   Merge   Guideline  

Merging branch back in the trunk

Introduction

I just merged the latest modification of the impresscms_1.1 branch into the trunk. This is the first time I actually do this without any problem! I’m so excited that I needed to share it here!

Since I’m using Ubuntu and got familiar with using SVN from the command line many things got surprisingly simpler. Of course, a visual interface is nicer to work with but really, the command line is just the same once you understand how it work.

And it is sooo muuuch faster! I keep hearing some of my friends complaining how it took nearly hours to check out a branch using TortoiseSVN… Now the problem is probably not TortoiseSVN but is more likely to be Windows… but that’s another story !

But let’s get back to the topic of this post. I used this excellent short tutorial to help me understand for the hundrenth time how merging works !

Merging Step by Step

  1. First, I created a new folder on my Desktop, named icms_trunk_update.
  2. Then, I opened a Terminal window and move to that folder.
  3. I checked out the latest trunk: svn co https://impresscms.svn.sourceforge.net ... oot/impresscms/core/trunk
  4. I checked out the latest impresscms_1.1 branch: svn co https://impresscms.svn.sourceforge.net ... e/branches/impresscms_1.1
  5. I had previously looked in the log of the trunk and spotted when the latest merge was done. It was done by Stranger with the following comment: merged the changes from impresscms1.1 to trunk from re 4570 to rev 4730
  6. So I know that we need to merge the changes from impresscms_1.1 back in the trunk, from revision 4730 to the latest revision.
  7. What is the latest revision ? In impresscms_1.1 folder, I ran this: svn up At revision 4825.
  8. So we need to merge from revision 4730 to revision 4825.
  9. Now moving back to the trunk folder. I simply ran this: svn merge -r4758:4824 https://impresscms.svn.sourceforge.net ... e/branches/impresscms_1.1
  10. And the output was:
  11. U htdocs/kernel/icmspersistableregistry.php C htdocs/language/english/global.php U htdocs/modules/system/include/update.php U htdocs/modules/system/language/english/admin/preferences.php U htdocs/header.php U htdocs/include/version.php U htdocs/class/icms.htmlpurifier.php U htdocs/install/language/english/install.php U htdocs/install/common.inc.php A htdocs/install/page_no_php5.php U htdocs/install/page_modcheck.php A htdocs/install/page_safe_mode.php U htdocs/install/install_tpl.php U release_notes.txt U docs/changelog.txt U docs/language_changelog.txt
  12. Only one conflict, in htdocs/language/english/global.php. I ran a software comparison program (personally using BeyondCompare for Linux. Already was the best software for this on Windows, and continues to be it on Linux!) and resolve the conflict.
  13. I then commit the changed files back in the trunk: svn commit
  14. Which brings a screen to input a comment which I did:
Merging back the changes from impresscms_1.1 from revision 4758 to 4824. 

For the record, here is the command I used and the log it produced. Of course, the conflict in global.php was resolved before posting.

marcan~/Desktop/icms_trunk_update/trunk$ svn merge -r4758:4824 https://impresscms.svn.sourceforge.net ... e/branches/impresscms_1.1 U htdocs/kernel/icmspersistableregistry.php C htdocs/language/english/global.php U htdocs/modules/system/include/update.php U htdocs/modules/system/language/english/admin/preferences.php U htdocs/header.php U htdocs/include/version.php U htdocs/class/icms.htmlpurifier.php U htdocs/install/language/english/install.php U htdocs/install/common.inc.php A htdocs/install/page_no_php5.php U htdocs/install/page_modcheck.php A htdocs/install/page_safe_mode.php U htdocs/install/install_tpl.php U release_notes.txt U docs/changelog.txt U docs/language_changelog.txt

All done now!

The bottom line is:

'''SVN Merge is not that complex if we do it frequently and are not waiting weeks between each merge! '''

Tips and tricks

todo

Conventions

todo

What if the process fails?

todo

 

Last modified on 2011/7/14 by fiammybe
This page was created on 2010/11/11 by skenow
This page has been viewed 2186 time(s)

Comments
The comments are owned by the poster. We aren't responsible for their content.
ImpressCMS proudly uses SourceForge
ImpressCMS on Ohloh.net