~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/shelf_ui.py

merge with bzr.dev and put the NEWS entry in the IN DEVELOPMENT section

Show diffs side-by-side

added added

removed removed

Lines of Context:
223
223
        tree, path = workingtree.WorkingTree.open_containing(directory)
224
224
        manager = tree.get_shelf_manager()
225
225
        if shelf_id is not None:
226
 
            shelf_id = int(shelf_id)
 
226
            try:
 
227
                shelf_id = int(shelf_id)
 
228
            except ValueError:
 
229
                raise errors.InvalidShelfId(shelf_id)
227
230
        else:
228
231
            shelf_id = manager.last_shelf()
229
232
            if shelf_id is None: