/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/fetch.py

  • Committer: Martin Pool
  • Date: 2005-09-15 08:43:31 UTC
  • Revision ID: mbp@sourcefrog.net-20050915084331-468708d17b8d72e1
- new method Branch.has_revision

- fetch checks this before copying a revision

- update Branch.update_revisions

Show diffs side-by-side

added added

removed removed

Lines of Context:
154
154
    def _copy_revisions(self, revs_to_fetch):
155
155
        i = 0
156
156
        for rev_id in revs_to_fetch:
 
157
            i += 1
 
158
            if self.to_branch.has_revision(rev_id):
 
159
                continue
157
160
            self.pb.update('fetch revision', i, self.count_total)
158
161
            self._copy_one_revision(rev_id)
159
 
            i += 1
160
162
            self.count_copied += 1
161
163
 
162
164
 
176
178
        parent_ids = [x.revision_id for x in rev.parents]
177
179
        self.to_weaves.add_text(INVENTORY_FILEID, rev_id,
178
180
                                            split_lines(inv_xml), parent_ids)
 
181
 
179
182
        self.to_branch.revision_store.add(StringIO(rev_xml), rev_id)
180
183
 
181
184