Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get list of files that were affected since a specific revision in Mercurial

Tags:

mercurial

How do I get a list of all files affected in a changeset since rev 3456?

Note: I tried hg log --rev 3456:tip --template "{files}"\n but there are several problems

  1. If a changeset affects multiple files, they all appear on the same line.
  2. This also shows the same file multiple times if a file was involved in many changsets.
like image 834
Sylvain Avatar asked Feb 15 '11 18:02

Sylvain


People also ask

How to untrack files in hg?

Once you decide that a file no longer belongs in your repository, use the hg remove command. This deletes the file, and tells Mercurial to stop tracking it (which will occur at the next commit). A removed file is represented in the output of hg status with a “ R ”.

How do I revert a file in Mercurial?

To revert a file to a specific changeset, use hg revert -r CHANGESET FILENAME . This will revert the file without committing it.

What is hg status?

hg status shows the status of a repository. Files are stored in a project's working directory (which users see), and the local repository (where committed snapshots are permanently recorded). hg add tells Mercurial to track files. hg commit creates a snapshot of the changes to 1 or more files in the local repository.


2 Answers

hg stat --rev 3456

hg stat --rev 3456:tip to exclude uncommitted changes

like image 148
robert Avatar answered Sep 29 '22 22:09

robert


There's a previous question that covers the same issue, with the added restriction that the search be restricted to files belonging to 'myself.' You can simply remove the '--user' and it should do what you need.

like image 21
Sniggerfardimungus Avatar answered Sep 29 '22 20:09

Sniggerfardimungus