~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/repofmt/pack_repo.py

  • Committer: John Arbash Meinel
  • Date: 2007-11-30 15:59:02 UTC
  • mto: This revision was merged to the branch mainline in revision 3061.
  • Revision ID: john@arbash-meinel.com-20071130155902-03cqo1ynbg2x7x5a
Change the lock check to raise ObjectNotLocked.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1033
1033
    def ensure_loaded(self):
1034
1034
        # NB: if you see an assertion error here, its probably access against
1035
1035
        # an unlocked repo. Naughty.
1036
 
        assert self.repo.is_locked()
 
1036
        if not self.repo.is_locked():
 
1037
            raise errors.ObjectNotLocked(self.repo)
1037
1038
        if self._names is None:
1038
1039
            self._names = {}
1039
1040
            self._packs_at_load = set()
1569
1570
        :returns: an iterator yielding tuples of (revison-id, parents-in-index,
1570
1571
            parents-in-revision).
1571
1572
        """
1572
 
        assert self.is_locked()
 
1573
        if not self.is_locked():
 
1574
            raise errors.ObjectNotLocked(self)
1573
1575
        pb = ui.ui_factory.nested_progress_bar()
1574
1576
        result = []
1575
1577
        try: