[MERGE] Use NULL_REVISION rather than None for Repository.revision_tree().

John Arbash Meinel john at arbash-meinel.com
Mon Sep 1 15:29:53 BST 2008


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

Jelmer Vernooij wrote:
> Trivial patch that makes Repository.revision_tree() warn when 
> it gets a None revision_id. Also changes the existing callers to use 
> NULL_REVISION.
> 
> Cheers,
> 
> Jelmer
> 
> 

I like the patch, except you didn't update the docstring:
@@ -1660,9 +1660,10 @@

         `revision_id` may be None for the empty tree revision.
         """
+        revision_id = _mod_revision.ensure_null(revision_id)

Obviously it can't be None anymore :).

I think we need another test which checks that we get a proper deprecation
warning if you pass None, but the result is still the empty tree.

Otherwise:
BB:tweak

John
=:->

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

iD8DBQFIu/xhJdeBCYSNAAMRAqXLAKCrcHMcHKs2ypJilZydLZn9TGupAACcCQOo
0jTrwslxvtMeDDJ20rzPxZE=
=PEsq
-----END PGP SIGNATURE-----



More information about the bazaar mailing list