[MERGE] workaround for bug #81689: give a proper error message instead of traceback when symlink cannot be created (e.g. on Windows)
Alexander Belchenko
bialix at ukr.net
Fri Nov 23 08:36:33 GMT 2007
Aaron Bentley пишет:
> Alexander Belchenko wrote:
>> With this patch checkout operation stops with message:
>> bzr: ERROR: Unable to create symlink on this platform
>
> Looks good.
>
> It would be nice if it also showed the path. You can get that with
> FinalPaths(self).get_path(trans_id). This will not work if the parent
> directory has no path, and that will raise a KeyError.
Done.
>> If you think it needs the test, then please suggest how to write
>> one. Because I'm not quite understand how to manually create
>> branch w/o working tree but with inventory that contains symlink
>> entry.
>
> Since you're testing the symlink machinery, I don't think you need to go
> that far. Just:
>
> wt = self.make_branch_and_tree()
> tt = TreeTransform(wt)
> tt.new_symlink('foo', tt.root, 'bar')
> tt.apply()
Thanks for example. New patch with tests attached.
Alexander
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: win32.symlink.workaround.patch
Url: https://lists.ubuntu.com/archives/bazaar/attachments/20071123/04ac6007/attachment.diff
More information about the bazaar
mailing list