Rev 6493: Merge 2.5 branch in http://bazaar.launchpad.net/~vila/bzr/integration/
Vincent Ladeuil
v.ladeuil+lp at free.fr
Mon Mar 12 10:15:31 UTC 2012
At http://bazaar.launchpad.net/~vila/bzr/integration/
------------------------------------------------------------
revno: 6493 [merge]
revision-id: v.ladeuil+lp at free.fr-20120312101530-ab4ongciswezj5um
parent: pqm at pqm.ubuntu.com-20120312084059-564pa15g5dgnggts
parent: pqm at pqm.ubuntu.com-20120309115746-srx7sfbsua83j4bg
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: trunk
timestamp: Mon 2012-03-12 11:15:30 +0100
message:
Merge 2.5 branch
modified:
bzrlib/gpg.py gpg.py-20051017065112-8654536d415dacc6
bzrlib/mergetools.py bzrlibmergetools.py-20100701052504-knb0llvufl26fxgx-1
bzrlib/osutils.py osutils.py-20050309040759-eeaff12fbf77ac86
bzrlib/tests/test_gpg.py testgpg.py-20051017042228-9276cd40a784c93c
bzrlib/tests/test_mergetools.py bzrlibteststest_merg-20100701052504-knb0llvufl26fxgx-2
bzrlib/tests/test_osutils.py test_osutils.py-20051201224856-e48ee24c12182989
doc/developers/HACKING.txt HACKING-20050805200004-2a5dc975d870f78c
doc/developers/index-plain.txt indexplain.txt-20090909123806-96yfsgrqwra8cwq7-1
doc/developers/index.txt index.txt-20070508041241-qznziunkg0nffhiw-1
doc/en/release-notes/bzr-2.5.txt bzr2.5.txt-20110708125756-587p0hpw7oke4h05-1
doc/en/whats-new/whats-new-in-2.5.txt whatsnewin2.5.txt-20110711065040-xz9b4xba1qzlwp7m-1
setup.py setup.py-20050314065409-02f8a0a6e3f9bc70
-------------- next part --------------
=== modified file 'bzrlib/gpg.py'
--- a/bzrlib/gpg.py 2011-12-19 13:23:58 +0000
+++ b/bzrlib/gpg.py 2012-02-27 20:16:25 +0000
@@ -190,7 +190,7 @@
# use the user email address
key = config.extract_email_address(self._config_stack.get('email'))
return [self._config_stack.get('gpg_signing_command'), '--clearsign',
- '-u', key]
+ '-u', key, '--no-tty']
def sign(self, content):
if isinstance(content, unicode):
=== modified file 'bzrlib/mergetools.py'
--- a/bzrlib/mergetools.py 2011-12-19 13:23:58 +0000
+++ b/bzrlib/mergetools.py 2012-02-28 04:58:14 +0000
@@ -48,13 +48,13 @@
cmd_list = cmdline.split(command_line)
exe = cmd_list[0]
if sys.platform == 'win32':
- if os.path.isabs(exe):
- base, ext = os.path.splitext(exe)
- path_ext = [unicode(s.lower())
- for s in os.getenv('PATHEXT', '').split(os.pathsep)]
- return os.path.exists(exe) and ext in path_ext
- else:
- return osutils.find_executable_on_path(exe) is not None
+ exe = _get_executable_path(exe)
+ if exe is None:
+ return False
+ base, ext = os.path.splitext(exe)
+ path_ext = [unicode(s.lower())
+ for s in os.getenv('PATHEXT', '').split(os.pathsep)]
+ return os.path.exists(exe) and ext in path_ext
else:
return (os.access(exe, os.X_OK)
or osutils.find_executable_on_path(exe) is not None)
@@ -69,6 +69,9 @@
if invoker is None:
invoker = subprocess_invoker
cmd_list = cmdline.split(command_line)
+ exe = _get_executable_path(cmd_list[0])
+ if exe is not None:
+ cmd_list[0] = exe
args, tmp_file = _subst_filename(cmd_list, filename)
def cleanup(retcode):
if tmp_file is not None:
@@ -79,6 +82,12 @@
return invoker(args[0], args[1:], cleanup)
+def _get_executable_path(exe):
+ if os.path.isabs(exe):
+ return exe
+ return osutils.find_executable_on_path(exe)
+
+
def _subst_filename(args, filename):
subst_names = {
'base': filename + u'.BASE',
=== modified file 'bzrlib/osutils.py'
--- a/bzrlib/osutils.py 2012-02-01 12:31:53 +0000
+++ b/bzrlib/osutils.py 2012-02-28 04:58:14 +0000
@@ -2473,10 +2473,6 @@
:param name: The base name of the executable.
:return: The path to the executable found or None.
"""
- path = os.environ.get('PATH')
- if path is None:
- return None
- path = path.split(os.pathsep)
if sys.platform == 'win32':
exts = os.environ.get('PATHEXT', '').split(os.pathsep)
exts = [ext.lower() for ext in exts]
@@ -2488,11 +2484,18 @@
exts = [ext]
else:
exts = ['']
- for ext in exts:
- for d in path:
- f = os.path.join(d, name) + ext
- if os.access(f, os.X_OK):
- return f
+ path = os.environ.get('PATH')
+ if path is not None:
+ path = path.split(os.pathsep)
+ for ext in exts:
+ for d in path:
+ f = os.path.join(d, name) + ext
+ if os.access(f, os.X_OK):
+ return f
+ if sys.platform == 'win32':
+ app_path = win32utils.get_app_path(name)
+ if app_path != name:
+ return app_path
return None
=== modified file 'bzrlib/tests/test_gpg.py'
--- a/bzrlib/tests/test_gpg.py 2011-12-21 14:25:26 +0000
+++ b/bzrlib/tests/test_gpg.py 2012-02-26 19:21:01 +0000
@@ -51,7 +51,7 @@
self.my_gpg = gpg.GPGStrategy(FakeConfig())
def test_signing_command_line(self):
- self.assertEqual(['false', '--clearsign', '-u', 'amy at example.com'],
+ self.assertEqual(['false', '--clearsign', '-u', 'amy at example.com', '--no-tty'],
self.my_gpg._command_line())
def test_signing_command_line_from_default(self):
@@ -60,7 +60,7 @@
email=Amy <amy at example.com>
gpg_signing_key=default
gpg_signing_command=false'''))
- self.assertEqual(['false', '--clearsign', '-u', 'amy at example.com'],
+ self.assertEqual(['false', '--clearsign', '-u', 'amy at example.com', '--no-tty'],
my_gpg._command_line())
def test_signing_command_line_from_email(self):
@@ -68,7 +68,7 @@
my_gpg = gpg.GPGStrategy(FakeConfig('''
email=Amy <amy at example.com>
gpg_signing_command=false'''))
- self.assertEqual(['false', '--clearsign', '-u', 'amy at example.com'],
+ self.assertEqual(['false', '--clearsign', '-u', 'amy at example.com', '--no-tty'],
my_gpg._command_line())
def test_checks_return_code(self):
=== modified file 'bzrlib/tests/test_mergetools.py'
--- a/bzrlib/tests/test_mergetools.py 2011-06-30 21:00:38 +0000
+++ b/bzrlib/tests/test_mergetools.py 2012-02-28 04:58:14 +0000
@@ -81,11 +81,7 @@
self.assertTrue(mergetools.check_availability(sys.executable))
def test_exe_on_path(self):
- if sys.platform == 'win32':
- exe = 'cmd.exe'
- else:
- exe = 'sh'
- self.assertTrue(mergetools.check_availability(exe))
+ self.assertTrue(mergetools.check_availability('python'))
def test_nonexistent(self):
self.assertFalse(mergetools.check_availability('DOES NOT EXIST'))
@@ -112,6 +108,19 @@
('test.txt.OTHER', 'other stuff'),
))
+ def test_invoke_expands_exe_path(self):
+ self.overrideEnv('PATH', os.path.dirname(sys.executable))
+ def dummy_invoker(exe, args, cleanup):
+ self._exe = exe
+ self._args = args
+ cleanup(0)
+ return 0
+ command = '%s {result}' % os.path.basename(sys.executable)
+ retcode = mergetools.invoke(command, 'test.txt', dummy_invoker)
+ self.assertEqual(0, retcode)
+ self.assertEqual(sys.executable, self._exe)
+ self.assertEqual(['test.txt'], self._args)
+
def test_success(self):
def dummy_invoker(exe, args, cleanup):
self._exe = exe
=== modified file 'bzrlib/tests/test_osutils.py'
--- a/bzrlib/tests/test_osutils.py 2012-02-01 12:32:26 +0000
+++ b/bzrlib/tests/test_osutils.py 2012-02-28 04:58:14 +0000
@@ -2225,6 +2225,14 @@
self.assertTrue(
osutils.find_executable_on_path('THIS SHOULD NOT EXIST') is None)
self.assertTrue(osutils.find_executable_on_path('file.txt') is None)
+
+ def test_windows_app_path(self):
+ if sys.platform != 'win32':
+ raise tests.TestSkipped('test requires win32')
+ # Override PATH env var so that exe can only be found on App Path
+ self.overrideEnv('PATH', '')
+ # Internt Explorer is always registered in the App Path
+ self.assertTrue(osutils.find_executable_on_path('iexplore') is not None)
def test_other(self):
if sys.platform == 'win32':
=== modified file 'doc/developers/HACKING.txt'
--- a/doc/developers/HACKING.txt 2011-08-19 16:55:28 +0000
+++ b/doc/developers/HACKING.txt 2012-02-29 13:55:25 +0000
@@ -294,7 +294,7 @@
Automatically-generated API reference information is available at
-<http://starship.python.net/crew/mwh/bzrlibapi/>.
+<http://people.canonical.com/~mwh/bzrlibapi/>.
See also the `Bazaar Architectural Overview
<http://doc.bazaar.canonical.com/developers/overview.html>`_.
=== modified file 'doc/developers/index-plain.txt'
--- a/doc/developers/index-plain.txt 2010-10-13 04:13:48 +0000
+++ b/doc/developers/index-plain.txt 2012-02-29 13:55:25 +0000
@@ -11,7 +11,7 @@
* `Architectural Overview <overview.html>`_ |--| describes some of the
most important classes and concepts.
-* `bzrlib API reference <http://starship.python.net/crew/mwh/bzrlibapi/>`_
+* `bzrlib API reference <http://people.canonical.com/~mwh/bzrlibapi/>`_
(external link)
|--| automatically generated API reference information
=== modified file 'doc/developers/index.txt'
--- a/doc/developers/index.txt 2011-05-16 10:35:04 +0000
+++ b/doc/developers/index.txt 2012-02-29 13:55:25 +0000
@@ -63,7 +63,7 @@
* `Writing plugins for Bazaar <http://doc.bazaar.canonical.com/plugins/en/plugin-development.html>`_ (web link)
-* `bzrlib API reference <http://starship.python.net/crew/mwh/bzrlibapi/>`_
+* `bzrlib API reference <http://people.canonical.com/~mwh/bzrlibapi/>`_
(web link)
=== modified file 'doc/en/release-notes/bzr-2.5.txt'
--- a/doc/en/release-notes/bzr-2.5.txt 2012-03-06 19:21:54 +0000
+++ b/doc/en/release-notes/bzr-2.5.txt 2012-03-12 10:15:30 +0000
@@ -36,6 +36,9 @@
.. Fixes for situations where bzr would previously crash or give incorrect
or undesirable results.
+* Fixed merge tool availability checking and invocation to search the
+ Windows App Path registry in addition to the PATH. (Gordon Tyler, #939605)
+
* Make sure configuration options can provide their own help topic.
(Jelmer Vernooij, #941672)
@@ -1079,6 +1082,9 @@
operations that use it, like merge, can now create trees without a root.
(Aaron Bentley)
+* Fixed problem with getting errors about failing to open /dev/tty when using
+ Bazaar Explorer to sign commits. (Mark Grandi, #847388)
+
Documentation
*************
=== modified file 'doc/en/whats-new/whats-new-in-2.5.txt'
--- a/doc/en/whats-new/whats-new-in-2.5.txt 2012-01-04 23:51:16 +0000
+++ b/doc/en/whats-new/whats-new-in-2.5.txt 2012-03-09 11:22:08 +0000
@@ -2,7 +2,11 @@
What's New in Bazaar 2.5?
*************************
-Bazaar 2.5 is still under development, and will be released in February 2012.
+Bazaar 2.5 bas been released on the 24th of February 2012 and marks the
+start of a new long-term-stable series. From here, we will only make bugfix
+releases on the 2.5 series (2.5.1, etc, and support it until April 2017),
+while 2.6 will become our new development series.
+
This document accumulates a high level summary of what's changed. See the
:doc:`../release-notes/index` for a full list.
=== modified file 'setup.py'
--- a/setup.py 2011-11-29 16:14:12 +0000
+++ b/setup.py 2012-02-29 12:35:23 +0000
@@ -431,6 +431,7 @@
# PyQt4 itself still escapes the plugin detection code for some reason...
includes.append('PyQt4.QtCore')
includes.append('PyQt4.QtGui')
+ includes.append('PyQt4.QtTest')
includes.append('sip') # extension module required for Qt.
packages.append('pygments') # colorizer for qbzr
packages.append('docutils') # html formatting
More information about the bazaar-commits
mailing list