2

I'm using Eclipse with the MercurialEclipse extension to use the Mercurial SCM.

I have lots of projects and every morning I want to pull all latest changes before starting to work. With SVN or CVS I could simply select all projects and click Team/Update. But the Team/Pull command of MercurialEclipse is disabled when multiple projects are selected.

So currently I have to call Team/Pull on each project separately. That's really annoying. How can I pull changes for multiple projects in one go?

kayahr
  • 20,913
  • 29
  • 99
  • 147

3 Answers3

2

I would rather use an external script than trying to do it directly from Eclipse.

See for instance:

Then a simple refresh in your Eclipse environment would be enough.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
2

You could highlight them all, right click, and choose synchronize. You could then pull from this view if desired (plus it will show you changes).

asdf
  • 21
  • 1
0

One not-quite-what-was-intended solution would be to make each a subrepo of of parent repository. Something with a .hgsub file of:

project1 = project1
project2 = project2
...

would be enough for 'hg pull' in the top level to do a pull in all of them.

You're probably better off just scripting it though. I don't know what eclipse offers for scripting but from the unix command line that would be:

for therepo in $(find /my/project/root -type -d -name .hg) ; do
  hg --repository ${therepo%.hg} pull
done
Ry4an Brase
  • 78,112
  • 7
  • 148
  • 169
  • Subrepositories wont work since they are pulled in as needed when you do `hg update` in the outer repository, not when you do `hg pull` there. Also, someone would have to do `hg pull` in each subrepo like you suggest and then commit the changed `.hgsubstate` file in the main repo. – Martin Geisler Sep 09 '11 at 08:07