Hello community,

here is the log from the commit of package python-Fabric for openSUSE:Factory 
checked in at 2012-05-21 07:30:22
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-Fabric (Old)
 and      /work/SRC/openSUSE:Factory/.python-Fabric.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-Fabric", Maintainer is ""

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-Fabric/python-Fabric.changes      
2012-04-17 07:48:39.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python-Fabric.new/python-Fabric.changes 
2012-05-21 07:30:23.000000000 +0200
@@ -1,0 +2,30 @@
+Tue May  8 12:20:09 UTC 2012 - [email protected]
+
+- Update to 1.4.2:
+  - [Bug] #562: Agent forwarding would error out or freeze when
+    multiple uses of the forwarded agent were used per remote
+    invocation (e.g. a single run command resulting in multiple Git
+    or SVN checkouts.) This has been fixed thanks to Steven
+    McDonald and GitHub user @lynxis.
+  - [Support] #626: Clarity updates to the tutorial. Thanks to
+    GitHub user m4z for the patches.
+  - [Bug] #625: hide/show did not correctly restore prior display
+    settings if an exception was raised inside the block. This has
+    been fixed.
+  - [Bug] #624: Login password prompts did not always display the
+    username being authenticated for. This has been fixed. Thanks
+    to Nick Zalutskiy for catch & patch.
+  - [Bug] #617: Fix the clean_revert behavior of settings so it
+    doesn’t KeyError for newly created settings keys. Thanks to
+    Chris Streeter for the catch.
+  - [Bug] #616: Add port number to the error message displayed upon
+    connection failures.
+  - [Bug] #609: (and #564) Document and clean up env.sudo_prefix so
+    it can be more easily modified by users facing uncommon use
+    cases. Thanks to GitHub users 3point2 for the cleanup and
+    SirScott for the documentation catch.
+  - [Bug] #610: Change detection of env.key_filename‘s type
+    (added as part of SSH config support in 1.4) so it supports
+    arbitrary iterables. Thanks to Brandon Rhodes for the catch.
+
+-------------------------------------------------------------------

Old:
----
  Fabric-1.4.1.tar.bz2

New:
----
  Fabric-1.4.2.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-Fabric.spec ++++++
--- /var/tmp/diff_new_pack.SDTJSV/_old  2012-05-21 07:30:25.000000000 +0200
+++ /var/tmp/diff_new_pack.SDTJSV/_new  2012-05-21 07:30:25.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           python-Fabric
-Version:        1.4.1
+Version:        1.4.2
 Release:        0
 Summary:        Fabric is a simple, Pythonic tool for remote execution and 
deployment
 License:        BSD-2-Clause

++++++ Fabric-1.4.1.tar.bz2 -> Fabric-1.4.2.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Fabric-1.4.1/Fabric.egg-info/PKG-INFO 
new/Fabric-1.4.2/Fabric.egg-info/PKG-INFO
--- old/Fabric-1.4.1/Fabric.egg-info/PKG-INFO   2012-04-05 06:03:11.000000000 
+0200
+++ new/Fabric-1.4.2/Fabric.egg-info/PKG-INFO   2012-05-08 08:13:37.000000000 
+0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.0
 Name: Fabric
-Version: 1.4.1
+Version: 1.4.2
 Summary: Fabric is a simple, Pythonic tool for remote execution and deployment.
 Home-page: http://fabfile.org
 Author: Jeff Forcier
@@ -8,7 +8,7 @@
 License: UNKNOWN
 Description: 
         To find out what's new in this version of Fabric, please see `the 
changelog
-        <http://docs.fabfile.org/en/1.4.1/changelog.html>`_.
+        <http://docs.fabfile.org/en/1.4.2/changelog.html>`_.
         
         You can also install the `in-development version
         <https://github.com/fabric/fabric/tarball/master#egg=fabric-dev>`_ 
using
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Fabric-1.4.1/Fabric.egg-info/requires.txt 
new/Fabric-1.4.2/Fabric.egg-info/requires.txt
--- old/Fabric-1.4.1/Fabric.egg-info/requires.txt       2012-04-05 
06:03:11.000000000 +0200
+++ new/Fabric-1.4.2/Fabric.egg-info/requires.txt       2012-05-08 
08:13:37.000000000 +0200
@@ -1 +1 @@
-ssh>=1.7.12
\ No newline at end of file
+ssh>=1.7.14
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Fabric-1.4.1/PKG-INFO new/Fabric-1.4.2/PKG-INFO
--- old/Fabric-1.4.1/PKG-INFO   2012-04-05 06:03:11.000000000 +0200
+++ new/Fabric-1.4.2/PKG-INFO   2012-05-08 08:13:37.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.0
 Name: Fabric
-Version: 1.4.1
+Version: 1.4.2
 Summary: Fabric is a simple, Pythonic tool for remote execution and deployment.
 Home-page: http://fabfile.org
 Author: Jeff Forcier
@@ -8,7 +8,7 @@
 License: UNKNOWN
 Description: 
         To find out what's new in this version of Fabric, please see `the 
changelog
-        <http://docs.fabfile.org/en/1.4.1/changelog.html>`_.
+        <http://docs.fabfile.org/en/1.4.2/changelog.html>`_.
         
         You can also install the `in-development version
         <https://github.com/fabric/fabric/tarball/master#egg=fabric-dev>`_ 
using
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Fabric-1.4.1/docs/changelog.rst 
new/Fabric-1.4.2/docs/changelog.rst
--- old/Fabric-1.4.1/docs/changelog.rst 2012-04-05 06:03:05.000000000 +0200
+++ new/Fabric-1.4.2/docs/changelog.rst 2012-05-08 08:13:35.000000000 +0200
@@ -25,6 +25,32 @@
 Changelog
 =========
 
+* :release:`1.4.2 <2012-05-07>`
+* :release:`1.3.7 <2012-05-07>`
+* :bug:`562` Agent forwarding would error out or freeze when multiple uses of
+  the forwarded agent were used per remote invocation (e.g. a single
+  `~fabric.operations.run` command resulting in multiple Git or SVN checkouts.)
+  This has been fixed thanks to Steven McDonald and GitHub user `@lynxis`.
+* :support:`626` Clarity updates to the tutorial. Thanks to GitHub user `m4z`
+  for the patches.
+* :bug:`625` `~fabric.context_managers.hide`/`~fabric.context_managers.show`
+  did not correctly restore prior display settings if an exception was raised
+  inside the block. This has been fixed.
+* :bug:`624` Login password prompts did not always display the username being
+  authenticated for. This has been fixed. Thanks to Nick Zalutskiy for catch &
+  patch.
+* :bug:`617` Fix the ``clean_revert`` behavior of
+  `~fabric.context_managers.settings` so it doesn't ``KeyError`` for newly
+  created settings keys. Thanks to Chris Streeter for the catch.
+* :bug:`616` Add port number to the error message displayed upon connection
+  failures.
+* :bug:`609` (and :issue:`564`) Document and clean up :ref:`env.sudo_prefix
+  <sudo_prefix>` so it can be more easily modified by users facing uncommon
+  use cases. Thanks to GitHub users `3point2` for the cleanup and `SirScott`
+  for the documentation catch.
+* :bug:`610` Change detection of ``env.key_filename``'s type (added as part of
+  SSH config support in 1.4) so it supports arbitrary iterables. Thanks to
+  Brandon Rhodes for the catch.
 * :release:`1.4.1 <2012-04-04>`
 * :release:`1.3.6 <2012-04-04>`
 * :bug:`608` Add ``capture`` kwarg to `~fabric.contrib.project.rsync_project`
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Fabric-1.4.1/docs/installation.rst 
new/Fabric-1.4.2/docs/installation.rst
--- old/Fabric-1.4.1/docs/installation.rst      2012-04-05 06:03:05.000000000 
+0200
+++ new/Fabric-1.4.2/docs/installation.rst      2012-05-08 08:13:35.000000000 
+0200
@@ -5,10 +5,23 @@
 Fabric is best installed via `pip <http://pip.openplans.org>`_ (highly
 recommended) or `easy_install
 <http://wiki.python.org/moin/CheeseShopTutorial>`_ (older, but still works
-fine). You may also opt to use your operating system's package manager (the
-package is typically called ``fabric`` or ``python-fabric``), or execute ``pip
-install -e .`` (or ``python setup.py install``) inside a :ref:`downloaded
-<downloads>` or :ref:`cloned <source-code-checkouts>` copy of the source code.
+fine), e.g.::
+
+    $ pip install fabric
+
+You may also opt to use your operating system's package manager; the package is
+typically called ``fabric`` or ``python-fabric``. E.g.::
+
+    $ sudo apt-get install fabric
+
+Advanced users wanting to install a development version may use ``pip`` to grab
+the latest master branch::
+
+    $ pip install fabric==dev
+
+Or, to install an editable version for debugging/hacking, execute ``pip install
+-e .`` (or ``python setup.py install``) inside a :ref:`downloaded <downloads>`
+or :ref:`cloned <source-code-checkouts>` copy of the source code.
 
 
 Dependencies
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Fabric-1.4.1/docs/tutorial.rst 
new/Fabric-1.4.2/docs/tutorial.rst
--- old/Fabric-1.4.1/docs/tutorial.rst  2012-03-21 00:14:37.000000000 +0100
+++ new/Fabric-1.4.2/docs/tutorial.rst  2012-04-26 19:56:52.000000000 +0200
@@ -37,9 +37,9 @@
     def hello():
         print("Hello world!")
 
-Placed in a Python module file named ``fabfile.py``, that function can be
-executed with the ``fab`` tool (installed as part of Fabric) and does just what
-you'd expect::
+Placed in a Python module file named ``fabfile.py`` in your current working
+directory, that ``hello`` function can be executed with the ``fab`` tool
+(installed as part of Fabric) and does just what you'd expect::
 
     $ fab hello
     Hello world!
@@ -99,8 +99,14 @@
 Fabric's API, which contains functions (or **operations**) for executing shell
 commands, transferring files, and so forth.
 
-Let's build a hypothetical Web application fabfile. Fabfiles usually work best
-at the root of a project::
+Let's build a hypothetical Web application fabfile. This example scenario is
+as follows: The Web application is managed via Git on a remote host
+``vcshost``. On ``localhost``, we have a local clone of said Web application.
+When we push changes back to ``vcshost``, we want to be able to immediately
+install these changes on a remote host ``my_server`` in an automated fashion.
+We will do this by automating the local and remote Git commands.
+
+Fabfiles usually work best at the root of a project::
 
     .
     |-- __init__.py
@@ -129,6 +135,7 @@
     def prepare_deploy():
         local("./manage.py test my_app")
         local("git add -p && git commit")
+        local("git push")
 
 The output of which might look a bit like this::
 
@@ -148,6 +155,10 @@
 
     <interactive Git add / git commit edit message session>
 
+    [localhost] run: git push
+
+    <git push session, possibly merging conflicts interactively>
+
     Done.
 
 The code itself is straightforward: import a Fabric API function,
@@ -172,9 +183,13 @@
     def commit():
         local("git add -p && git commit")
 
+    def push():
+        local("git push")
+
     def prepare_deploy():
         test()
         commit()
+        push()
 
 The ``prepare_deploy`` task can be called just as before, but now you can make
 a more granular call to one of the sub-tasks, if desired.
@@ -262,7 +277,8 @@
 ==================
 
 Let's start wrapping up our fabfile by putting in the keystone: a ``deploy``
-task that ensures the code on our server is up to date::
+task that is destined to run on one or more remote server(s), and ensures the
+code is up to date::
 
     def deploy():
         code_dir = '/srv/django/myproject'
@@ -278,7 +294,7 @@
   /to/some/directory`` call. This is similar to  `~fabric.context_managers.lcd`
   which does the same locally.
 * `~fabric.operations.run`, which is similar to `~fabric.operations.local` but
-  runs remotely instead of locally.
+  runs **remotely** instead of locally.
 
 We also need to make sure we import the new functions at the top of our file::
 
@@ -297,10 +313,12 @@
 
     Done.
 
-We never specified any connection info in our fabfile, so Fabric prompted us at
-runtime. Connection definitions use SSH-like "host strings" (e.g.
-``user@host:port``) and will use your local username as a default -- so in this
-example, we just had to specify the hostname, ``my_server``.
+We never specified any connection info in our fabfile, so Fabric doesn't know
+on which host(s) the remote command should be executed. When this happens,
+Fabric prompts us at runtime. Connection definitions use SSH-like "host
+strings" (e.g. ``user@host:port``) and will use your local username as a
+default -- so in this example, we just had to specify the hostname,
+``my_server``.
 
 
 Remote interactivity
@@ -415,18 +433,25 @@
         if result.failed and not confirm("Tests failed. Continue anyway?"):
             abort("Aborting at user request.")
 
-    def pack():
-        local('tar czf /tmp/my_project.tgz .')
+    def commit():
+        local("git add -p && git commit")
+
+    def push():
+        local("git push")
 
     def prepare_deploy():
         test()
-        pack()
+        commit()
+        push()
 
     def deploy():
-        put('/tmp/my_project.tgz', '/tmp/')
-        with cd('/srv/django/my_project/'):
-            run('tar xzf /tmp/my_project.tgz')
-            run('touch app.wsgi')
+        code_dir = '/srv/django/myproject'
+        with settings(warn_only=True):
+            if run("test -d %s" % code_dir).failed:
+                run("git clone user@vcshost:/path/to/repo/.git %s" % code_dir)
+        with cd(code_dir):
+            run("git pull")
+            run("touch app.wsgi")
 
 This fabfile makes use of a large portion of Fabric's feature set:
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Fabric-1.4.1/docs/usage/env.rst 
new/Fabric-1.4.2/docs/usage/env.rst
--- old/Fabric-1.4.1/docs/usage/env.rst 2012-04-05 06:03:05.000000000 +0200
+++ new/Fabric-1.4.2/docs/usage/env.rst 2012-05-08 08:13:35.000000000 +0200
@@ -539,17 +539,37 @@
 .. versionadded:: 1.4
 .. seealso:: :option:`--ssh-config-path`, :ref:`ssh-config`
 
+.. _sudo_prefix:
+
+``sudo_prefix``
+---------------
+
+**Default:** ``"sudo -S -p '%(sudo_prompt)s' " % env``
+
+The actual ``sudo`` command prefixed onto `~fabric.operations.sudo` calls'
+command strings. Users who do not have ``sudo`` on their default remote
+``$PATH``, or who need to make other changes (such as removing the ``-p`` when
+passwordless sudo is in effect) may find changing this useful.
+
+.. seealso::
+
+    The `~fabric.operations.sudo` operation; :ref:`env.sudo_prompt
+    <sudo_prompt>`
+
+.. _sudo_prompt:
 
 ``sudo_prompt``
 ---------------
 
-**Default:** ``sudo password:``
+**Default:** ``"sudo password:"``
 
 Passed to the ``sudo`` program on remote systems so that Fabric may correctly
-identify its password prompt. This may be modified by fabfiles but there's no
-real reason to.
+identify its password prompt.
+
+.. seealso::
 
-.. seealso:: The `~fabric.operations.sudo` operation
+    The `~fabric.operations.sudo` operation; :ref:`env.sudo_prefix
+    <sudo_prefix>`
 
 .. _timeout:
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Fabric-1.4.1/fabric/context_managers.py 
new/Fabric-1.4.2/fabric/context_managers.py
--- old/Fabric-1.4.1/fabric/context_managers.py 2012-04-05 06:03:05.000000000 
+0200
+++ new/Fabric-1.4.2/fabric/context_managers.py 2012-05-08 08:13:35.000000000 
+0200
@@ -22,15 +22,17 @@
     """
     Refactored subroutine used by ``hide`` and ``show``.
     """
-    # Preserve original values, pull in new given value to use
-    previous = {}
-    for group in output.expand_aliases(groups):
-        previous[group] = output[group]
-        output[group] = which
-    # Yield control
-    yield
-    # Restore original values
-    output.update(previous)
+    try:
+        # Preserve original values, pull in new given value to use
+        previous = {}
+        for group in output.expand_aliases(groups):
+            previous[group] = output[group]
+            output[group] = which
+        # Yield control
+        yield
+    finally:
+        # Restore original values
+        output.update(previous)
 
 
 @contextmanager
@@ -103,7 +105,10 @@
                 # value we set it to beforehand, we are OK to revert it to the
                 # pre-block value.
                 if value == state.env[key]:
-                    state.env[key] = previous[key]
+                    if key in previous:
+                        state.env[key] = previous[key]
+                    else:
+                        del state.env[key]
         else:
             state.env.update(previous)
             for key in new:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Fabric-1.4.1/fabric/network.py 
new/Fabric-1.4.2/fabric/network.py
--- old/Fabric-1.4.1/fabric/network.py  2012-04-05 06:03:05.000000000 +0200
+++ new/Fabric-1.4.2/fabric/network.py  2012-05-08 08:13:35.000000000 +0200
@@ -137,7 +137,7 @@
     from fabric.state import env
     keys = env.key_filename
     # For ease of use, coerce stringish key filename into list
-    if not isinstance(env.key_filename, (list, tuple)):
+    if isinstance(env.key_filename, basestring) or env.key_filename is None:
         keys = [keys]
     # Strip out any empty strings (such as the default value...meh)
     keys = filter(bool, keys)
@@ -383,8 +383,8 @@
                 continue
             # Override eror msg if we were retrying other errors
             if not_timeout:
-                msg = "Low level socket error connecting to host %s: %s" % (
-                    host, e[1]
+                msg = "Low level socket error connecting to host %s on port 
%s: %s" % (
+                    host, port, e[1]
                 )
             # Here, all attempts failed. Tweak error msg to show # tries.
             # TODO: find good humanization module, jeez
@@ -414,7 +414,7 @@
     handle_prompt_abort("a connection or sudo password")
     stream = stream or sys.stderr
     # Construct prompt
-    default = "[%s] Login password" % env.host_string
+    default = "[%s] Login password for '%s'" % (env.host_string, env.user)
     password_prompt = prompt if (prompt is not None) else default
     if not no_colon:
         password_prompt += ": "
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Fabric-1.4.1/fabric/operations.py 
new/Fabric-1.4.2/fabric/operations.py
--- old/Fabric-1.4.1/fabric/operations.py       2012-04-05 06:03:05.000000000 
+0200
+++ new/Fabric-1.4.2/fabric/operations.py       2012-05-08 08:13:35.000000000 
+0200
@@ -579,7 +579,7 @@
     Return ``env.sudo_prefix`` with ``user`` inserted if necessary.
     """
     # Insert env.sudo_prompt into env.sudo_prefix
-    prefix = env.sudo_prefix % env.sudo_prompt
+    prefix = env.sudo_prefix % env
     if user is not None:
         if str(user).isdigit():
             user = "#%s" % user
@@ -698,8 +698,9 @@
 
         # Use SSH agent forwarding from 'ssh' if enabled by user
         config_agent = ssh_config().get('forwardagent', 'no').lower() == 'yes'
+        forward = None
         if env.forward_agent or config_agent:
-            forward = ssh.agent.AgentClientProxy(channel)
+            forward = ssh.agent.AgentRequestHandler(channel)
 
         # Kick off remote command
         if invoke_shell:
@@ -740,6 +741,9 @@
 
         # Close channel
         channel.close()
+        # Close any agent forward proxies
+        if forward is not None:
+            forward.close()
 
         # Update stdout/stderr with captured values if applicable
         if not invoke_shell:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Fabric-1.4.1/fabric/state.py 
new/Fabric-1.4.2/fabric/state.py
--- old/Fabric-1.4.1/fabric/state.py    2012-04-05 06:03:05.000000000 +0200
+++ new/Fabric-1.4.2/fabric/state.py    2012-05-08 08:13:35.000000000 +0200
@@ -295,7 +295,7 @@
     'ssh_config_path': default_ssh_config_path,
     # -S so sudo accepts passwd via stdin, -p with our known-value prompt for
     # later detection (thus %s -- gets filled with env.sudo_prompt at runtime)
-    'sudo_prefix': "sudo -S -p '%s' ",
+    'sudo_prefix': "sudo -S -p '%(sudo_prompt)s' ",
     'sudo_prompt': 'sudo password:',
     'use_exceptions_for': {'network': False},
     'use_shell': True,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Fabric-1.4.1/fabric/version.py 
new/Fabric-1.4.2/fabric/version.py
--- old/Fabric-1.4.1/fabric/version.py  2012-04-05 06:03:05.000000000 +0200
+++ new/Fabric-1.4.2/fabric/version.py  2012-05-08 08:13:35.000000000 +0200
@@ -10,7 +10,7 @@
 from os.path import abspath, dirname
 
 
-VERSION = (1, 4, 1, 'final', 0)
+VERSION = (1, 4, 2, 'final', 0)
 
 
 def git_sha():
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Fabric-1.4.1/setup.py new/Fabric-1.4.2/setup.py
--- old/Fabric-1.4.1/setup.py   2012-04-05 06:03:05.000000000 +0200
+++ new/Fabric-1.4.2/setup.py   2012-05-08 08:13:35.000000000 +0200
@@ -38,7 +38,7 @@
     packages=find_packages(),
     test_suite='nose.collector',
     tests_require=['nose', 'fudge<1.0'],
-    install_requires=['ssh>=1.7.12'],
+    install_requires=['ssh>=1.7.14'],
     entry_points={
         'console_scripts': [
             'fab = fabric.main:main',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Fabric-1.4.1/tests/test_context_managers.py 
new/Fabric-1.4.2/tests/test_context_managers.py
--- old/Fabric-1.4.1/tests/test_context_managers.py     2012-04-05 
06:03:05.000000000 +0200
+++ new/Fabric-1.4.2/tests/test_context_managers.py     2012-05-08 
08:13:35.000000000 +0200
@@ -3,7 +3,7 @@
 from nose.tools import eq_, ok_
 
 from fabric.state import env, output
-from fabric.context_managers import cd, settings, lcd
+from fabric.context_managers import cd, settings, lcd, hide
 
 
 #
@@ -41,6 +41,25 @@
 
 
 #
+# hide/show
+#
+
+def test_hide_show_exception_handling():
+    """
+    hide()/show() should clean up OK if exceptions are raised
+    """
+    try:
+        with hide('stderr'):
+            # now it's False, while the default is True
+            eq_(output.stderr, False)
+            raise Exception
+    except Exception:
+        # Here it should be True again.
+        # If it's False, this means hide() didn't clean up OK.
+        eq_(output.stderr, True)
+
+
+#
 # settings()
 #
 
@@ -98,8 +117,15 @@
     """
     env.modified = "outer"
     env.notmodified = "outer"
-    with settings(modified="inner", notmodified="inner", clean_revert=True):
+    with settings(
+        modified="inner",
+        notmodified="inner",
+        inner_only="only",
+        clean_revert=True
+    ):
         eq_(env.modified, "inner")
         eq_(env.notmodified, "inner")
+        eq_(env.inner_only, "only")
         env.modified = "modified internally"
     eq_(env.modified, "modified internally")
+    ok_("inner_only" not in env)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Fabric-1.4.1/tests/test_network.py 
new/Fabric-1.4.2/tests/test_network.py
--- old/Fabric-1.4.1/tests/test_network.py      2012-04-05 06:03:05.000000000 
+0200
+++ new/Fabric-1.4.2/tests/test_network.py      2012-05-08 08:13:35.000000000 
+0200
@@ -282,7 +282,7 @@
         output.everything = False
         with password_response(PASSWORDS[env.user], silent=False):
             run("ls /simple")
-        regex = r'^\[%s\] Login password: ' % env.host_string
+        regex = r'^\[%s\] Login password for \'%s\': ' % (env.host_string, 
env.user)
         assert_contains(regex, sys.stderr.getvalue())
 
     @mock_streams('stderr')
@@ -297,7 +297,7 @@
         output.everything = False
         with password_response(CLIENT_PRIVKEY_PASSPHRASE, silent=False):
             run("ls /simple")
-        regex = r'^\[%s\] Login password: ' % env.host_string
+        regex = r'^\[%s\] Login password for \'%s\': ' % (env.host_string, 
env.user)
         assert_contains(regex, sys.stderr.getvalue())
 
     def test_sudo_prompt_display_passthrough(self):
@@ -328,20 +328,23 @@
         if display_output:
             expected = """
 [%(prefix)s] sudo: oneliner
-[%(prefix)s] Login password: 
+[%(prefix)s] Login password for '%(user)s': 
 [%(prefix)s] out: sudo password:
 [%(prefix)s] out: Sorry, try again.
 [%(prefix)s] out: sudo password: 
 [%(prefix)s] out: result
-""" % {'prefix': env.host_string}
+""" % {'prefix': env.host_string, 'user': env.user}
         else:
             # Note lack of first sudo prompt (as it's autoresponded to) and of
             # course the actual result output.
             expected = """
 [%(prefix)s] sudo: oneliner
-[%(prefix)s] Login password: 
+[%(prefix)s] Login password for '%(user)s': 
 [%(prefix)s] out: Sorry, try again.
-[%(prefix)s] out: sudo password: """ % {'prefix': env.host_string}
+[%(prefix)s] out: sudo password: """ % {
+    'prefix': env.host_string,
+    'user': env.user
+}
         eq_(expected[1:], sys.stdall.getvalue())
 
     @mock_streams('both')
@@ -364,7 +367,7 @@
             sudo('twoliner')
         expected = """
 [%(prefix)s] sudo: oneliner
-[%(prefix)s] Login password: 
+[%(prefix)s] Login password for '%(user)s': 
 [%(prefix)s] out: sudo password:
 [%(prefix)s] out: Sorry, try again.
 [%(prefix)s] out: sudo password: 
@@ -373,7 +376,7 @@
 [%(prefix)s] out: sudo password:
 [%(prefix)s] out: result1
 [%(prefix)s] out: result2
-""" % {'prefix': env.host_string}
+""" % {'prefix': env.host_string, 'user': env.user}
         eq_(expected[1:], sys.stdall.getvalue())
 
     @mock_streams('both')
@@ -400,12 +403,12 @@
                 run('silent')
         expected = """
 [%(prefix)s] run: normal
-[%(prefix)s] Login password: 
+[%(prefix)s] Login password for '%(user)s': 
 [%(prefix)s] out: foo
 [%(prefix)s] run: silent
 [%(prefix)s] run: normal
 [%(prefix)s] out: foo
-""" % {'prefix': env.host_string}
+""" % {'prefix': env.host_string, 'user': env.user}
         eq_(expected[1:], sys.stdall.getvalue())
 
     @mock_streams('both')
@@ -428,12 +431,12 @@
             run('twoliner')
         expected = """
 [%(prefix)s] run: oneliner
-[%(prefix)s] Login password: 
+[%(prefix)s] Login password for '%(user)s': 
 [%(prefix)s] out: result
 [%(prefix)s] run: twoliner
 [%(prefix)s] out: result1
 [%(prefix)s] out: result2
-""" % {'prefix': env.host_string}
+""" % {'prefix': env.host_string, 'user': env.user}
         eq_(expected[1:], sys.stdall.getvalue())
 
     @mock_streams('both')
@@ -457,12 +460,12 @@
                 run('twoliner')
         expected = """
 [%(prefix)s] run: oneliner
-[%(prefix)s] Login password: 
+[%(prefix)s] Login password for '%(user)s': 
 result
 [%(prefix)s] run: twoliner
 result1
 result2
-""" % {'prefix': env.host_string}
+""" % {'prefix': env.host_string, 'user': env.user}
         eq_(expected[1:], sys.stdall.getvalue())
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Fabric-1.4.1/tests/test_operations.py 
new/Fabric-1.4.2/tests/test_operations.py
--- old/Fabric-1.4.1/tests/test_operations.py   2012-02-26 04:35:12.000000000 
+0100
+++ new/Fabric-1.4.2/tests/test_operations.py   2012-04-06 19:29:39.000000000 
+0200
@@ -145,7 +145,7 @@
     """
     eq_(
         _sudo_prefix(user="foo"),
-        "%s -u \"foo\" " % (env.sudo_prefix % env.sudo_prompt)
+        "%s -u \"foo\" " % (env.sudo_prefix % env)
     )
 
 
@@ -153,7 +153,7 @@
     """
     _sudo_prefix() returns standard prefix when user is empty
     """
-    eq_(_sudo_prefix(user=None), env.sudo_prefix % env.sudo_prompt)
+    eq_(_sudo_prefix(user=None), env.sudo_prefix % env)
 
 
 @with_settings(use_shell=True)

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to