Rev 6160: Allows bzr shelve to be used in test scripts and under emacs shells in file:///home/vila/src/bzr/bugs/856261-unshelve-line-based/
Vincent Ladeuil
v.ladeuil+lp at free.fr
Wed Sep 28 15:06:42 UTC 2011
At file:///home/vila/src/bzr/bugs/856261-unshelve-line-based/
------------------------------------------------------------
revno: 6160
revision-id: v.ladeuil+lp at free.fr-20110928150642-e5m0w1oqc0effxr8
parent: v.ladeuil+lp at free.fr-20110928144944-gly88bevm0ivj4ms
fixes bug: https://launchpad.net/bugs/856261
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: 856261-unshelve-line-based
timestamp: Wed 2011-09-28 17:06:42 +0200
message:
Allows bzr shelve to be used in test scripts and under emacs shells
-------------- next part --------------
=== modified file 'bzrlib/tests/script.py'
--- a/bzrlib/tests/script.py 2011-01-12 01:01:53 +0000
+++ b/bzrlib/tests/script.py 2011-09-28 15:06:42 +0000
@@ -481,6 +481,10 @@
def setUp(self):
super(TestCaseWithMemoryTransportAndScript, self).setUp()
self.script_runner = ScriptRunner()
+ # FIXME: See shelf_ui.Shelver._char_based. This allow using shelve in
+ # scripts while providing a line-based input (better solution in
+ # progress). -- vila 2011-09-28
+ self.overrideEnv('INSIDE_EMACS', '1')
def run_script(self, script, null_output_matches_anything=False):
return self.script_runner.run_script(self, script,
@@ -511,6 +515,10 @@
def setUp(self):
super(TestCaseWithTransportAndScript, self).setUp()
self.script_runner = ScriptRunner()
+ # FIXME: See shelf_ui.Shelver._char_based. This allow using shelve in
+ # scripts while providing a line-based input (better solution in
+ # progress). -- vila 2011-09-28
+ self.overrideEnv('INSIDE_EMACS', '1')
def run_script(self, script, null_output_matches_anything=False):
return self.script_runner.run_script(self, script,
=== modified file 'bzrlib/tests/test_script.py'
--- a/bzrlib/tests/test_script.py 2011-09-28 14:49:44 +0000
+++ b/bzrlib/tests/test_script.py 2011-09-28 15:06:42 +0000
@@ -608,7 +608,6 @@
""")
def test_shelve(self):
- self.overrideEnv('INSIDE_EMACS', '1')
self.run_script("""
$ bzr shelve -m 'shelve bar'
# Shelve? [yNfq?]
@@ -628,7 +627,6 @@
""")
def test_dont_shelve(self):
- self.overrideEnv('INSIDE_EMACS', '1')
# We intentionally provide no input here to test EOF
self.run_script("""
$ bzr shelve -m 'shelve bar'
=== modified file 'doc/en/release-notes/bzr-2.5.txt'
--- a/doc/en/release-notes/bzr-2.5.txt 2011-09-21 00:33:17 +0000
+++ b/doc/en/release-notes/bzr-2.5.txt 2011-09-28 15:06:42 +0000
@@ -32,6 +32,10 @@
.. Fixes for situations where bzr would previously crash or give incorrect
or undesirable results.
+* ``bzr shelve`` can now be used in emacs shells as the input handling is
+ turned into a line-basde one when ``INSIDE_EMACS`` is set (which is the
+ case for all recent emacs versions). (Vincent Ladeuil, #856261)
+
* Redirects between http and https no longer discard path information
in some cases. (Jelmer Vernooij, #853765)
@@ -58,6 +62,9 @@
Testing
*******
+* Test scripts can now use ``bzr shelve`` and provide their input as
+ complete lines. (Vincent Ladeuil, #856261)
+
.. Fixes and changes that are only relevant to bzr's test framework and
suite. This can include new facilities for writing tests, fixes to
spurious test failures and changes to the way things should be tested.
More information about the bazaar-commits
mailing list