/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

  • Committer: Jelmer Vernooij
  • Date: 2011-04-19 22:18:17 UTC
  • mfrom: (5805 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5808.
  • Revision ID: jelmer@samba.org-20110419221817-qhch41w5jafi526q
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2581
2581
        configured to check constraints on history, in which case this may not
2582
2582
        be permitted.
2583
2583
        """
2584
 
        revision_id = _mod_revision.ensure_null(revision_id)
 
2584
        if not revision_id or not isinstance(revision_id, basestring):
 
2585
            raise errors.InvalidRevisionId(revision_id=revision_id, branch=self)
2585
2586
        # this old format stores the full history, but this api doesn't
2586
2587
        # provide it, so we must generate, and might as well check it's
2587
2588
        # correct
2817
2818
 
2818
2819
    @needs_write_lock
2819
2820
    def set_last_revision_info(self, revno, revision_id):
2820
 
        revision_id = _mod_revision.ensure_null(revision_id)
 
2821
        if not revision_id or not isinstance(revision_id, basestring):
 
2822
            raise errors.InvalidRevisionId(revision_id=revision_id, branch=self)
2821
2823
        old_revno, old_revid = self.last_revision_info()
2822
2824
        if self._get_append_revisions_only():
2823
2825
            self._check_history_violation(revision_id)