4/8/2023 0 Comments Tortoisehg windows remote![]() But don't worry, after you commit, your source is safe! I have tested this with TortoiseHg 2.3 and Mercurial 2.1. If you do not do this, they will be lost (without any big warning messages) when you switch the Working Directory to the default branch. Warning: you will need to commit your changes in 'risky' before switching. Rather than having to fix the bug in the risky branch and push out an untested feature with the bug fix, you can simply switch to the current default branch, make the fix there, and then switch back to the 'risky' branch to continue working on the new feature. Now imagine that the unthinkable happens: you have discovered a fatal bug in the project. So we've been happily typing away at our source in the 'risky' branch where our experimental feature lives. When you're done with the feature, you can merge the branches to update the main branch with the changes in the experimental feature branch even if you've made changes to the main branch! It's based on simple principles, but it's almost magical to watch. Mercurial's named branches to the rescue! With a named branch, you can work on the experimental feature and the main branch of the project at the same time and in the same directory. ![]() On top of that, you're not going to want to have to keep track of and make the same bug fix to the files again after you launch a new version of the project which incorporates the experimental feature. The fix is simple, but to do it, you're going to need to make changes to the original versions of the files that existed before you started the new experimental feature. Now assume that someone finds a critical bug in your project. There may even be other developers working on the project at the same time. In the meantime, people are using your project and may find bugs which will need fixing. To make this feature work, you're going to need to make sweeping changes across the project. This feature seems like a good idea, but it's a bit of a gamble and you're going to need to see it in action before you're sure it should become a permanent part of the project. The Basics (Creating and Committing Repositories)įeel free to skip this section if you're already familiar with the basics of TortoiseHg usage.Ĭonsider the following scenario: you're about to embark upon a new experimental feature. Cloning, pulling revisions from Bitbucket, updating, and merging.Creating a new named branch and committing it.The Basics (Creating and Committing Repositories).Please comment below if you find any errors or inaccuracies. I want to keep this article short and to the point, but accuracy is important to me. However, I make no claim that this is the correct (or even a correct) way to use TortoiseHg and Mercurial. This is the way that feels the most natural to me. There are a bewildering number of different ways you can work with Mercurial. Also, this is Windows-centric, but I imagine it will be a similar experience for Linux and Mac OS users as well. Nor do I explain more than a small fraction of the capabilities of and terminology used by version control systems like Mercurial. But I don't walk through installation of the software. This aimed at newbies and I've tried to not assume much prior knowledge. The three sections of this guide ( The Basics, Branching, and Bitbucket) are intended to be read separately or in order. Mercurial is incredibly flexible, so it may take a while to find the method that works best for you!Īn explanation of using named branches in projects with TortoiseHg for Windows and collaborating with others via Bitbucket. You can always branch off of old commits at any time (with a name or not), so pre-creating them like I describe is unnecessary. ![]() I've also found that I don't have as much need for branches as described below. But now I'm on a Linux desktop and I use Mercurial at the command line ( hg). I still () love Mercurial and use it every day. I'll leave this page up in the hopes that it will remain useful for others. I firmly believe that Mercurial is a great SCM, but it's hard to imagine going back to it now. I'm afraid this has been the final nail in the coffin for hg for me. UPDATE : Git is now a professional requirement at my workplace and Bitbucket has dropped support for Mercurial. Dave's Visual Guide to TortoiseHg and Mercurial's Named Branches. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |