[don't merge too early, use graft when needed] (was: Mercurial Digest, Vol 197, Issue 4)
Becker, Mischa J
mischa.becker at kroger.com
Wed Sep 15 22:49:45 UTC 2021
> -----Original Message-----
> From: Uwe Brauer
> Sent: Sunday, September 12, 2021 12:00 AM
> To: mercurial at mercurial-scm.org
> Subject: [don't merge too early, use graft when needed] (was: Mercurial
> Digest, Vol 197, Issue 4)
>
> >>> "AB" == Arne Babenhauserheide <arne_bab at web.de> writes:
>
> > Uwe Brauer <oub at mat.ucm.es> writes:
> > 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.
>
> I found out a small inconvenience of this approach.
>
> 1. I work on my secret branch, but find a fix. So I
> a. Running hg ci -i I only commit this fix
> b. I shelve the other changes.
> c. I merge that change set into default.
>
> 2. Now that change set is secret and I need to change it to draft.
> This it was a merge all of my change sets in my secret branch
> also turn into draft.
Don't commit the bug fix to your secret branch, commit it to default then merge it forward into your secret branch.
a. Shelve the other changes leaving fix in working directory.
b. Update to tip of default branch so fix can merge into default code.
* In TortoiseHg I have to 1st update to most recent descendant
from default branch before I can update to default's tip.
c. Commit fix to default
d. Merge committed change into secret branch.
e. Unshelve your other changes.
In projects where a & b are too annoying\time consuming I keep two separate copies of the repo on my pc, one where I make changes to default and one for changes to my secret branch. If I find something needing fixes while working in the secret branch I just jump over to the other copy of the repo, make & commit the fix there, then push the change to the repo with the secret branch and merge as needed.
Mischa Becker
________________________________
This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain information that is confidential and protected by law from unauthorized disclosure. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.
More information about the Mercurial
mailing list