/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: Canonical.com Patch Queue Manager
  • Date: 2006-03-08 00:37:41 UTC
  • mfrom: (1594.2.4 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20060308003741-08afccbf89005e87
Merge in :
 * Knit repositories use knits
 * Nested progress bar support.
 * Ghost aware graph api.

Show diffs side-by-side

added added

removed removed

Lines of Context:
207
207
            raise Exception("can't fetch from a branch to itself %s, %s" % 
208
208
                            (self.base, to_branch.base))
209
209
        if pb is None:
210
 
            pb = bzrlib.ui.ui_factory.progress_bar()
 
210
            nested_pb = bzrlib.ui.ui_factory.nested_progress_bar()
 
211
            pb = nested_pb
 
212
        else:
 
213
            nested_pb = None
211
214
 
212
215
        from_branch.lock_read()
213
216
        try:
221
224
                    last_revision = NULL_REVISION
222
225
            return self.repository.fetch(from_branch.repository,
223
226
                                         revision_id=last_revision,
224
 
                                         pb=pb)
 
227
                                         pb=nested_pb)
225
228
        finally:
 
229
            if nested_pb is not None:
 
230
                nested_pb.finished()
226
231
            from_branch.unlock()
227
232
 
228
233
    def get_bound_location(self):
961
966
        """See Branch.set_revision_history."""
962
967
        self.control_files.put_utf8(
963
968
            'revision-history', '\n'.join(rev_history))
 
969
        transaction = self.get_transaction()
 
970
        history = transaction.map.find_revision_history()
 
971
        if history is not None:
 
972
            # update the revision history in the identity map.
 
973
            history[:] = list(rev_history)
 
974
            # this call is disabled because revision_history is 
 
975
            # not really an object yet, and the transaction is for objects.
 
976
            # transaction.register_dirty(history)
 
977
        else:
 
978
            transaction.map.add_revision_history(rev_history)
 
979
            # this call is disabled because revision_history is 
 
980
            # not really an object yet, and the transaction is for objects.
 
981
            # transaction.register_clean(history)
964
982
 
965
983
    def get_revision_delta(self, revno):
966
984
        """Return the delta for one revision.
985
1003
    @needs_read_lock
986
1004
    def revision_history(self):
987
1005
        """See Branch.revision_history."""
988
 
        # FIXME are transactions bound to control files ? RBC 20051121
989
1006
        transaction = self.get_transaction()
990
1007
        history = transaction.map.find_revision_history()
991
1008
        if history is not None: