Mercurial Digest, Vol 197, Issue 4

Uwe Brauer oub at mat.ucm.es
Sat Sep 11 19:49:44 UTC 2021


>>> "AB" == Arne Babenhauserheide <arne_bab at web.de> writes:

> I either use the secret phase for such commits, and then update back to
> the previous commit. If I expect the work to be larger, I just create a
> new branch.

In the past I create a new named branch and pushed. However sometimes my
collaborator did not take care and either committed to the wrong branch
or complained that some changes were missing (since he was on the wrong
branch)

I know that there is 

 hg push -b mybranch

But sometimes I forget it and just run hg push

So I think I combine both approaches, I will work on a private branch
and make these changesets secret. I am not sure what happens when I
merge, should I change the changesets to draft before I merge? Most
likely yes. I will check now.

> With the evolve extension you can change branch names of existing
> commits easily.

Do you mean with amend?

As in 
hg init 
echo 1 > 1
hg ci -Am 1
echo stable > 1
hg branch stapling
hg ci -m stable
echo stable2 > 1
hg ci -m stable2
# change the initial choice of the branch name
hg up 1
hg branch stable
hg amend # notes that there is an unstable changeset
# evolve the history
hg evolve
# and check that it’s correct
hg log -G

I am however not sure that this is a good idea for public changesets.

Uwe 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5673 bytes
Desc: not available
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20210911/63bbbbf6/attachment.p7s>


More information about the Mercurial mailing list