[Pkg-bazaar-commits] ./bzr/unstable r803: - Remove dead code from remotebranch
Martin Pool
mbp at sourcefrog.net
Fri Apr 10 08:21:05 UTC 2009
------------------------------------------------------------
revno: 803
committer: Martin Pool <mbp at sourcefrog.net>
timestamp: Tue 2005-06-28 21:14:41 +1000
message:
- Remove dead code from remotebranch
modified:
bzrlib/remotebranch.py
-------------- next part --------------
=== modified file 'bzrlib/remotebranch.py'
--- a/bzrlib/remotebranch.py 2005-06-28 05:33:40 +0000
+++ b/bzrlib/remotebranch.py 2005-06-28 11:14:41 +0000
@@ -170,63 +170,4 @@
return get_url(p, compressed=True)
-def simple_walk():
- """For experimental purposes, traverse many parts of a remote branch"""
- from bzrlib.revision import Revision
- from bzrlib.branch import Branch
- from bzrlib.inventory import Inventory
- from bzrlib.xml import unpack_xml
-
- got_invs = {}
- got_texts = {}
-
- print 'read history'
- history = get_url('/.bzr/revision-history').readlines()
- num_revs = len(history)
- for i, rev_id in enumerate(history):
- rev_id = rev_id.rstrip()
- print 'read revision %d/%d' % (i, num_revs)
-
- # python gzip needs a seekable file (!!) but the HTTP response
- # isn't, so we need to buffer it
-
- rev_f = get_url('/.bzr/revision-store/%s' % rev_id,
- compressed=True)
-
- rev = unpack_xml(Revision, rev_f)
- print rev.message
- inv_id = rev.inventory_id
- if inv_id not in got_invs:
- print 'get inventory %s' % inv_id
- inv_f = get_url('/.bzr/inventory-store/%s' % inv_id,
- compressed=True)
- inv = Inventory.read_xml(inv_f)
- print '%4d inventory entries' % len(inv)
-
- for path, ie in inv.iter_entries():
- text_id = ie.text_id
- if text_id == None:
- continue
- if text_id in got_texts:
- continue
- print ' fetch %s text {%s}' % (path, text_id)
- text_f = get_url('/.bzr/text-store/%s' % text_id,
- compressed=True)
- got_texts[text_id] = True
-
- got_invs.add[inv_id] = True
-
- print '----'
-
-
-def try_me():
- BASE_URL = 'http://bazaar-ng.org/bzr/bzr.dev/'
- b = RemoteBranch(BASE_URL)
- ## print '\n'.join(b.revision_history())
- from log import show_log
- show_log(b)
-
-
-if __name__ == '__main__':
- try_me()
More information about the Pkg-bazaar-commits
mailing list