calling "annotate --show-ids" for an empty file leads to an exception
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Fix Released
|
High
|
Anne Mohsen |
Bug Description
Bazaar version used :
Bazaar (bzr) 1.11dev
from bzr checkout /home/mysql_
revision: 3923
revid: <email address hidden>
branch nick: dev
Steps to reproduce:
bzr init
touch bar
bzr add bar
bzr commit -m bar
bzr annotate --show-ids bar
Traceback (most recent call last):
File "/home/
return run_bzr(argv)
File "/home/
ret = run(*run_argv)
File "/home/
return self.run(
File "/home/
result = func(*args, **kwargs)
File "/home/
show_
File "/home/
return _show_id_
File "/home/
max_origin_len = max(len(origin) for origin, text in annotations)
ValueError: max() arg is an empty sequence
A way to correct it is to add in annotate.py :
--- bzrlib/annotate.py 2008-09-02 01:26:52 +0000
+++ bzrlib/annotate.py 2009-01-06 21:31:53 +0000
@@ -151,6 +151,8 @@
def _show_id_
+ if not annotations:
+ return
last_rev_id = None
max_origin_len = max(len(origin) for origin, text in annotations)
for origin, text in annotations:
Changed in bzr: | |
assignee: | nobody → anne-mohsen |
milestone: | none → 1.12rc1 |
status: | Confirmed → Fix Committed |
Changed in bzr: | |
status: | Fix Committed → Fix Released |
status confirmed
importance high
tags mysql patch
assigned me
-- launchpad. net/~mbp>
Martin <http://