Absorb is fantastic and one of Jun Wu's (seen in this thread as quark12) best contributions to Mercurial. I want everyone to know about this tool, it's amazing. I had fun trying to come up with a name for the feature:
https://lobste.rs/s/nws1uj/help_us_name_new_mercurial_featur...
Absorb is amazing! Even if you don't take up Sapling, there's a 'git absorb' plugin which I have found absolutely invaluable: https://github.com/tummychow/git-absorb
Re:
by boredtofears on Wednesday November 16, 2022 @02:39AM
(#33620109)
Holy crap that looks incredible. I can't wait to try this.
Just learned about 'git absorb' couple of weeks ago and have used it every day since. Amazing tool.
thanks for the reference, using `git-fixup` myself since years: https://github.com/keis/git-fixup
Will try `git-absorb`.
In git you do this like git commit --fixup hashtofix && git rebase -i --autosquash hashtofix^
Hard to discover and remember but once you do it usually works smoothly.
No, the point is that you don't have to mention the hash at all, it's automatically deduced by diff context.
There is git-fixup, which provides the 'git fixup' command that makes suggestions to which commit the currently staged changes should be added.
https://github.com/keis/git-fixup
git-fixup will add fixup! commits, so it still needs the mentioned 'git rebase -i --autosquash' afterwards. Usually you do not even need to give it a specific commit if your branch is set to track an upstream branch.
Still not quite the same, because absorb splits up your working directory changes into all relevant commits, as deduced by diff context.
Staged or unstaged? Sounds interesting, will give it a try. Thanks for the details.
Dipped into it.
Staged changes, excluding renames.
So git-fixup and git-absorb will now happily live together for the moment on my box.
Made a good first impression, thanks again for the reference.
Or git commit --fixup=:/<pattern> to find the most recent commit with pattern in the message. Still going to give git-absorb a try though.
It seems this is still based on changing history - Does hg have something to address the downsides of rebasing that are present in git? such as chilling effect on cooperation of branches (eg you don't dare touch or use remote branches which someone may use rebase on, and destruction of actual history for use in eg reconstructing a timeline of a bug and fix later found to be important).
Re:
by FerociousTimes on Wednesday November 16, 2022 @05:51AM
(#33621214)
For the uninitiated, hg, in this context, refers to Mercurial by the chemical symbol (Hg) for Mercury.
Yes, hg has changeset evolution. A meta-history of editing propagates when you push rewritten commits.
For example, I use Mercurial’s absorb command [1] and was pleased to see it in Sapling.
Overall this looks promising.
[1]: https://gregoryszorc.com/blog/2018/11/05/absorbing-commit-ch...