0

I would like to view from the commandline what was changed in given Mercurial commit similar to what one would see from hg status or from the TortoiseHg tool. The closest I can seem to get is hg log --stat but that prints extra symbols (i.e. pluses and minuses) and I cannot specify at which specific revision I want to look.

I need this because I have developers who have check-in comments like "." or ",". >:-(

Gangnus
  • 24,044
  • 16
  • 90
  • 149
Sled
  • 18,541
  • 27
  • 119
  • 168
  • What kind of information are you after? It's not too obvious from the description. – Jon Oct 29 '12 at 19:55
  • The kind of information that `hg status` gives, but for past revisions... and then I discovered that `hg status` can do historical information as well. Unfortunately, I had already posted this question and had waste quite some time playing with values from `hg log`. – Sled Oct 29 '12 at 20:00

2 Answers2

1

It turns out that hg status has a --change argument where you can pass the revision number (e.g. 109), relative revision (ie -1 is last commit, -2 is second-last, etc), or the hash of the revision to it and it will print out the changes (i.e. additions, removals, and modification) that revision had.

--change isolates that revision and shows just from that revision, but replacing --change with --rev shows the cumulative effect since that revision to the current state.

Sled
  • 18,541
  • 27
  • 119
  • 168
0
hg log -v -r <changeset>

changeset:   563:af4d66e2bc6e
tag:         tip
user:        David M. Carr <****>
date:        Fri Oct 26 22:46:02 2012 -0400
files:       hggit/gitrepo.py tests/test-pull.t
description:
pull: don't pull tags as bookmarks

or, using templates, something like

hg log -r tip --template "{node|short} - files: {files}\n"

with output

af4d66e2bc6e - files: hggit/gitrepo.py tests/test-pull.t
Lazy Badger
  • 94,711
  • 9
  • 78
  • 110