bookmarks: simplify warning code

This commit is contained in:
Matt Mackall 2011-07-06 19:25:56 -05:00
parent 1278299c3f
commit a4528a6eaf

View File

@ -27,10 +27,10 @@ def read(repo):
try:
for line in repo.opener('bookmarks'):
line = line.strip()
if not line:
continue
if ' ' not in line:
if line:
msg = _('malformed line in .hg/bookmarks: %r\n')
repo.ui.warn( msg % line)
repo.ui.warn(_('malformed line in .hg/bookmarks: %r\n') % line)
continue
sha, refspec = line.split(' ', 1)
refspec = encoding.tolocal(refspec)