~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

  • Committer: Jelmer Vernooij
  • Date: 2011-04-21 20:32:16 UTC
  • mfrom: (5809.1.2 pwit1)
  • mto: This revision was merged to the branch mainline in revision 5821.
  • Revision ID: jelmer@samba.org-20110421203216-r04j4x5vugrup6u9
Merge per-wt-inventory-tests-pt1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2511
2511
            'revision-history', '\n'.join(history),
2512
2512
            mode=self.bzrdir._get_file_mode())
2513
2513
 
2514
 
    @needs_write_lock
 
2514
    @deprecated_method(deprecated_in((2, 4, 0)))
2515
2515
    def set_revision_history(self, rev_history):
2516
2516
        """See Branch.set_revision_history."""
 
2517
        self._set_revision_history(rev_history)
 
2518
 
 
2519
    @needs_write_lock
 
2520
    def _set_revision_history(self, rev_history):
2517
2521
        if 'evil' in debug.debug_flags:
2518
2522
            mutter_callsite(3, "set_revision_history scales with history.")
2519
2523
        check_not_reserved_id = _mod_revision.check_not_reserved_id
2563
2567
            except ValueError:
2564
2568
                rev = self.repository.get_revision(revision_id)
2565
2569
                new_history = rev.get_history(self.repository)[1:]
2566
 
        destination.set_revision_history(new_history)
 
2570
        destination._set_revision_history(new_history)
2567
2571
 
2568
2572
    @needs_write_lock
2569
2573
    def set_last_revision_info(self, revno, revision_id):
2585
2589
        history = self._lefthand_history(revision_id)
2586
2590
        if len(history) != revno:
2587
2591
            raise AssertionError('%d != %d' % (len(history), revno))
2588
 
        self.set_revision_history(history)
 
2592
        self._set_revision_history(history)
2589
2593
 
2590
2594
    def _gen_revision_history(self):
2591
2595
        history = self._transport.get_bytes('revision-history').split('\n')
2605
2609
        :param other_branch: The other branch that DivergedBranches should
2606
2610
            raise with respect to.
2607
2611
        """
2608
 
        self.set_revision_history(self._lefthand_history(revision_id,
 
2612
        self._set_revision_history(self._lefthand_history(revision_id,
2609
2613
            last_rev, other_branch))
2610
2614
 
2611
2615
    def basis_tree(self):