# Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: amanic@gmail.com-20080905235052-l0sqeix2xzdsysij # target_branch: . # testament_sha1: c4feba9769a53a0838260fd2864854cc5519a9c4 # timestamp: 2008-09-06 01:51:51 +0200 # base_revision_id: argentina@gmail.com-20080901214721-\ # cdlcjue6ggr6y86q # # Begin patch === modified file 'loggerhead/controllers/inventory_ui.py' --- loggerhead/controllers/inventory_ui.py 2008-07-23 21:41:49 +0000 +++ loggerhead/controllers/inventory_ui.py 2008-09-05 23:50:52 +0000 @@ -20,7 +20,9 @@ import logging import posixpath -from paste.httpexceptions import HTTPServerError +from paste.httpexceptions import HTTPNotFound, HTTPServerError + +from bzrlib.revision import is_null as is_null_rev from loggerhead import util from loggerhead.controllers import TemplatedBranchView @@ -45,6 +47,10 @@ else: revid = h.last_revid + if is_null_rev(revid): + #XXX: try to print a nicer error without throwing an exception. + raise HTTPNotFound('This branch does not have any revisions yet.') + try: inv = h.get_inventory(revid) except: # Begin bundle IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWYUFw0YAABHfgAAQQGFzUBIA AACv794QIABkRR6nqaep6gZPUA9IxCjJqaBo09JpgjIMQ3m0vN/kfmJsLk0MHQ1W4qiRcX7dBKNJ lorThQidj3YxTykvD4J5hd1FQti/6hzQ9gCghgPfGQ8nyFtaDiAA5JCZ68iW34u5IpwoSEKC4aMA