bzr log fails with "Invalid line in bugs property"

Bug #1094180 reported by Glenn Morris
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
High
Unassigned
Breezy
Fix Released
High
Jelmer Vernooij

Bug Description

Hi (help!)

My copy of the emacs-24 branch of the Emacs repository (and I fear, everyone else's copy as well) has started
throwing an error on `bzr log':

bzr: ERROR: Invalid line in bugs property: 'http://debbugs.gnu.org/13285'

(that is the only output).

You can see the branch at
http://bzr.savannah.gnu.org/lh/emacs/emacs-24/files

This is on an up-to-date Debian testing system, using
  Bazaar (bzr) 2.6.0dev2
  Python interpreter: /usr/bin/python 2.7.3rc2
  Python standard library: /usr/lib/python2.7

The .bzr.log entry is:

Thu 2012-12-27 18:59:14 -0800
0.031 bazaar version: 2.6.0dev2
0.032 bzr arguments: [u'log']
0.034 looking for plugins in /home/gm/.bazaar/plugins
0.035 looking for plugins in /usr/lib/python2.7/dist-packages/bzrlib/plugins
0.047 encoding stdout as sys.stdout encoding 'UTF-8'
0.061 encoding stdout as sys.stdout encoding 'UTF-8'
0.079 Transferred: 0kB (0.0kB/s r:0kB w:0kB)
0.081 Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 930, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 1141, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 673, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 697, in run
    return self._operation.run_simple(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/cleanup.py", line 136, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/cleanup.py", line 166, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 1158, in ignore_pipe
    result = func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/builtins.py", line 2895, in run
    Logger(b, rqst).show(lf)
  File "/usr/lib/python2.7/dist-packages/bzrlib/log.py", line 382, in show
    self._show_body(lf)
  File "/usr/lib/python2.7/dist-packages/bzrlib/log.py", line 411, in _show_body
    for lr in generator.iter_log_revisions():
  File "/usr/lib/python2.7/dist-packages/bzrlib/log.py", line 451, in iter_log_revisions
    for revs in revision_iterator:
  File "/usr/lib/python2.7/dist-packages/bzrlib/log.py", line 872, in _filter_re
    new_revs = [rev for rev in revs if _match_filter(searchRE, rev[1])]
  File "/usr/lib/python2.7/dist-packages/bzrlib/log.py", line 881, in _match_filter
    'bugs': list(rev.iter_bugs())
  File "/usr/lib/python2.7/dist-packages/bzrlib/revision.py", line 151, in iter_bugs
    raise errors.InvalidLineInBugsProperty(line)
InvalidLineInBugsProperty: Invalid line in bugs property: 'http://debbugs.gnu.org/13285'

0.081 return code 3

I did recently make a commit that was supposed to fix bug #13285:
http://lists.gnu.org/archive/html/emacs-diffs/2012-12/msg00409.html

I don't see that I did anything wrong there (and if I did, surely I should have not been able to commit).

bzr log -r111083 fails as described, but -r111082, and -r111084 work fine.
Plain bzr log and bzr log --limit 1 fail.

Here is the .bzr.log entry for the commit:

Thu 2012-12-27 09:56:17 -0800
0.029 bazaar version: 2.6.0dev2
0.029 bzr arguments: [u'commit', u'-m', u"Backport gnus-msg fix from trunk\n\n* lisp/gnus/gnus-msg.el (gnus-summary-resend-message):\nDon't bug out on non-string posting styles.\n", u'--fixes', u'debbugs:13285\n ', u'--author', u'Lars Ingebrigtsen <email address hidden>', u'ChangeLog', u'gnus-msg.el']
0.032 looking for plugins in /home/gm/.bazaar/plugins
0.032 looking for plugins in /usr/lib/python2.7/dist-packages/bzrlib/plugins
0.045 encoding stdout as osutils.get_user_encoding() 'utf-8'
0.094 opening working tree '/misc/emacs/bzr/emacs24-merge'
0.110 preparing to commit
0.133 ssh implementation is OpenSSH
[ 6354] 2012-12-27 09:56:20.952 INFO: Committing to: bzr+ssh://<email address hidden>/emacs/emacs-24/
2.954 Selecting files for commit with filter [u'lisp/gnus/ChangeLog', u'lisp/gnus/gnus-msg.el']
[ 6354] 2012-12-27 09:56:21.038 INFO: modified lisp/gnus/ChangeLog
[ 6354] 2012-12-27 09:56:21.063 INFO: modified lisp/gnus/gnus-msg.el
4.739 Using fetch logic to copy between CHKInventoryRepository('file:///misc/emacs/bzr/.bzr/repository/')(RepositoryFormat2a()) and RemoteRepository(bzr+ssh://<email address hidden>/emacs/.bzr/)(RemoteRepositoryFormat(_network_name='Bazaar repository format 2a (needs bzr 1.16 or later)\n'))
4.739 fetching: <SearchResult search:(set(['<email address hidden>']), ['<email address hidden>', '<email address hidden>', '<email address hidden>', '<email address hidden>', '<email address hidden>', ...], 1)>
[ 6354] 2012-12-27 09:56:30.927 INFO: Committed revision 111083.
12.929 Committed revid <email address hidden> as revno 111083.
13.127 return code 0

As the commit message suggests, this was a change that had been previously made on the trunk branch.

Here is the relevant piece of my bazaar.conf:

bugtracker_debbugs_url = http://debbugs.gnu.org/{id}

TIA for any help!

Related branches

Revision history for this message
Glenn Morris (rgm+lp) wrote :

Oh, it looks like a newline somehow got into the --fixes argument:

mkdir /tmp/foo
cd /tmp/foo
bzr init
touch 1
bzr add
bzr commit -m "commit" --fixes debbugs:123
bzr log # fine
echo foo >> 1
## Use ctr-l-q ctrl-j to get a literal newline in the fixes argument:
bzr commit -m "commit" --fixes 'debbugs:124
'
## commit succeeds fine, but:
bzr log
bzr: ERROR: Invalid line in bugs property: 'http://debbugs.gnu.org/124'

How can I recover from this?

Revision history for this message
Glenn Morris (rgm+lp) wrote :

For the record, I worked around this by using uncommit to remove the problematic commit.

It seems to me that bzr commit should have sanity-checked the --fixes argument and rejected it.

Also, it seems poor that an error in a single fixes: entry renders "bzr log" unusable.
Wouldn't it be better to just say:

Fixes: INTERNAL ERROR

or somesuch, but still produce the rest of the log?

Revision history for this message
Vincent Ladeuil (vila) wrote :

> It seems to me that bzr commit should have sanity-checked the --fixes argument and rejected it.

I agree.

> Also, it seems poor that an error in a single fixes: entry renders "bzr log" unusable.

I agree too. Both are worth fixing.

Changed in bzr:
status: New → Confirmed
importance: Undecided → High
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
Jelmer Vernooij (jelmer)
tags: removed: check-for-breezy
Changed in brz:
status: New → Triaged
importance: Undecided → High
Jelmer Vernooij (jelmer)
Changed in brz:
assignee: nobody → Jelmer Vernooij (jelmer)
status: Triaged → Fix Committed
milestone: none → 3.0.0
Jelmer Vernooij (jelmer)
Changed in brz:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.