Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mercurial Commits vs Actual Production Graph

Ok, I've yet to see this popup as a combined question on mercurial, but it's something I've noticed recently.

When looking at other repos for development software, the commits are pretty much 'ideal' so if the objective was to fix a function f() then the commit is just 'fixed f() by ---'. My thing, I doubt every correction took place in just a single commit.

I would have something like

[1:trying x to fix f] -> [2:trying y to fix f] -> [3:trying z to fix f] -> [4:f fixed]

I noticed with or without named branches, if I try to then merge [4:fixed] to the 'stable' branch I have, then whether pushing or pulling the change, it pull [1:4] not just [4].

I would only want to push a clean correction to a repo or to a production setup. What's the easiest way to share all of my non-test changes?

like image 449
ilf Avatar asked Dec 06 '25 06:12

ilf


2 Answers

The rebase extension with --collapse.

like image 160
Amber Avatar answered Dec 09 '25 16:12

Amber


If you only want to push a clean changeset, only make a clean changeset. Collapsing multiple local changesets into 1 (a la Amber's answer) is one way.

The way I prefer is to use Mercurial Queues and do my bits of work in a patch. Then when it is complete I finish the patch and becomes a changeset.

like image 44
Joel B Fant Avatar answered Dec 09 '25 15:12

Joel B Fant



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!