Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TortoiseHg: Push Branch

I am working on some bugs in our code base and I have created separate branches for each bug. I have rebased one of the branches on top of default. I generally use the mercurial plugin for Eclipse and I would do a push (when I am in the default branch). This pushes my changes on the default branch.

I tried to do the same thing with TortoiseHg. When I press push, the client complains that I am about to create remote heads/create new branches on the server. Is there some way to push only changes on one branch using TortoiseHg?

Thanks for your answers!

like image 675
Aishwar Avatar asked Jul 20 '10 18:07

Aishwar


2 Answers

Here’s another way to do it:

  1. Open Repository Explorer.
  2. Click Determine and mark outgoing changesets (green up arrow button). All your changesets / branches will be marked with an up arrow.
  3. Right-click on the changeset you want to push. From the menu, select Push to here.

Works the same way as the previous answer, but allows you to select the changeset from the list, without typing or pasting the target changeset id.

like image 183
Helgi Avatar answered Oct 20 '22 09:10

Helgi


The easiest way to do this is via the command-line using hg push -r . from the branch with the change you want to push. See hg nudge for details.

That being said, it is also possible via TortoiseHG:

  1. Open your Repository Explorer
  2. Open Tools->Synchronize
  3. Open "Advanced Options"
  4. Set "Target Revision" to the changeset that you want to push
  5. Select "Push"

This should only push the changeset you specified (along with any parents of that changeset which may be required). If you limit the changesets that are pushed to those on your default branch, there should be no warning about creating additional heads.

More information (well, not that much) can be found in the Section 4.9 of the TortoiseHg documentation.

like image 45
Tim Henigan Avatar answered Oct 20 '22 10:10

Tim Henigan