简体   繁体   中英

How to get list of files that were affected since a specific revision in 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.

hg stat --rev 3456

hg stat --rev 3456:tip排除未提交的更改

create a file named "mystyle"

changeset = "{files}"
file="{file}\n"

Then hg log --style mystyle --rev 3456:tip | sort | unique hg log --style mystyle --rev 3456:tip | sort | unique

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM