Let's say I have around 10 hg repositories cloned in a parent directory (let's call it "parent"). Is there any way I can invoke a mercurial command like hg status on all of the sub-directories rather than performing the laborious act of cding into each directory and then invoking hg status?
I did try out the good old xargs but for some reason it fails to work. The commands which I used are:
find . -maxdepth 1 -type d -print | xargs -t "hg status"
and
ls | xargs -t "hg status"
Update: the solution was to use explicit nameholders when using xargs. Something like:
ls | xargs -t -I {} hg status {}
