log --xml does not include author

Bug #618307 reported by Max Kanat-Alexander on 2010-08-15
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
bzr-xmloutput
Medium
Unassigned

Bug Description

Doing "bzr log --xml" on bzr 2.1.1 with xmloutput 0.8.7.dev (today's trunk) does not include the commit's author, only the commit's committer.

Guillermo Gonzalez (verterok) wrote :

Thanks for reporting this.

Yes, the author seems to be ignored.

Changed in bzr-xmloutput:
status: New → Confirmed
importance: Undecided → Medium
Abhay Mujumdar (amujumdar) wrote :

We, at Ohloh, switched to parsing xml logs and are running into this bug. Here is the patch that fixes it.

Guillermo Gonzalez (verterok) wrote :

Hi,

Thanks for working on this!

The patch looks good, but can you add some unittests for it?

Thanks,.

Abhay Mujumdar (amujumdar) wrote :

Thanks! let me look into it.

Abhay Mujumdar (amujumdar) wrote :

How do I run the tests?

Abhay Mujumdar (amujumdar) wrote :
Download full text (4.4 KiB)

Ok, so I installed testtools and tried to run
bzr selftest xmlouput
but got following error.

bzr: ERROR: exceptions.RuntimeError: could not open display

Traceback (most recent call last):
  File "/usr/lib64/python2.4/site-packages/bzrlib/commands.py", line 853, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib64/python2.4/site-packages/bzrlib/commands.py", line 1055, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib64/python2.4/site-packages/bzrlib/commands.py", line 661, in run_argv_aliases
    return self.run_direct(**all_cmd_args)
  File "/usr/lib64/python2.4/site-packages/bzrlib/commands.py", line 665, in run_direct
    return self._operation.run_simple(*args, **kwargs)
  File "/usr/lib64/python2.4/site-packages/bzrlib/cleanup.py", line 121, in run_simple
    return _do_with_cleanups(
  File "/usr/lib64/python2.4/site-packages/bzrlib/cleanup.py", line 156, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/usr/lib64/python2.4/site-packages/bzrlib/builtins.py", line 3575, in run
    result = selftest(**selftest_kwargs)
  File "/usr/lib64/python2.4/site-packages/bzrlib/tests/__init__.py", line 3377, in selftest
    suite = test_suite(keep_only, starting_with)
  File "/usr/lib64/python2.4/site-packages/bzrlib/tests/__init__.py", line 3841, in test_suite
    plugin_suite = plugin.load_plugin_tests(loader)
  File "/usr/lib64/python2.4/site-packages/bzrlib/plugin.py", line 447, in load_plugin_tests
    return loader.loadTestsFromModule(self.module)
  File "/usr/lib64/python2.4/site-packages/bzrlib/tests/TestUtil.py", line 141, in loadTestsFromModule
    return load_tests(basic_tests, module, self)
  File "/usr/lib64/python2.4/site-packages/bzrlib/plugins/gtk/__init__.py", line 207, in load_tests
    basic_tests.addTest(loader.loadTestsFromModuleNames(
  File "/usr/lib64/python2.4/site-packages/bzrlib/tests/TestUtil.py", line 104, in loadTestsFromModuleNames
    result.addTests(self.loadTestsFromModuleName(name))
  File "/usr/lib64/python2.4/site-packages/bzrlib/tests/TestUtil.py", line 111, in loadTestsFromModuleName
    result.addTests(self.loadTestsFromModule(module))
  File "/usr/lib64/python2.4/site-packages/bzrlib/tests/TestUtil.py", line 141, in loadTestsFromModule
    return load_tests(basic_tests, module, self)
  File "/usr/lib64/python2.4/site-packages/bzrlib/plugins/gtk/tests/__init__.py", line 30, in load_tests
    basic_tests.addTest(loader.loadTestsFromModuleNames(
  File "/usr/lib64/python2.4/site-packages/bzrlib/tests/TestUtil.py", line 104, in loadTestsFromModuleNames
    result.addTests(self.loadTestsFromModuleName(name))
  File "/usr/lib64/python2.4/site-packages/bzrlib/tests/TestUtil.py", line 109, in loadTestsFromModuleName
    module = _load_module_by_name(name)
  File "/usr/lib64/python2.4/site-packages/bzrlib/tests/TestUtil.py", line 178, in _load_module_by_name
    module = __import__(mod_name)
  File "/usr/lib64/python2.4/site-packages/bzrlib/plugins/gtk/tests/test_annotate_config.py", line 23, in ?
    from bzrlib.plugins.gtk.annotate import (
  File "/usr/lib64/python2.4/site-packages/bzrlib/plugins/gtk/annotate/config.py", line 19, in ?
    import gtk.gdk
  Fil...

Read more...

Abhay Mujumdar (amujumdar) wrote :
Download full text (5.3 KiB)

I tried to run it in a session with a window and it failed with this error -
Explorer: skip module bzrlib.plugins.explorer.tests.test_test_suite because PyQt4 is not installed
Explorer: skip module bzrlib.plugins.explorer.tests.test_welcome because PyQt4 is not installed
QBzr: skip module bzrlib.plugins.qbzr.lib.tests.test_annotate because PyQt4 is not installed
QBzr: skip module bzrlib.plugins.qbzr.lib.tests.test_cat because PyQt4 is not installed
QBzr: skip module bzrlib.plugins.qbzr.lib.tests.test_commit because PyQt4 is not installed
QBzr: skip module bzrlib.plugins.qbzr.lib.tests.test_log because PyQt4 is not installed
QBzr: skip module bzrlib.plugins.qbzr.lib.tests.test_logmodel because PyQt4 is not installed
QBzr: skip module bzrlib.plugins.qbzr.lib.tests.test_revisionmessagebrowser because PyQt4 is not installed
QBzr: skip module bzrlib.plugins.qbzr.lib.tests.test_spellcheck because PyQt4 is not installed
QBzr: skip module bzrlib.plugins.qbzr.lib.tests.test_subprocess because PyQt4 is not installed
QBzr: skip module bzrlib.plugins.qbzr.lib.tests.test_tree_branch because PyQt4 is not installed
QBzr: skip module bzrlib.plugins.qbzr.lib.tests.test_treewidget because PyQt4 is not installed
QBzr: skip module bzrlib.plugins.qbzr.lib.tests.test_util because PyQt4 is not installed
QBzr: skip module bzrlib.plugins.qbzr.lib.tests.test_decorator because PyQt4 is not installed
bzr: ERROR: exceptions.SyntaxError: invalid syntax (test_info_xml.py, line 44)

Traceback (most recent call last):
  File "/usr/lib64/python2.4/site-packages/bzrlib/commands.py", line 853, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib64/python2.4/site-packages/bzrlib/commands.py", line 1055, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib64/python2.4/site-packages/bzrlib/commands.py", line 661, in run_argv_aliases
    return self.run_direct(**all_cmd_args)
  File "/usr/lib64/python2.4/site-packages/bzrlib/commands.py", line 665, in run_direct
    return self._operation.run_simple(*args, **kwargs)
  File "/usr/lib64/python2.4/site-packages/bzrlib/cleanup.py", line 121, in run_simple
    return _do_with_cleanups(
  File "/usr/lib64/python2.4/site-packages/bzrlib/cleanup.py", line 156, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/usr/lib64/python2.4/site-packages/bzrlib/builtins.py", line 3575, in run
    result = selftest(**selftest_kwargs)
  File "/usr/lib64/python2.4/site-packages/bzrlib/tests/__init__.py", line 3377, in selftest
    suite = test_suite(keep_only, starting_with)
  File "/usr/lib64/python2.4/site-packages/bzrlib/tests/__init__.py", line 3841, in test_suite
    plugin_suite = plugin.load_plugin_tests(loader)
  File "/usr/lib64/python2.4/site-packages/bzrlib/plugin.py", line 447, in load_plugin_tests
    return loader.loadTestsFromModule(self.module)
  File "/usr/lib64/python2.4/site-packages/bzrlib/tests/TestUtil.py", line 141, in loadTestsFromModule
    return load_tests(basic_tests, module, self)
  File "/home/amujumdar/.bazaar/plugins/xmloutput/__init__.py", line 66, in load_tests
    basic_tests.addTest(loader.loadTestsFromModuleNames(
  File "/usr/lib64/python2.4/site-packages/bzrlib/tests/T...

Read more...

Abhay Mujumdar (amujumdar) wrote :

I don't know if this test works but the patch with a test is attached.

Abhay Mujumdar (amujumdar) wrote :

Here is an updated patch. Previous patch emitted committer name when no author was specified.
Same test is included in this patch but I still cannot run tests, so not sure if the test works.

Brian de Alwis (slyguy) wrote :

Abhay, plugins are under 'bzrlib.plugins.X'. So I think you can run the tests with:

bzr selftest bzrlib.plugins.xmlouput

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Related questions