Mercurial: Pushing and Pulling Between Local Branches
-
I have just started using Mercurial, for a website project in this case. It is all done on a local repo (backed up), not using BitBucket (or similar host). ===Preamble=== This is my first step into version control beyond keeping sepearte folders, one for production (essentially a static folder representing the current live state) and one for development (both feature updates and content). The prior approach was beginning to give me all kinds of headaches when I had an incomplete feature but needed to update the content, keeping the two folders in sync (for content only) was horrid. I started by doing the features in a clone and content updates in the original. Then Pulling the Feature clone into the original clone (and managing conflicts was a pita but not really that bad), but have now switched to using named branches and it's working absolutely fine. I haven't tried bookmarks yet, simply haven't found a reason that has caused me to understand what they do differently to named branches). ============ ===The Question=== The one thing I can't work out how to do is to move single changesets from one branch to another. Let's say I have a feature branch that has 5 changesets but is incomplete, then I need to make a bug fix to the live site. I make the bug fix in the default branch and want to push it into the feature branch but without merging - otherwise the merge would have an incomplete (broken) feature! ============== ===Extra Info=== For clarity I need to get the bug fix out to the live server and whilst I might do the work in a new branch, once done it would get merged back into the default, so once again I'd have two branches, default and the feature branch. I think, from descriptions I have read (but haven't tried), that this kind of thing is pretty easy to do when you are using BitBucket (or similar host), you just pull the specific changeset (and its history) into your local clone. So I imagine it's also easy to do so between local clones (again I haven't tried it), but for lone nor money i can't work out how to do it within a single repo - i.e. between local branches. =========== Any help gratefully received. Thanks, Mike
-
I have just started using Mercurial, for a website project in this case. It is all done on a local repo (backed up), not using BitBucket (or similar host). ===Preamble=== This is my first step into version control beyond keeping sepearte folders, one for production (essentially a static folder representing the current live state) and one for development (both feature updates and content). The prior approach was beginning to give me all kinds of headaches when I had an incomplete feature but needed to update the content, keeping the two folders in sync (for content only) was horrid. I started by doing the features in a clone and content updates in the original. Then Pulling the Feature clone into the original clone (and managing conflicts was a pita but not really that bad), but have now switched to using named branches and it's working absolutely fine. I haven't tried bookmarks yet, simply haven't found a reason that has caused me to understand what they do differently to named branches). ============ ===The Question=== The one thing I can't work out how to do is to move single changesets from one branch to another. Let's say I have a feature branch that has 5 changesets but is incomplete, then I need to make a bug fix to the live site. I make the bug fix in the default branch and want to push it into the feature branch but without merging - otherwise the merge would have an incomplete (broken) feature! ============== ===Extra Info=== For clarity I need to get the bug fix out to the live server and whilst I might do the work in a new branch, once done it would get merged back into the default, so once again I'd have two branches, default and the feature branch. I think, from descriptions I have read (but haven't tried), that this kind of thing is pretty easy to do when you are using BitBucket (or similar host), you just pull the specific changeset (and its history) into your local clone. So I imagine it's also easy to do so between local clones (again I haven't tried it), but for lone nor money i can't work out how to do it within a single repo - i.e. between local branches. =========== Any help gratefully received. Thanks, Mike
I haven't used mercurial as much as I've used SVN.... but in SVN, you can merge certain revision numbers instead of doing everything at once. That would get you exactly what you want, but I'm not sure how it's done in mercurial. In SVN, all you would have to do if figure out what changes you want based on looking at the log of your branch, write down the numbers of the revisions, then go to the trunk and do a manual merge, on that merge, you can specify to only merge the revision numbers you want. I know this really only directly applies to SVN but you may be able to think of a way to do it based on how it's done on SVN.
-
I have just started using Mercurial, for a website project in this case. It is all done on a local repo (backed up), not using BitBucket (or similar host). ===Preamble=== This is my first step into version control beyond keeping sepearte folders, one for production (essentially a static folder representing the current live state) and one for development (both feature updates and content). The prior approach was beginning to give me all kinds of headaches when I had an incomplete feature but needed to update the content, keeping the two folders in sync (for content only) was horrid. I started by doing the features in a clone and content updates in the original. Then Pulling the Feature clone into the original clone (and managing conflicts was a pita but not really that bad), but have now switched to using named branches and it's working absolutely fine. I haven't tried bookmarks yet, simply haven't found a reason that has caused me to understand what they do differently to named branches). ============ ===The Question=== The one thing I can't work out how to do is to move single changesets from one branch to another. Let's say I have a feature branch that has 5 changesets but is incomplete, then I need to make a bug fix to the live site. I make the bug fix in the default branch and want to push it into the feature branch but without merging - otherwise the merge would have an incomplete (broken) feature! ============== ===Extra Info=== For clarity I need to get the bug fix out to the live server and whilst I might do the work in a new branch, once done it would get merged back into the default, so once again I'd have two branches, default and the feature branch. I think, from descriptions I have read (but haven't tried), that this kind of thing is pretty easy to do when you are using BitBucket (or similar host), you just pull the specific changeset (and its history) into your local clone. So I imagine it's also easy to do so between local clones (again I haven't tried it), but for lone nor money i can't work out how to do it within a single repo - i.e. between local branches. =========== Any help gratefully received. Thanks, Mike
The sensible advantages supplied by marketing handbags can improve your business in number of interesting ways. When the body from the marketing [url=http://www.marcbymarcsale.com/marc-by-marc-jacobs-clothing.html\]Marc Jacobs Sale[/url] selected by your small business is thick, then you'll get enough space to create 4-5 lines of significant info on the Discount Designer Bags pocket handbags.You will find various suppliers on the web that provide personalized marketing handbags. The option ranges from lightweight handbags,[url=http://www.marcbymarcsale.com/marc-jacobs-purses.html/\]http://www.marcbymarcsale.com/marc-jacobs-purses.html/\[/url\] small design printed handbags, custom printed handbags and much more with variety Good Handbags design and print. These web based providers will require your message and print it on your preferred handbags at an affordable cost. So for additional info on printed marketing handbags, advertising and marketing products and items browse the top providers online today.