Fix: Missing spaces in printed messages

Several messages are printed with the `print` method and the message
is split across two lines, i.e.:

 print('This is a message split'
       'across two source code lines')

Which causes the message to be printed as:

 This is a message splitacross two source code lines

Add a space at the end of the first line before the line break:

 print('This is a message split '
       'across two source code lines'

Also correct a minor spelling mistake.

Change-Id: Ib98d93fcfb98d78f48025fcc428b6661380cff79
This commit is contained in:
David Pursehouse 2013-03-05 17:26:46 +09:00
parent 45d21685b9
commit 2f9e7e40c4
5 changed files with 7 additions and 7 deletions

View File

@ -81,7 +81,7 @@ change id will be added.
sys.exit(1) sys.exit(1)
else: else:
print('NOTE: When committing (please see above) and editing the commit' print('NOTE: When committing (please see above) and editing the commit '
'message, please remove the old Change-Id-line and add:') 'message, please remove the old Change-Id-line and add:')
print(self._GetReference(sha1), file=sys.stderr) print(self._GetReference(sha1), file=sys.stderr)
print(file=sys.stderr) print(file=sys.stderr)

View File

@ -49,7 +49,7 @@ Displays detailed usage information about a command.
except AttributeError: except AttributeError:
summary = '' summary = ''
print(fmt % (name, summary)) print(fmt % (name, summary))
print("See 'repo help <command>' for more information on a" print("See 'repo help <command>' for more information on a "
'specific command.') 'specific command.')
def _PrintCommonCommands(self): def _PrintCommonCommands(self):

View File

@ -68,7 +68,7 @@ branch but need to incorporate new upstream changes "underneath" them.
cb = project.CurrentBranch cb = project.CurrentBranch
if not cb: if not cb:
if one_project: if one_project:
print("error: project %s has a detatched HEAD" % project.relpath, print("error: project %s has a detached HEAD" % project.relpath,
file=sys.stderr) file=sys.stderr)
return -1 return -1
# ignore branches with detatched HEADs # ignore branches with detatched HEADs

View File

@ -406,7 +406,7 @@ later is required to fix a server side protocol bug.
groups = None) groups = None)
if project.IsDirty(): if project.IsDirty():
print('error: Cannot remove project "%s": uncommitted changes' print('error: Cannot remove project "%s": uncommitted changes '
'are present' % project.relpath, file=sys.stderr) 'are present' % project.relpath, file=sys.stderr)
print(' commit changes, then run sync again', print(' commit changes, then run sync again',
file=sys.stderr) file=sys.stderr)
@ -466,7 +466,7 @@ later is required to fix a server side protocol bug.
if opt.smart_sync or opt.smart_tag: if opt.smart_sync or opt.smart_tag:
if not self.manifest.manifest_server: if not self.manifest.manifest_server:
print('error: cannot smart sync: no manifest server defined in' print('error: cannot smart sync: no manifest server defined in '
'manifest', file=sys.stderr) 'manifest', file=sys.stderr)
sys.exit(1) sys.exit(1)

View File

@ -27,11 +27,11 @@ UNUSUAL_COMMIT_THRESHOLD = 5
def _ConfirmManyUploads(multiple_branches=False): def _ConfirmManyUploads(multiple_branches=False):
if multiple_branches: if multiple_branches:
print('ATTENTION: One or more branches has an unusually high number' print('ATTENTION: One or more branches has an unusually high number '
'of commits.') 'of commits.')
else: else:
print('ATTENTION: You are uploading an unusually high number of commits.') print('ATTENTION: You are uploading an unusually high number of commits.')
print('YOU PROBABLY DO NOT MEAN TO DO THIS. (Did you rebase across' print('YOU PROBABLY DO NOT MEAN TO DO THIS. (Did you rebase across '
'branches?)') 'branches?)')
answer = raw_input("If you are sure you intend to do this, type 'yes': ").strip() answer = raw_input("If you are sure you intend to do this, type 'yes': ").strip()
return answer == "yes" return answer == "yes"