开发者

Mercurial Commits vs Actual Production Graph

开发者 https://www.devze.com 2023-04-06 20:06 出处:网络
Ok, I\'ve yet to see this popup as a combined question on mercurial, but it\'s something I\'ve noticed recently.

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 witho开发者_如何学编程ut 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?


The rebase extension with --collapse.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号