HG workflow : how to pick/abandon single changesets from branch clones

536 Views Asked by At

I think it is common practice of many development teams to create new features or bugfixes in a separate feature clone repository and pull and merge back if the feature/bugfix is ready.

However, sometimes I don't want to include all of incoming changes. To harness all the power of DVCS to review incoming changes I think it is necessary to be able to fully modify and select single aspects of the incoming changes.

What's the preferred workflow for this scenario?

As far as I know transplant extension offers the possibility to pick single changesets but I would also like to prune/pick on a path/file base e.g. to exclude some test scripts or stuff like that, that isn't required for the final feature anymore.

Since transplant is an extension, what's the official way to have a "clone, change, ... review" cycle in HG?

1

There are 1 best solutions below

5
On BEST ANSWER
  1. Mercurial is changeset-centric VCS, thus - operational object is changeset, cherry-picking inside changeset not possible at all
  2. In Mercurial you can't discard some of incoming changesets in bundle (but can do in Git, AFAICR)
  3. It's not official way in any form, just personal POV: because pull produce anonymous branch, before merging this branch with mainline you can edit branch content in order to exclude unwanted parts, using

    • histedit - delete changests, join
    • MQ - remove changeset from branch, edit content of changeset (convert to MQ-patch, edit, finish, reorder)