pushing only one head

venizio krups 0000.vk at gmail.com
Thu Apr 8 07:40:10 CDT 2010

On Thu, Apr 8, 2010 at 8:28 AM, Douglas Philips <dgou at mac.com> wrote:
> On 2010 Apr 8, at 8:14 AM, venizio krups wrote:
>> On Thu, Apr 8, 2010 at 8:08 AM, schrei5 wrote:
>>> I was wondering if it is possible to only push one head of my local
>>> repository to the shared central repository?
>> hg push -r REV should do it.
> Yup, I do that all the time.
> You do have to be careful not to accidently push without -r and so I find
> that it is best to set up default and/or default-push paths to point to a
> sandbox repo instead of the release or review repos. That way when I want to
> push just one of my heads to a more public place, having to type the repo
> path helps to trigger a "ok, what am I pushing" double-check. It is really
> all about having useful habits for your environment.
> -Doug

yes. one can also bookmark the public head 'say @publichead' and then
it's just a matter of hg push -r @publichead which can be then aliased
to something informative like pushpublic. if you get used to hg
pushpublic, you'll think twice when you have to do a bare hg push.
reduces the chances for user error.

More information about the Mercurial mailing list