Mercurial Digest, Vol 197, Issue 4

Dr. Arne Babenhauserheide arne_bab at web.de
Sat Sep 11 20:04:30 UTC 2021


Uwe Brauer <oub at mat.ucm.es> 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.
>
> 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.

That’s what I mean, yes.

>> 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.

It is a great match for secret changesets: Just add `hg phase -s .`
after hg branch and you have a branch that you cannot push accidentally.
Now you keep working there and before pushing you can adjust the name as
needed.

Best wishes,
Arne
-- 
Unpolitisch sein
heißt politisch sein
ohne es zu merken
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 1125 bytes
Desc: not available
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20210911/4005c9dd/attachment.asc>


More information about the Mercurial mailing list