Thursday, June 17, 2010

Hg - How to combine many dirty commits to one

You can also make dirty research branch and remove it when done in Hg. Credit to Concatenating multiple changesets into one

The concepts are
  1. Jump to a changeset that is your last stable(good) changeset with command 'update'.
  2. Use command 'revert' to the last changeset of dirty branch*.
  3. Commit reverting, this will produce new head.
  4. Remove old head with command 'strip'** or pull from other repository the new head with command 'pull -r' and delete this repository.
* The Branch in this context means any branches in Hg graph does not mean to only Hg named branch.
** Strip is an Hg extension.

No comments:

Clojure has lesser typing error problems than the others well-known dynamic typing languages

Give these snippets a try. // JS function foo () {   bar(1) } # Ruby def foo   bar(1) end ; Clojure (defn foo []    (bar 1)) As yo...