[PATCH 2 of 2] bookmarks: Add a warning for non empty malformated line
Kevin Bullock
kbullock+mercurial at ringworld.org
Tue Jul 5 14:44:18 CDT 2011
On Jul 5, 2011, at 4:51 AM, pierre-yves.david at logilab.fr wrote:
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david at logilab.fr>
> # Date 1309854027 -7200
> # Branch stable
> # Node ID bc187cbdf4efb51f7ee83df798aa679c9aff0d2d
> # Parent a59f9d94beba02c92c7c37b7c0d8034873fca580
> bookmarks: Add a warning for non empty malformated line.
'malformed'
> diff --git a/mercurial/bookmarks.py b/mercurial/bookmarks.py
> --- a/mercurial/bookmarks.py
> +++ b/mercurial/bookmarks.py
> @@ -26,10 +26,13 @@ def read(repo):
> bookmarks = {}
> try:
> for line in repo.opener('bookmarks'):
> line = line.strip()
> if ' ' not in line:
> + if line:
> + msg = _('malformated line in .hg/bookmarks: %r\n')
> + repo.ui.warn( msg % line)
Here too: 'malformed'. Also does this really need to be two lines (and an extra local var)?
pacem in terris / mir / shanti / salaam / heiwa
Kevin R. Bullock
More information about the Mercurial-devel
mailing list