Best way to check if a directory is an brz branch
Nicholas Allen
nick.allen at onlinehome.de
Tue Feb 17 18:52:58 GMT 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
>
> except errors.NotBranchError:
> return False
> except errors.BzrError, e:
> trace.warning('suppressing unknown bzr error: %s', e)
> return False
> except Exception, e:
> trace.warning('suppressing unknown error: %s', e)
> return False
>
> However, if it isn't an error you explicitly know about, I would think
> you want to propagate it.
I guess that's what I really like about Java. It has 2 kinds of
exceptions: checked and unchecked. Checked exceptions are things you
have to deal with yourself or propagate and unchecked are programming
errors (eg assertions) or serious OS errors (like out of memory).
I miss this while reading through the Bzr API docs. I also find it hard
to get familiar with it because of the lack of type information. When a
parameter is called "file" is it a path to a file, an object that
represents a file handle etc.
Of course, it doesn't help either that the API docs are in such an
unusable format and miss vital chunks of information like the message
attribute of Revision.
But I won't moan anymore ;-) Bazaar is a seriously great piece of
software and it's worth these teething troubles to help such a great
project if I can.
Nick
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkmbB4cACgkQ1+i51gqqEGkSgQCdG9N2Rw4ZfvYAOysvY5wI6Rkm
I+sAnRJJACzLamLAUyFZnd/P8EXUfW13
=Pw/j
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list