Rev 1755: Skip checking revprops if they can't be committed. in file:///data/jelmer/bzr-svn/trunk/

Jelmer Vernooij jelmer at samba.org
Mon Sep 1 19:25:58 BST 2008


At file:///data/jelmer/bzr-svn/trunk/

------------------------------------------------------------
revno: 1755
revision-id: jelmer at samba.org-20080901182555-oo5qua98l6brubqc
parent: jelmer at samba.org-20080901165017-j0da42qhkf5hasci
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: trunk
timestamp: Mon 2008-09-01 20:25:55 +0200
message:
  Skip checking revprops if they can't be committed.
modified:
  repository.py                  repository.py-20060306123302-1f8c5069b3fe0265
=== modified file 'repository.py'
--- a/repository.py	2008-09-01 13:53:06 +0000
+++ b/repository.py	2008-09-01 18:25:55 +0000
@@ -96,12 +96,13 @@
 
     def is_bzr_revision(self):
         # If the server already sent us all revprops, look at those first
-        if self.repository.transport.has_capability("log-revprops"):
+        if self.repository.quick_log_revprops:
             order = [lambda: is_bzr_revision_revprops(self.revprops),
                      lambda: is_bzr_revision_fileprops(self.fileprops)]
         else:
-            order = [lambda: is_bzr_revision_fileprops(self.fileprops),
-                     lambda: is_bzr_revision_revprops(self.revprops)]
+            order = [lambda: is_bzr_revision_fileprops(self.fileprops)]
+            if self.repository.check_revprops:
+                order.append(lambda: is_bzr_revision_revprops(self.revprops))
         for fn in order:
             ret = fn()
             if ret is not None:
@@ -272,6 +273,9 @@
 
         self.branchprop_list = PathPropertyProvider(self._log)
 
+        self.check_revprops = self.repository.transport.has_capability("commit-revprops") in (True, None)
+        self.quick_log_revprops = self.repository.transport.has_capability("log-revprops")
+
     def get_revmap(self):
         return self.revmap
    




More information about the bazaar-commits mailing list