mirror of
https://github.com/facebook/sapling.git
synced 2024-10-08 07:49:11 +03:00
bookmarks: simplify warning code
This commit is contained in:
parent
1278299c3f
commit
a4528a6eaf
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user