Chromium Code Reviews| Index: gclient.py |
| diff --git a/gclient.py b/gclient.py |
| index 86b742f594ed7252674207cd286ecd5f06fca115..86fb026ce93e6baa2d97d6c76b4ff674ee250417 100755 |
| --- a/gclient.py |
| +++ b/gclient.py |
| @@ -1220,6 +1220,25 @@ solutions = [ |
| """ |
| if not self.dependencies: |
| raise gclient_utils.Error('No solution specified') |
| + |
| + for dep in self.dependencies: |
| + if dep.managed: |
| + scm = gclient_scm.CreateSCM(dep.url, self.root_dir, dep.name) |
| + if not scm.DoesRemoteURLMatch(): |
| + actual_url = scm.GetActualRemoteURL() |
| + raise gclient_utils.Error(''' |
| +Your .gclient file seems to be broken. The requested URL is different from what |
| +is actually checked out in %s: |
| + |
| +Expected: %s |
| +Actual: %s |
|
iannucci
2014/03/13 18:27:27
I would also list the SCM which we would have sele
borenet
2014/03/13 18:57:25
Done.
|
| + |
| +If you're managing your own git checkout in %s but the URL in .gclient is for |
| +an svn repository, you probably want to set 'managed': False in .gclient. |
|
iannucci
2014/03/13 18:27:27
do we also want to advise that they correct the ur
borenet
2014/03/13 18:57:25
Sure, but the URL doesn't matter in unmanaged mode
|
| +Otherwise, you should ensure that the URL listed in .gclient is correct and |
| +either change it or fix the checkout. |
| +''' % (os.path.join(self.root_dir, dep.name), dep.url, actual_url, dep.name)) |
| + |
| revision_overrides = {} |
| # It's unnecessary to check for revision overrides for 'recurse'. |
| # Save a few seconds by not calling _EnforceRevisions() in that case. |
| @@ -1694,6 +1713,7 @@ def CMDsync(parser, args): |
| # Print out the .gclient file. This is longer than if we just printed the |
| # client dict, but more legible, and it might contain helpful comments. |
| print(client.config_content) |
| + |
| ret = client.RunOnDeps('update', args) |
| if options.output_json: |
| slns = {} |