[MERGE] fix "bzr merge --preview" for merges that change symlinks

James Henstridge james at jamesh.id.au
Fri Feb 22 00:55:47 GMT 2008


If a merge will add or change a symlink, the new "bzr merge --preview"
will fail with an exception like the following:

Traceback (most recent call last):
  File "bzrlib/commands.py", line 834, in run_bzr_catch_errors
  File "bzrlib/commands.py", line 790, in run_bzr
  File "bzrlib/commands.py", line 492, in run_argv_aliases
  File "/home/james/src/bzr.dev/bzrlib/builtins.py", line 2866, in run
    return self._do_preview(merger)
  File "/home/james/src/bzr.dev/bzrlib/builtins.py", line 2881, in _do_preview
    old_label='', new_label='')
  File "bzrlib/diff.py", line 505, in show_diff_trees
  File "bzrlib/diff.py", line 925, in show_diff
  File "bzrlib/diff.py", line 975, in _show_diff
  File "bzrlib/diff.py", line 998, in diff
  File "bzrlib/diff.py", line 585, in _diff_many
  File "bzrlib/diff.py", line 662, in diff
AttributeError: '_PreviewTree' object has no attribute 'get_symlink_target'

The attached bundle adds the missing method, which seems to fix the problem.

James.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: preview-symlinks.patch
Type: text/x-patch
Size: 4694 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20080222/009545ad/attachment.bin 


More information about the bazaar mailing list