Oracle Blog

Blog for blue

A simple extension to the hg (mercurial) forest (fdiff fcommit and fimport)

For Sun WebStack, I have been working with multiple repositories (apache2, squid, mysql5, lighttpd etc). I often have to do the same or related changes in each of these repositories.The standard commands that I had to use to work with these repos are,

Fetch the sources for all repos [ for i in $mylist; do hg clone ssh://webstack-root/$i ; done ]

Quite recently I found the forest extension which allowed me to do- on top dir in the serverhg init - on the client systems, clone, push and pullhg fclone ssh://webstack-roothg fpullhg uphg fpush

These were very helpful, but I also wanted to review the diffs (and to request for review) and to commit related changes with the same aggregated commit message, Unfortunately the forest extension does not yet have commands for these.

I have modified the forest extension slightly to provide for new commands 'fdiff' 'fcommit' and 'fimport'. The source is here. In case you have the same need, drop this into your hgext directory (replace the forest.py if it exists) or set the extension path in your .hgrc