~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

Convert callers of Branch.revision_history() to Branch.last_revision_info() where sensible.
(Wouter van Heyst, Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
225
225
        try:
226
226
            if last_revision is None:
227
227
                pb.update('get source history')
228
 
                from_history = from_branch.revision_history()
229
 
                if from_history:
230
 
                    last_revision = from_history[-1]
231
 
                else:
232
 
                    # no history in the source branch
233
 
                    last_revision = _mod_revision.NULL_REVISION
 
228
                last_revision = from_branch.last_revision_info()[1]
234
229
            return self.repository.fetch(from_branch.repository,
235
230
                                         revision_id=last_revision,
236
231
                                         pb=nested_pb)
1247
1242
        """See Branch.pull."""
1248
1243
        source.lock_read()
1249
1244
        try:
1250
 
            old_count = len(self.revision_history())
 
1245
            old_count = self.last_revision_info()[0]
1251
1246
            try:
1252
1247
                self.update_revisions(source, stop_revision)
1253
1248
            except DivergedBranches:
1255
1250
                    raise
1256
1251
            if overwrite:
1257
1252
                self.set_revision_history(source.revision_history())
1258
 
            new_count = len(self.revision_history())
 
1253
            new_count = self.last_revision_info()[0]
1259
1254
            return new_count - old_count
1260
1255
        finally:
1261
1256
            source.unlock()