I have 5 outgoing changesets available to push from my local Mercurial repo, and I only want to push one of these at this time. This one changeset lies in the middle of all available.
For example I have the following revisions:
and I only want to push 6545. Any easy way to do this?
You can only push the consecutive list of changesets up to the required.
So
hg push -r 6545
will push 6543..6545
.
And you cannot push just 6545
because without preceding changesets its changes make no sense.
You could use the Mercurial Queues extension to do this. You may need to enable the mq extension which is detailed on the linked page.
You would import all the revisions into the queue, pop them all off the stack and then apply the one that you want before pushing and then applying the rest. Something like this:
> hg qimport --rev 6639
> hg qimport --rev 6543:6546
> hg qpop --all
> hg qpush --move 6545.diff
Here you might have to resolve conflicts
> hg qfinish --applied
> hg push
> hg qpush --all
Again, might need to resolve conflicts here.
This has left your repository with revision 6545
applied and pushed (but with a different revision number now) and the rest of your changes applied and not pushed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With