tommed
tommed

Reputation: 1561

Mercurial feature work - keeping bespoke work clean best practise?

I've been using source control systems for about 10 years, each obviously with their own idioms and practises.

I am currently using Mercurial for .NET development and have a particular requirement that I wonder what your opinions would be to best achieve my goal.

We develop a baseline product that is a kind of rolling release. Some customers need the product slimmed down (due to getting cheaper licenses) or bespoke work done. I tend to branch the "trunk" (default branch in Mercurial), do the bespoke work and create a build.

When new work is done in "trunk" and I need a new build from the bespoke branch, I will merge the changes using hg merge -r CHANGESET_NUM_FROM_DEFAULT_HERE and then do a build.

This works fine, but the bespoke branch quickly gets filled with commits that are related to "trunk" and not really bespoking features. This means when I need to look through the changesets for this branch they are cluttered.

What I really want it to shift where the branch "junction point" begins, so the bespoke changelist only contains bespoke check-ins, but the parent of the bespoke branch changes.

I tried to use the rebase extension as this looks like it should do this, but it instead does many merges and still clutters up my bespoke branch.

Is there a way of keeping my bespoke branch clean? Or am I going about things the wrong way?

Upvotes: 4

Views: 85

Answers (1)

Lazy Badger
Lazy Badger

Reputation: 97270

Your bespoke branch is clean now. But - if you want don't see mergesets in branch log, just skip in log

hg help log

options:

...

-M --no-merges do not show merges

hg log -r 55:tip --template "{branch}:{rev}\n" -b default

default:55

default:56

default:57

default:60

default:61

default:63

default:65

default:66

hg log -r 55:tip --template "{branch}:{rev}\n" -b default -M

default:55

default:56

default:57

default:61

default:65

default:66

and screenshot of graph from THG

Merges

Upvotes: 1

Related Questions