One of Kiln 2.0’s more hidden features is the ability to strip changesets from central repositories directly from Kiln. This could come in handy if, say, you misspelled a commit message, accidentally pushed it to Kiln and now want to change it; or if you accidentally added a file that contained patented code/personal information/other bad things. Strip allows you to rewrite the history of a repository to make it as if whatever you did never even happened.

Unfortunately, being able to strip your local repositories is only part of the answer – if the changeset was pushed to Kiln, it will simply reappear in your local repository the next time you pull. Kiln 2.0 allows you to strip changesets from a Kiln repository through the web interface. A backup will be created automatically as a branch of the stripped repository.

  1. Pick a changeset. That changeset and its descendants will be removed from the repository – including merges, so be aware that you could create multiple heads. Copy the ID of that changeset to the clipboard.
  2. Go to the repository’s settings page.
  3. Expand the Strip Changesets… section, and paste the changeset ID from step 1 into the text box. Click Strip.
  4. The changesets that will be stripped are highlighted in red – make sure that the changesets you intend to strip are highlighted, and no others. When ready, click Strip.
  5. You will be brought to a waiting page while the stripping operation takes place.

While we provide this functionality as a convenience tool, we encourage you to use it only in dire circumstances. Stripping from the main Kiln repository can have unexpected consequences if others had pulled the changesets before you stripped them. (An alternative is to use hg backout.) It is also worth noting that the stripping operation on the website can take quite a while – have patience, and discourage other contributors from pushing or pulling during the strip.