[RFC/MERGE][Bug #243998] has_workingtree should work on remote BzrDirs
Gary van der Merwe
garyvdm at gmail.com
Mon Feb 9 02:05:36 GMT 2009
On Mon, Feb 9, 2009 at 1:37 AM, Daniel Watkins
<daniel at daniel-watkins.co.uk> wrote:
> Hello all,
>
> Currently, has_workingtree behaves slightly oddly. On a local BzrDir,
> it will return True if there is a WT and False if there is not (this is
> not the odd part). On a remote BzrDir, it will return False if there is
> not a WT, but will throw errors.NotLocalUrl if there is one. The
> attached is a two-line fix which catches the error and returns True in
> its place. Pretty simple.
>
> However, I'm struggling to work out how to test it. While it's not
> vital that this is tested (as it is currently not directly tested and
> this change passes the full test suite), I'd like to add some in. Could
> someone give me some pointers as to how to go about testing this?
There is a test in bzr-upload that checks that you can't upload to a
location where there is a working tree. This might be a starting
point?
http://bazaar.launchpad.net/~bzr-upload-devs/bzr-upload/trunk/annotate/head%3A/tests/test_upload.py
line 621 to eof
Gary
More information about the bazaar
mailing list