~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-06-25 10:36:36 UTC
  • mfrom: (3350.6.12 versionedfiles)
  • Revision ID: pqm@pqm.ubuntu.com-20080625103636-6kxh4e1gmyn82f50
(mbp for robertc) VersionedFiles refactoring

Show diffs side-by-side

added added

removed removed

Lines of Context:
1465
1465
        """See Branch.set_revision_history."""
1466
1466
        if 'evil' in debug.debug_flags:
1467
1467
            mutter_callsite(3, "set_revision_history scales with history.")
 
1468
        check_not_reserved_id = _mod_revision.check_not_reserved_id
 
1469
        for rev_id in rev_history:
 
1470
            check_not_reserved_id(rev_id)
1468
1471
        self._write_revision_history(rev_history)
1469
1472
        self._clear_cached_state()
1470
1473
        self._cache_revision_history(rev_history)
1528
1531
            raise errors.NoSuchRevision(self, revision_id)
1529
1532
        current_rev_id = revision_id
1530
1533
        new_history = []
 
1534
        check_not_reserved_id = _mod_revision.check_not_reserved_id
1531
1535
        # Do not include ghosts or graph origin in revision_history
1532
1536
        while (current_rev_id in parents_map and
1533
1537
               len(parents_map[current_rev_id]) > 0):
 
1538
            check_not_reserved_id(current_rev_id)
1534
1539
            new_history.append(current_rev_id)
1535
1540
            current_rev_id = parents_map[current_rev_id][0]
1536
1541
            parents_map = graph.get_parent_map([current_rev_id])