Splitting a Mercurial repository while keeping relevant history

After restructuring a Mercurial repository, I wanted to split it into two separate projects, but keep history clean.

I chose to rewrite history of the old repository to treat the action when the files were moved into a separate directory structure as a removal of the original files, and ignore history touching these files from there on. At the same time I wanted to create a new repository that began at this very moment and recorded the subsequent file specific history.


My Vim usage

A commented collection of practices I adhere to when using Vim – my editor of choice since many years. Includes ~/.vimrc entries, certain keyboard commands, plugin suggestions and esoteric concluding words.


Install and configure VerliHub

Steps to install and run VerliHub are described. The guide is written for a Debian-like distribution, e.g. Debian itself or Ubuntu. The difference from other distributions is probably only the package manager and the specific names of the prerequisites. On some distributions, VerliHub might even be a part of the main repository, making a large part of this text superfluous.


Auto-setup and maintain Mercurial wrapper hooks

Attempt to fix a TODO in Automator.pm in combination with the Mercurial backend.

This post is sourced from the entry at http://ikiwiki.info/, mostly as a backup.

  1. To define hooks, Mercurial uses paths given in the config file .hg/hgrc. To enable Mercurial to call ikiwiki-wrapper automatically after blog/wiki setup, ikiwiki thus needs to create hgrc.
  2. To reflect changes in $config{srcdir} and/or $config{mercurial_wrapper}, relevant lines in hgrc need to be updated on wrapper creation.

ikiwiki can keep track of lines in hgrc for which it is responsible by adding a .ikiwiki suffix to its hooks. This is correct and recommended markup, Mercurial-wise.

Two ways follow below. I prefer the long one. --Daniel Andersson