Mercurial commandline: How to show changes of a specific revision?
Asked Answered
B

3

20

After I pull a new head into my repository, I want to see what files are touched by the new head. Like an hg status but without changing over to it. I don't want the whole diff, just an overview.

Which I expect is a specific version of the more general question: how do i see a summary of the changes in a specific revision?

This is on the commandline, I don't want to fire up TortoiseHG or some other GUI.

Ballplayer answered 25/1, 2011 at 0:45 Comment(1)
related to the title: to see changes (the patch) that correspond to a given revision: hg log --patch -r REVTopheavy
C
18

The status command shows you which files are changed. Use

hg status --rev .:tip

to compare the working copy parent revision (the currently checked out revision) with the tip revision.

If you've pulled more than one changeset, then this is different from

hg status --change tip

That command only shows the files touched by the tip changeset — not the combined changes between the currently checked out changeset (.) and tip.

Czardom answered 25/1, 2011 at 12:45 Comment(0)
S
16

Use the --change option to hg status, passing it the revision you're curious about. For instance,

hg status --change tip

lists the files changed in tip. I believe this flag was added in hg 1.7.

Sleigh answered 25/1, 2011 at 0:49 Comment(1)
Great! This also works for the hg diff, for example hg status --change 123Atiptoe
B
11

Lol. Amazing how forcing myself to ask the question makes me realise where best to look.

hg diff -r11 --stat

The --stat seems to get me what I'm after.

Ballplayer answered 25/1, 2011 at 0:47 Comment(1)
Sometimes, you just have to think 'out loud' :) +1, you should accept this when the system allows you to do so.Marley

© 2022 - 2024 — McMap. All rights reserved.