[MERGE] workaround for bug #81689: give a proper error message instead of traceback when symlink cannot be created (e.g. on Windows)

Aaron Bentley aaron.bentley at utoronto.ca
Thu Nov 22 13:09:29 GMT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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.

> 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()

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHRX+J0F+nu1YWqI0RAhRyAJ4mZ3ANIMzoD0OYd+VMDdzTsVkJoQCdGvgn
RYLPGzF1GAzlofV2DohESi4=
=rxia
-----END PGP SIGNATURE-----



More information about the bazaar mailing list