~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/remotebranch.py

  • Committer: Martin Pool
  • Date: 2005-06-22 06:37:43 UTC
  • Revision ID: mbp@sourcefrog.net-20050622063743-e395f04c4db8977f
- move old blackbox code from testbzr into bzrlib.selftest.blackbox

Show diffs side-by-side

added added

removed removed

Lines of Context:
143
143
        pl = len(self.baseurl)
144
144
        return path[pl:].lstrip('/')
145
145
 
146
 
 
147
146
    def get_revision(self, revision_id):
148
 
        from bzrlib.revision import Revision
149
 
        from bzrlib.xml import unpack_xml
150
 
        revf = self.revision_store[revision_id]
151
 
        r = unpack_xml(Revision, revf)
 
147
        from revision import Revision
 
148
        revf = get_url(self.baseurl + '/.bzr/revision-store/' + revision_id,
 
149
                       True)
 
150
        r = Revision.read_xml(revf)
152
151
        if r.revision_id != revision_id:
153
152
            raise BzrCheckError('revision stored as {%s} actually contains {%s}'
154
153
                                % (revision_id, r.revision_id))
172
171
 
173
172
def simple_walk():
174
173
    """For experimental purposes, traverse many parts of a remote branch"""
175
 
    from bzrlib.revision import Revision
176
 
    from bzrlib.branch import Branch
177
 
    from bzrlib.inventory import Inventory
178
 
    from bzrlib.xml import unpack_xml
 
174
    from revision import Revision
 
175
    from branch import Branch
 
176
    from inventory import Inventory
179
177
 
180
178
    got_invs = {}
181
179
    got_texts = {}
193
191
        rev_f = get_url('/.bzr/revision-store/%s' % rev_id,
194
192
                        compressed=True)
195
193
 
196
 
        rev = unpack_xml(Revision, rev_f)
 
194
        rev = Revision.read_xml(rev_f)
197
195
        print rev.message
198
196
        inv_id = rev.inventory_id
199
197
        if inv_id not in got_invs: