Hooks to affect phases to make a remote server non-publishing?

35 views
Skip to first unread message

Michael McNeil Forbes

unread,
Jun 22, 2012, 10:55:09 PM6/22/12
to mercurial
Hi,

Could anyone point me in the right direction to make some hooks so
that I can tell hg that a remote repository (bitbucket) is non-
publishing, so that when I push and pull from it, the phases of the
change sets remains draft?

I assume this should be a fairly simple thing to do with push and pull
hooks, but have never done such a thing, so do not know the best place
to start.

Thanks,
Michael.
_______________________________________________
Mercurial mailing list
Merc...@selenic.com
http://selenic.com/mailman/listinfo/mercurial

Pierre-Yves David

unread,
Jun 28, 2012, 12:06:25 PM6/28/12
to Michael McNeil Forbes, mercurial
On Fri, Jun 22, 2012 at 07:55:09PM -0700, Michael McNeil Forbes wrote:
> Hi,

Hi, sorry for the delay,

> Could anyone point me in the right direction to make some hooks so
> that I can tell hg that a remote repository (bitbucket) is non-
> publishing, so that when I push and pull from it, the phases of the
> change sets remains draft?

There is no way to create non publishing repository with old mercurial.

The publishing setting is set server because it looked like the most intuitive
way to handle such configuration. (And it still seems the best way to me). And
we don't added any local override to avoid overcomplicated configuration.

But, that leave old server without any way to be unpublishing. I hope that most
major hosting will get phase support before this get too much annoying.

> I assume this should be a fairly simple thing to do with push and
> pull hooks, but have never done such a thing, so do not know the
> best place to start.

Yes. I assume you have a reference "public" server somewhere. You simplest
solution is to run the following command to fix your phases:

$ hg phase --force --draft 'public() and outgoing("<public-server>")'

A post-pull and post-push clone will do.

--
Pierre-Yves David

http://www.logilab.fr/

signature.asc
Reply all
Reply to author
Forward
0 new messages