From fb99c719390196e35c27f30f875c1b796c307585 Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Wed, 25 Sep 2013 11:09:34 +0900 Subject: [PATCH 1/2] Sync: Print name of manifest server used for smart sync/smart tag When syncing using smart sync or smart tag mode, print the url of the manifest server that is being used. This is useful in organisations that have multiple manifest servers used in different manifest branches. Change-Id: Ib5bc2de5af6f4a942d0ef735c65cbc0721059a61 --- subcmds/sync.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/subcmds/sync.py b/subcmds/sync.py index 002d05f0..fcc6641f 100644 --- a/subcmds/sync.py +++ b/subcmds/sync.py @@ -496,6 +496,8 @@ later is required to fix a server side protocol bug. sys.exit(1) manifest_server = self.manifest.manifest_server + if not opt.quiet: + print('Using manifest server %s' % manifest_server) if not '@' in manifest_server: username = None From 351fe2c793437e1d8a0b222f8478c74cf60ae034 Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Wed, 25 Sep 2013 17:54:26 +0900 Subject: [PATCH 2/2] Sync: Improved error message when manifest server RPC call fails When the RPC call fails, the error message returned by the server is printed, but it is not obvious that this is caused by RPC call failure. Prefix the error message with a descriptive message that explains what went wrong. Change-Id: I4b77af22aacc2e9843c4df9d06bf54e41d9692ff --- subcmds/sync.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/subcmds/sync.py b/subcmds/sync.py index fcc6641f..e9d52b7b 100644 --- a/subcmds/sync.py +++ b/subcmds/sync.py @@ -566,7 +566,8 @@ later is required to fix a server side protocol bug. sys.exit(1) self._ReloadManifest(manifest_name) else: - print('error: %s' % manifest_str, file=sys.stderr) + print('error: manifest server RPC call failed: %s' % + manifest_str, file=sys.stderr) sys.exit(1) except (socket.error, IOError, xmlrpc.client.Fault) as e: print('error: cannot connect to manifest server %s:\n%s'