Stripping Changesets in Kiln


Follow

Overview

Kiln Stripping allows you to strip changesets from central repositories directly from Kiln. This will rewrite the history of a repository to make it as if whatever you did never even happened. For example when 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 or personal information.

 


Solution

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 and above allow you to strip changesets from a Kiln repository through the web interface.

  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.
  2. Copy the ID of that changeset to the clipboard. Easiest can be done by hovering over the changeset name, right-clicking on the changeset ID, and selecting Copy.

    Kiln_Stripping_Copy_Changeset_ID.jpg

  3. Go to the repository’s settings page.
  4. Expand the Strip Changesets… section, and paste the changeset ID from step 2 into the text box. Click Strip.

    Kiln_Stripping_Select_Changeset.jpg

  5. 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.

    Kiln_Stripping_Strip.jpg

  6. You will be brought to a waiting page while the stripping operation takes place.
  7. Once the stripping operation finished, you will be brought back to the changeset history page.
  8. The stripped changesets will be removed from the changeset history.

    Kiln_Stripping_ChangeSets_Removed.jpg

  9. A backup will be created automatically as a branch of the stripped repository, which you can easily access by clicking on the Related.

    Kiln_Stripping_BackupRepository.jpg

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.

Back to the top