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

  • Committer: Jelmer Vernooij
  • Date: 2010-05-13 12:34:24 UTC
  • mto: (0.200.912 trunk)
  • mto: This revision was merged to the branch mainline in revision 6960.
  • Revision ID: jelmer@samba.org-20100513123424-c1sk9vcg2ekrcsol
Some refactoring, support proper file ids in revision deltas.

Show diffs side-by-side

added added

removed removed

Lines of Context:
116
116
 
117
117
    def missing_revisions(self, stop_revisions, check_revid):
118
118
        missing = []
 
119
        graph = self.source.get_graph()
119
120
        pb = ui.ui_factory.nested_progress_bar()
120
121
        try:
121
 
            graph = self.source.get_graph()
122
122
            for revid, _ in graph.iter_ancestry(stop_revisions):
123
123
                pb.update("determining revisions to fetch", len(missing))
124
124
                if not check_revid(revid):
125
125
                    missing.append(revid)
126
 
            return graph.iter_topo_order(missing)
127
126
        finally:
128
127
            pb.finished()
 
128
        return graph.iter_topo_order(missing)
129
129
 
130
130
    def fetch_refs(self, refs):
131
131
        fetch_spec = PendingAncestryResult(refs.values(), self.source)
148
148
        def check_revid(revid):
149
149
            if revid == NULL_REVISION:
150
150
                return True
 
151
            sha_id = self.source_store._lookup_revision_sha1(revid)
151
152
            try:
152
 
                return (self.source_store._lookup_revision_sha1(revid) in self.target_store)
 
153
                return (sha_id in self.target_store)
153
154
            except errors.NoSuchRevision:
154
 
                # Ghost, can't dpush
 
155
                # Ghost, can't push
155
156
                return True
156
157
        return list(self.missing_revisions(stop_revisions, check_revid))
157
158