~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/fetch.py

  • Committer: Robert Collins
  • Date: 2005-10-17 11:56:54 UTC
  • mfrom: (1185.16.59)
  • Revision ID: robertc@robertcollins.net-20051017115654-662239e1587524a8
mergeĀ fromĀ martin.

Show diffs side-by-side

added added

removed removed

Lines of Context:
111
111
            self.pb.clear()
112
112
 
113
113
    def _fetch_revisions(self, last_revision):
114
 
        try:
115
 
            self.last_revision = self._find_last_revision(last_revision)
116
 
        except NoSuchRevision, e:
117
 
            mutter('failed getting last revision: %s', e)
118
 
            raise InstallFailed([last_revision])
 
114
        self.last_revision = self._find_last_revision(last_revision)
119
115
        mutter('fetch up to rev {%s}', self.last_revision)
120
116
        if (self.last_revision is not None and 
121
117
            self.to_branch.has_revision(self.last_revision)):
134
130
 
135
131
        Returns the revision_id, or returns None if there's no history
136
132
        in the source branch."""
 
133
        if last_revision:
 
134
            return last_revision
137
135
        self.pb.update('get source history')
138
136
        from_history = self.from_branch.revision_history()
139
137
        self.pb.update('get destination history')
140
 
        if last_revision:
141
 
            self.from_branch.get_revision(last_revision)
142
 
            return last_revision
143
 
        elif from_history:
 
138
        if from_history:
144
139
            return from_history[-1]
145
140
        else:
146
141
            return None                 # no history in the source branch