Traceback in bzr difftools plugin when using external merge tool to compare two branches if branches contain symlinks
Elliot Murphy
elliot at canonical.com
Thu Apr 26 22:36:45 BST 2007
On 04/24/2007 05:59 PM, Stephen Ward wrote:
> Hi,
>
> Since several people have had intermittent problems accessing the branch where
> the bzr_difftools plugin was hosted, I have created a new home for it on
> Launchpad ( https://launchpad.net/bzr-difftools ). The new URL for the main
> branch is http://bazaar.launchpad.net/~sward-dev/bzr-difftools/trunk, and the
> Wiki plugins table has been updated to reflect this change.
>
> The old location is still available (and the contents are the same), and I
> expect to maintain both mirrors for a while, so there's no rush to shift to
> the new URL. The tarball download is also still at the old location.
Hi Stephen,
Thanks for registering this on launchpad, and for creating such a useful
plugin! I wasn't able to report a bug against the bzr-difftools project
on launchpad. In order to enable bug reports to be filed I think you
need to tell launchpad that this project is using Malone as the bug
tracker, using the "Define Launchpad usage" link on the left of the
project page. https://launchpad.net/bzr-difftools/+launchpad
Anyway, I ran into a situation where using
'bzr diff --using=meld branch1 branch2'
gives a traceback about calling os.symlink() with a target of None. I've
managed to isolate the situation to symlinks. The problem only occurs
when the branch being compared contains a symlink under version control.
To reproduce the problem I created a very simple bzr branch containing a
single text file, and a symlink pointing to the text file. I then made a
second branch, and committed a change to the text file in the second
branch. Running
'bzr diff branch1 branch2'
shows me the diff as expected, while running
'bzr diff --using=diff branch1 branch2'
gives the traceback.
I'm a bit lost about how to track down why this is happening, but
hopefully there is enough information here for someone more familiar
with the code to see what the problem is. I'd really love to be able to
use this plugin so that I can display the differences between branches
in meld for doing code reviews. I'll paste the full traceback below.
cheers,
-elliot
emurphy at scared@:~/src/mergedemo>bzr diff --using=diff code/ code2/
bzr: ERROR: exceptions.TypeError: coercing to Unicode: need string or
buffer, NoneType found
Traceback (most recent call last):
File "/home/emurphy/src/bzr.dev/bzrlib/commands.py", line 718, in
run_bzr_catch_errors
return run_bzr(argv)
File "/home/emurphy/src/bzr.dev/bzrlib/commands.py", line 679, in run_bzr
ret = run(*run_argv)
File "/home/emurphy/src/bzr.dev/bzrlib/commands.py", line 375, in
run_argv_aliases
return self.run(**all_cmd_args)
File "/home/emurphy/.bazaar/plugins/difftools/__init__.py", line 78,
in run
return Controller().run(*args, **kwargs)
File "/home/emurphy/.bazaar/plugins/difftools/controller.py", line 61,
in run
result = compare_using(tool, file_list)
File "/home/emurphy/.bazaar/plugins/difftools/controller.py", line
150, in compare_using
new_tmp_dir.write_stuff(work_tree2, file_ids2, use_tree)
File "/home/emurphy/.bazaar/plugins/difftools/tempdir.py", line 40, in
write_stuff
self.write_tree(rev_tree, file_id_list)
File "/home/emurphy/.bazaar/plugins/difftools/tempdir.py", line 51, in
write_tree
export.export(rev_tree, self.path, format='dir')
File "/home/emurphy/src/bzr.dev/bzrlib/export/__init__.py", line 95,
in export
return _exporters[format](tree, dest, root)
File "/home/emurphy/src/bzr.dev/bzrlib/export/__init__.py", line 61,
in _loader
return func(tree, dest, root)
File "/home/emurphy/src/bzr.dev/bzrlib/export/dir_exporter.py", line
47, in dir_exporter
ie.put_on_disk(dest, dp, tree)
File "/home/emurphy/src/bzr.dev/bzrlib/inventory.py", line 325, in
put_on_disk
self._put_on_disk(fullpath, tree)
File "/home/emurphy/src/bzr.dev/bzrlib/inventory.py", line 807, in
_put_on_disk
os.symlink(self.symlink_target, fullpath)
TypeError: coercing to Unicode: need string or buffer, NoneType found
bzr 0.16.0dev0 on python 2.5.1.candidate.1 (linux2)
arguments: ['/usr/local/bin/bzr', 'diff', '--using=diff', 'code/', 'code2/']
** please send this report to bazaar at lists.ubuntu.com
More information about the bazaar
mailing list