~jelmer/bzr-git/705807-dpush

« back to all changes in this revision

Viewing changes to push.py

  • Committer: Jelmer Vernooij
  • Date: 2010-09-11 15:02:09 UTC
  • Revision ID: jelmer@samba.org-20100911150209-du3d3htkxhgbh9tt
Use dictionary with verifiers rather than requiring testament3-sha1 everywhere.

Show diffs side-by-side

added added

removed removed

Lines of Context:
148
148
        try:
149
149
            sha_id = self.source_store._lookup_revision_sha1(revid)
150
150
        except KeyError:
151
 
            raise errors.NoSuchRevision(self.source, revid)
 
151
            return False
152
152
        try:
153
153
            return (sha_id not in self.target_store)
154
154
        except errors.NoSuchRevision:
186
186
        refs = self.target._git.get_refs()
187
187
        for k, v in refs.iteritems():
188
188
            try:
189
 
                (kind, (revid, treesha)) = self.source_store.lookup_git_sha(v)
 
189
                (kind, type_data) = self.source_store.lookup_git_sha(v)
190
190
            except KeyError:
191
191
                revid = None
 
192
            else:
 
193
                if kind == "commit":
 
194
                    revid = type_data[0]
 
195
                else:
 
196
                    revid = None
192
197
            bzr_refs[k] = (v, revid)
193
198
        return bzr_refs
194
199