Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mercurial: diffs in a particular changeset?

Tags:

mercurial

This is almost exactly a duplicate of Examining a single changeset in Mercurial, and without doubt a duplicate of another question I can't find on SO through Google alone.

I'm looking back through a Mercurial repo, and I want to see what exactly changed between two revisions (let's say 2580 and 2581):

hg log -v -r 2581  

gives me all the files that changed.

How can I also see the diffs of these files?

Thanks.

like image 785
AP257 Avatar asked Mar 21 '11 10:03

AP257


People also ask

What is mercurial changeset?

A changeset (sometimes abbreviated "cset") is an atomic collection of changes to files in a repository. It contains all recorded local modification that lead to a new revision of the repository. A changeset is identified uniquely by a changeset ID. In a single repository, you can identify it using a revision number.

How do I revert a changeset in Mercurial?

Revert changes already committed To backout a specific changeset use hg backout -r CHANGESET . This will prompt you directly with a request for the commit message to use in the backout. To revert a file to a specific changeset, use hg revert -r CHANGESET FILENAME . This will revert the file without committing it.


2 Answers

Revision 2580 isn't necessasrily the parent revision of 2581. It's easy to check if it is, of course, but easier yet is to just do:

hg log -p -r 2581 

That compares 2581 to its (first) parent revision no matter what it is, and most clearly encompasses the answer to the question "what the hell did 2581 do?"

like image 83
Ry4an Brase Avatar answered Sep 21 '22 12:09

Ry4an Brase


Try hg diff -r 2580 -r 2581.

like image 25
vissi Avatar answered Sep 24 '22 12:09

vissi