Making it easy to really create private local branching

dukeofgaming dukeofgaming at gmail.com
Sun Jan 6 18:17:55 CST 2013


Hi,

I was thinking that some like the way branching works in git because of
this: private local branching.

I've seen some complain "but Mercurial pushes everything by default!, that
makes me sad", and "to have private local in branching in mercurial you
have to copy your whole project or create another clone!", which to me is a
silly option, but I see it still sticks around due to cultural factors.

Then there are Mercurial Phases to do this, but it is slightly cumbersome
IMHO, enough to somewhat discourage their use:

# hg branch my_branch
# hg commit -m "Opening branch"
# hg id -n
123
# hg phase --secret --force 123

And you have a private local branch, yes?

So how about if instead we had a --phase option in branch:

# hg branch my_branch --phase secret

So that the next commit on that branch would be secret (and the rest as a
consequence). Or even better, in commit, that way we don't have to use
--force for brand new commits after the fact.

# hg branch my_branch
# hg commit -m "Opening secret branch" --phase secret

Or even, even better, how about both?, what do you think?

Regards,

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20130106/3188cad1/attachment.html>


More information about the Mercurial-devel mailing list