list of changed files in mercurial logs

August 16, 2010

For roughly 16 months I have now been using the distributed version control system (DVCS) mercurial. Before that I was using mostly subversion which was a great companion before I got to know mercurial and started to understand the idea behind a DVCS (for a nice introduction see http://betterexplained.com/articles/intro-to-distributed-version-control-illustrated/, or Linus Torvalds tech talk on git). The switch itself was very easy and I really do not want to go back to a centralized version control system, unless I have to.

When issuing the command hg log one gets some basic information about the changes that were made:

changeset:   15:299410f8be85
user:        martin
date:        Thu Jun 10 23:30:29 2010 +0200
summary:     started to work on the highscore
 
changeset:   14:c99d4f7cb0c2
user:        martin
date:        Sun Jun 06 01:35:38 2010 +0200
summary:     smaller fixes in the documentation
 
[...]

However sometimes it is quite helpful to know which files were changed during a commit (for example if you want to know which files might be the culprit for failing tests that used to pass). After a long search I found the simple solution: hg log -v. This produces the following output:

changeset:   15:299410f8be85
user:        martin
date:        Thu Jun 10 23:30:29 2010 +0200
files:       asteroids/AsteroidsEnums.h asteroids/AsteroidsEvents.h asteroids/MenuOverlay.h asteroids/Model.cc asteroids/Model.h asteroids/UserInterface.cc asteroids/UserInterface.h asteroids/View.cc engine/Engine.h
description:
started to work on the highscore
 
changeset:   14:c99d4f7cb0c2
user:        martin
date:        Sun Jun 06 01:35:38 2010 +0200
files:       Doxyfile asteroids/AsteroidsEnums.h
description:
smaller fixes in the documentation
 
[...]

Yay!