Mercurial user interface tweaks

Although I vastly prefer Mercurial to Git overall, there are a few things in Git’s user interface that I like, in particular automatic paging of output and showing a change summary after pulling. Looking around Mercurial’s wiki gives some idea how to do these with Mercurial, but they don’t behave exactly like Git does and can be quite annoying. I’ve just spent some time tweaking things a little bit to behave more like Git does, so here’s the relavent parts of my ~/.hgrc file for anyone interested.

[extensions]
color =
pager =
progress =

[hooks]
# This enables a diffstat after pulling. The instructions given on the Mercurial
# wiki also cause a diffstat to be given when you first clone a repository from
# the first revision to the latest revision, which isn't particularly of any
# use. The conditional around this checks whether the old revision is the first
# revision in the repo, and if so doesn't perform the diffstat.
changegroup =
	if [ "$(hg id -n -r $HG_NODE)" -ne 0 ]; then
		hg diffstat -r $(hg parent -r $HG_NODE --template '{node}'):tip;
	fi

# The colour extension enables colouring of diff and status output.
[color]
status.added = green
status.removed = red
status.modified = none
status.deleted = none
status.unknown = none
status.ignored = none

# This enables paging of various commands. By default, it applies to the
# annotate, cat, diff, export, glog, log and qdiff commands, but this can
# be customised.
[pager]
pager = LESS=FRSX less

# Use git's extended diff format (see 'hg help diffs' - adds extra information
# such as renames and mode changes to diffs).
[diff]
git = True

[alias]
# Makes an alias used by the changegroup hook above. The reason for doing this
# is so that the pager extension won't page the diffstat output, which I find
# annoying. You may want it to do this, in which case you can remove this alias
# and substitute diffstat with what's below in the changegroup hook.
diffstat = diff --stat

Update (26/07/11): Fixed diffstat of pulled changes.

Kiwi Update – November 2010

Since the last update, I have completed the new security features in the kernel: there is now basic support for users/groups, and all kernel objects now have access control lists. The ext2 module has also been updated to support conversion between kernel ACLs and POSIX modes on the filesystem, and the userspace POSIX subsystem also supports this.

After finishing this, I returned to working on the GUI. I have done some major performance improvements, and I now get good performance from it on a 500MHz Pentium III. I also implemented a basic C++ API for creating windows and handling input in applications, and using this I wrote a new terminal emulator application. This allowed me to port bash (which is now included in the repository and therefore with every build of Kiwi), as well as ncurses and nano. The obligatory screenshot:

Kiwi Terminal

I am now working on cleaning up the codebase and going through my (very large) TODO list.

Kiwi Update – October 2010

In an attempt to make myself blog more, I am going to post regular (probably monthly) updates about what’s happening with Kiwi. In August, I added an AHCI driver and support for legacy mode SATA devices to the ATA driver, and made it possible to boot Kiwi from a hard disk. More recently, I have been implementing a GUI. This GUI is implemented entirely in user-mode, with a server (the window server) that clients communicate with using an RPC interface. The window server manages windows, displays them on screen, and dispatches input events from the kernel to clients. Each window has an off-screen buffer which clients render their content into (the test clients render content usingĀ Cairo, which I have ported to Kiwi), and the server composites the windows onto the screen.

A screenshot of the current progress:

Kiwi GUI

The next tasks are to implement an API for creating GUI applications (currently, each client must have RPC client code compiled in and use the RPC interface directly), to port the old console application to the new GUI, and to improve the performance of the GUI.

However, I am currently working on adding security features to the kernel (users, groups, and access control lists for kernel objects). This is taking place in the security branch of the Kiwi repository, and I hope to have this finished over the next week or so. Once this is done, I will return to the GUI.

Welcome!

Time for a new blog! Maybe I’ll actually bother to put stuff on it now…