开发者

How do you search across multiple mercurial repositories

I'm setting up multiple Mercuria开发者_运维知识库l repositories for all of our different projects, probably close to 50. Is there a way to search across multiple repos for a specific file or string? For example, say that a database column is renamed, how would I search each repository for any reference to the old column name? I know that I can do this for each repository individually, but if you've got 50 repositories, that can be quite time consuming?

If it's not possible, are there any best practices then for structuring your repositories to minimize this pain?


It's not possible -- repositories are entirely independent.

If you wanted to set up a global search one way to do it would be to push all your 50 repositories into a single repository that can be searched. Something like this:

hg init everything
for therepo in /path/to/repos/* ; do
   hg -R everything pull -f $therepo
done

Then you can search in everything. You could keep everything current using a cron job or changegroup hooks on your other repos that do a push to everything.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜