Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Product Lifecycle
  3. Application Lifecycle
  4. Mercurial: Pushing and Pulling Between Local Branches

Mercurial: Pushing and Pulling Between Local Branches

Scheduled Pinned Locked Moved Application Lifecycle
helpannouncementsysadmincollaborationtutorial
3 Posts 3 Posters 10 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    M Badger
    wrote on last edited by
    #1

    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

    A L 2 Replies Last reply
    0
    • M M Badger

      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

      A Offline
      A Offline
      Albert Holguin
      wrote on last edited by
      #2

      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.

      1 Reply Last reply
      0
      • M M Badger

        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

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        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.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups