[Python-Dev] Mercurial workflow question...

Nick Coghlan ncoghlan at gmail.com
Fri Dec 14 03:36:01 CET 2012


On Fri, Dec 14, 2012 at 12:02 PM, Larry Hastings <larry at hastings.org> wrote:

>  On 12/13/2012 05:21 PM, Trent Nelson wrote:
>
>     Thoughts?
>
>
> % hg help rebase
>

And also the histedit extension (analagous to "git rebase -i").

Both Git and Hg recognise there is a difference between interim commits and
ones you want to publish and provide tools to revise a series of commits
into a simpler set for publication to an official repo. The difference is
that in Git this is allowed by default for all branches (which can create
fun and games if someone upstream of you edits the history of you branch
you used as a base for your own work), while Hg makes a distinction between
different phases (secret -> draft -> public) and disallows operations that
rewrite history if they would affect public changesets.

So the challenge with Mercurial over Git is ensuring the relevant branches
stay in "draft" mode locally even though you want to push them to a
server-side clone for distribution to the build servers. I know one way to
do that would be to ask that the relevant clone be switched to
non-publishing mode (see
http://mercurial.selenic.com/wiki/Phases#Publishing_Repository). I don't
know if there's another way to do it without altering the config on the
server.

General intro to phases: http://www.logilab.org/blogentry/88203

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20121214/f767a86e/attachment-0001.html>


More information about the Python-Dev mailing list