Rev 6010: (jameinel) Give a better warning when the bzr script doesn't match its in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Wed Jul 6 14:18:57 UTC 2011


At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 6010 [merge]
revision-id: pqm at pqm.ubuntu.com-20110706141854-wpc2nq21xwg25kbf
parent: pqm at pqm.ubuntu.com-20110706133021-vflfbps9u5e9k09b
parent: mbp at canonical.com-20110701214858-i7a06aumetqf948z
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Wed 2011-07-06 14:18:54 +0000
message:
  (jameinel) Give a better warning when the bzr script doesn't match its
   bzrlib. (Martin Pool)
modified:
  bzr                            bzr.py-20050313053754-5485f144c7006fa6
  doc/en/release-notes/bzr-2.4.txt bzr2.4.txt-20110114053217-k7ym9jfz243fddjm-1
=== modified file 'bzr'
--- a/bzr	2011-05-17 20:58:43 +0000
+++ b/bzr	2011-07-01 21:48:58 +0000
@@ -28,7 +28,7 @@
 try:
     version_info = sys.version_info
 except AttributeError:
-    version_info = 1, 5 # 1.5 or older
+    version_info = 1, 5  # 1.5 or older
 
 REINVOKE = "__BZR_REINVOKE"
 NEED_VERS = (2, 6)
@@ -108,10 +108,16 @@
     raise
 
 if bzrlib.version_info[:3] != _script_version:
-    sys.stderr.write("bzr: WARNING: bzrlib version doesn't match the bzr program.\n"
-            "This may indicate an installation problem.\n"
-            "bzrlib from %s is version %r\n"
-            % (bzrlib.__path__, bzrlib.version_info))
+    sys.stderr.write(
+        "bzr: WARNING: bzrlib version doesn't match the bzr program.\n"
+        "This may indicate an installation problem.\n"
+        "bzrlib is version %s from %s\n"
+        "bzr is version %s from %s\n" % (
+        bzrlib._format_version_tuple(bzrlib.version_info),
+        bzrlib.__path__[0],
+        bzrlib._format_version_tuple(_script_version),
+        __file__))
+
 
 import bzrlib.inspect_for_copy
 bzrlib.inspect_for_copy.import_copy_with_hacked_inspect()

=== modified file 'doc/en/release-notes/bzr-2.4.txt'
--- a/doc/en/release-notes/bzr-2.4.txt	2011-07-04 07:49:46 +0000
+++ b/doc/en/release-notes/bzr-2.4.txt	2011-07-06 14:18:54 +0000
@@ -52,6 +52,11 @@
   modifying and renaming a file in a branch that deleted it (or vice-versa).
   (Vincent Ladeuil, #688101)
 
+* Give a more helpful message when the bzr executable doesn't match the
+  library.  (This typically happens because of a misconfigured PYTHONPATH
+  or half-installed bzr.)  
+  (Martin Pool, #804553)
+
 * Properly load utf8-encoded config files. (Vincent Ladeuil, #799212)
 
 * ``GraphThunkIdsToKeys.merge_sort`` now properly returns




More information about the bazaar-commits mailing list