[Pkg-bazaar-maint] Bug#600191: bzr-git: Generation of Git-like diff doesn't work

Jonathan Ballet jon at multani.info
Thu Oct 14 13:40:06 UTC 2010


Package: bzr-git
Version: 0.5.2-1
Severity: normal

Hello,

I'm trying to generate a Git-like diff from a Bzr changeset, but I got
the following traceback:

$  bzr diff -c 141 --format=git
diff --git a/spydaap/server.py b/spydaap/server.py
index 157ac5f..20b263f 100644
bzr: ERROR: exceptions.AttributeError: 'DiffWriter' object has no attribute 'writelines'

Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 911, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 1111, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/bzrtools/command.py", line 22, in run_argv_aliases
    commands.Command.run_argv_aliases(self, argv, alias_argv)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 689, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 704, in run
    return self._operation.run_simple(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/cleanup.py", line 135, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/cleanup.py", line 165, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/bzrtools/command_classes.py", line 526, in run
    colordiff(color, check_style, *args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/bzrtools/colordiff.py", line 203, in colordiff
    get_cmd_object('diff').run(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 704, in run
    return self._operation.run_simple(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/cleanup.py", line 135, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/cleanup.py", line 165, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 1126, in ignore_pipe
    result = func(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/builtins.py", line 1982, in run
    format_cls=format)
  File "/usr/lib/python2.6/dist-packages/bzrlib/diff.py", line 493, in show_diff_trees
    return differ.show_diff(specific_files, extra_trees)
  File "/usr/lib/python2.6/dist-packages/bzrlib/diff.py", line 942, in show_diff
    return self._show_diff(specific_files, extra_trees)
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/git/send.py", line 106, in _show_diff
    (path_encoded[1], mode[1], contents[1]))
  File "/usr/lib/pymodules/python2.6/dulwich/patch.py", line 143, in write_blob_diff
    f.writelines(unified_diff(old_contents, new_contents,
AttributeError: 'DiffWriter' object has no attribute 'writelines'

bzr 2.2.0 on python 2.6.6 (Linux-2.6.32-5-amd64-x86_64-with-debian-squeeze-sid)
arguments: ['/usr/bin/bzr', 'diff', '-c', '141', '--format=git']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'fr_FR.UTF-8'
plugins:
  bash_completion      /usr/lib/python2.6/dist-packages/bzrlib/plugins/bash_completion [2.2.0]
  bzrtools             /usr/lib/python2.6/dist-packages/bzrlib/plugins/bzrtools [2.2.0]
  dbus                 /usr/lib/python2.6/dist-packages/bzrlib/plugins/dbus [0.1.0dev]
  git                  /usr/lib/python2.6/dist-packages/bzrlib/plugins/git [0.5.2]
  gtk                  /usr/lib/python2.6/dist-packages/bzrlib/plugins/gtk [0.99.0]
  launchpad            /usr/lib/python2.6/dist-packages/bzrlib/plugins/launchpad [2.2.0]
  netrc_credential_store /usr/lib/python2.6/dist-packages/bzrlib/plugins/netrc_credential_store [2.2.0]
  news_merge           /usr/lib/python2.6/dist-packages/bzrlib/plugins/news_merge [2.2.0]
  qbzr                 /usr/lib/python2.6/dist-packages/bzrlib/plugins/qbzr [0.19.0]

*** Bazaar has encountered an internal error.  This probably indicates a
    bug in Bazaar.  You can help us fix it by filing a bug report at
        https://bugs.launchpad.net/bzr/+filebug
    including this traceback and a description of the problem.

Generating the diff with the default format works.

Thanks,

 Jonathan

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (101, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages bzr-git depends on:
ii  bzr                          2.2.0-1     easy to use distributed version co
ii  python                       2.6.6-3     interactive high-level object-orie
ii  python-central               0.6.16+nmu1 register and build utility for Pyt
ii  python-dulwich               0.6.1-1     Pure-python Git library

Versions of packages bzr-git recommends:
ii  python-tdb                    1.2.1-2+b1 Python bindings for TDB

bzr-git suggests no packages.

-- no debconf information





More information about the Pkg-bazaar-maint mailing list