diff mercurial/bookmarks.py @ 14846:5097d8b5078c

bookmarks: add a warning for non empty malformed line
author Pierre-Yves David <pierre-yves.david@logilab.fr>
date Tue, 05 Jul 2011 10:20:27 +0200
parents 677339529a53
children 400ba7cccbae
line wrap: on
line diff
--- a/mercurial/bookmarks.py	Tue Jul 05 10:13:54 2011 +0200
+++ b/mercurial/bookmarks.py	Tue Jul 05 10:20:27 2011 +0200
@@ -28,6 +28,9 @@
         for line in repo.opener('bookmarks'):
             line = line.strip()
             if ' ' not in line:
+                if line:
+                    msg = _('malformed line in .hg/bookmarks: %r\n')
+                    repo.ui.warn( msg % line)
                 continue
             sha, refspec = line.strip().split(' ', 1)
             refspec = encoding.tolocal(refspec)