Rev 2487: Be optimistic about .bzr/branch/revision-history already being in utf8. in http://bazaar.launchpad.net/%7Ebzr/bzr/dirstate

John Arbash Meinel john at arbash-meinel.com
Thu Mar 1 16:02:39 GMT 2007


At http://bazaar.launchpad.net/%7Ebzr/bzr/dirstate

------------------------------------------------------------
revno: 2487
revision-id: john at arbash-meinel.com-20070301160133-36cg0te3k4xd9jqk
parent: john at arbash-meinel.com-20070301155418-ocyly7icb2tyhvvu
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: dirstate
timestamp: Thu 2007-03-01 10:01:33 -0600
message:
  Be optimistic about .bzr/branch/revision-history already being in utf8.
  Decoding all 178k revisions for a mozilla tree takes about 3s / 15s for a 'bzr status'.
  Branch6 will do better by caching last_revision rather than the complete history.
  But for now, it looks a lot better if we just assume the revisions are utf8.
modified:
  bzrlib/branch.py               branch.py-20050309040759-e4baf4e0d046576e
-------------- next part --------------
=== modified file 'bzrlib/branch.py'
--- a/bzrlib/branch.py	2007-02-17 02:33:45 +0000
+++ b/bzrlib/branch.py	2007-03-01 16:01:33 +0000
@@ -1292,8 +1292,7 @@
         self.set_revision_history(history)
 
     def _gen_revision_history(self):
-        get_cached_utf8 = cache_utf8.get_cached_utf8
-        history = [get_cached_utf8(l.rstrip('\r\n')) for l in
+        history = [l.rstrip('\r\n') for l in
                 self.control_files.get('revision-history').readlines()]
         return history
 



More information about the bazaar-commits mailing list