Bala Sundar
Bala Sundar

Reputation: 71

How to get the list of all files in all branches?

Is there any way to get the list of all files (say all js or all css files) in my repo across ALL THE BRANCHES.

For example:

In my 'default' branch, i might not have a file named file1.js.
But in another branch named 'NEW_BRANCH', file1.js may exists.

I wanted to get the list of all files from one place or one command.

Upvotes: 3

Views: 78

Answers (2)

planetmaker
planetmaker

Reputation: 6044

What about getting all files from all revisions including those still present, renamed and deleted?

hg manifest --all

If you only want files from the top of all branches (thus heads, then we iterate over all named and unnamed branches), you'll have to resort to some bash or similar, e.g.

for h in $(hg heads -T"{rev}\n"); do hg ma -r$h; done | sort | uniq

Upvotes: 3

aflp91
aflp91

Reputation: 673

Some thing as?:

for b in `hg branches|cut -d ' ' -f 1` ; do echo "${b}: " ; hg manifest -r "branch(${b})"|grep ".css" ; echo

Upvotes: 1

Related Questions