Mercurial and Distributed Code Management

Spent a few hours tonight setting up a very simple Mercurial repository and tested it for distributed code development. Using cron jobs and 3 temporary user ids, the only file is modified in the respective local repositories of the users over a period of time. When the changes from all these repositories is pulled into a new repository, the tip/head creation is as smooth as I can imagine. Once the tip and heads are created, the status looked like this:

bash-3.00$ hg heads
changeset: 38:f08a4549a52e
tag: tip
user: hgusr3@localhost
date: Thu Feb 07 01:20:00 2008 +0530
summary: test commit

changeset: 29:6337c050747e
user: hgusr2@localhost
date: Thu Feb 07 01:24:00 2008 +0530
summary: test commit

changeset: 20:abc6f51d4958
user: hgusr1@localhost
date: Thu Feb 07 01:28:01 2008 +0530
summary: test commit

changeset: 10:25b7c063d15c
parent: 9:65dec58603a6
parent: 7:fa096b952604
user: spurthi@localhost
date: Thu Feb 07 00:10:11 2008 +0530
summary: test commit

bash-3.00$

After I manually merged all the revisions, the result looked great!

Wed Feb 6 23:33:02 IST 2008
Wed Feb 6 23:36:37 IST 2008 by spurthi
Wed Feb 6 23:36:39 IST 2008 by spurthi
Wed Feb 6 23:36:40 IST 2008 by spurthi
Wed Feb 6 23:44:46 IST 2008 by spurthi
Wed Feb 6 23:48:00 IST 2008 by hgusr1
Wed Feb 6 23:50:00 IST 2008 by hgusr3
Wed Feb 6 23:54:00 IST 2008 by hgusr2
Wed Feb 6 23:58:00 IST 2008 by hgusr1
Thu Feb 7 00:00:00 IST 2008 by hgusr3
Thu Feb 7 00:04:00 IST 2008 by hgusr2
Thu Feb 7 00:08:00 IST 2008 by hgusr1
Thu Feb 7 00:10:00 IST 2008 by hgusr3
Thu Feb 7 00:14:00 IST 2008 by hgusr2
Thu Feb 7 00:18:00 IST 2008 by hgusr1
Thu Feb 7 00:20:00 IST 2008 by hgusr3
Thu Feb 7 00:24:00 IST 2008 by hgusr2
Thu Feb 7 00:28:00 IST 2008 by hgusr1
Thu Feb 7 00:30:00 IST 2008 by hgusr3
Thu Feb 7 00:34:01 IST 2008 by hgusr2
Thu Feb 7 00:38:00 IST 2008 by hgusr1
Thu Feb 7 00:40:00 IST 2008 by hgusr3
Thu Feb 7 00:44:00 IST 2008 by hgusr2
Thu Feb 7 00:48:00 IST 2008 by hgusr1
Thu Feb 7 00:50:00 IST 2008 by hgusr3
Thu Feb 7 00:54:00 IST 2008 by hgusr2
Thu Feb 7 00:58:00 IST 2008 by hgusr1
Thu Feb 7 01:00:00 IST 2008 by hgusr3
Thu Feb 7 01:04:00 IST 2008 by hgusr2
Thu Feb 7 01:08:00 IST 2008 by hgusr1
Thu Feb 7 01:10:00 IST 2008 by hgusr3
Thu Feb 7 01:14:00 IST 2008 by hgusr2
Thu Feb 7 01:18:00 IST 2008 by hgusr1
Thu Feb 7 01:20:00 IST 2008 by hgusr3
Thu Feb 7 01:24:00 IST 2008 by hgusr2
Thu Feb 7 01:28:01 IST 2008 by hgusr1

For my current need, I need an easier (and automated) merge tool. Once I find one, the use of Mercurial can be extended beyond code management.

By Raju Alluri

Blogging on my personal site since 2006, I try to cover both personal and work related events and thoughts in this blog. You can reach me on Instagram, Facebook or Twitter.

Leave a comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.