aboutsummaryrefslogtreecommitdiffstats
path: root/becommands/merge.py
diff options
context:
space:
mode:
authorW. Trevor King <wking@drexel.edu>2009-07-16 05:50:31 -0400
committerW. Trevor King <wking@drexel.edu>2009-07-16 05:50:31 -0400
commitdfb7878b674e8eed1cfa55928d5464dc6fb0f085 (patch)
tree7544d8433e20167c184bffda64dd8e3455e96d53 /becommands/merge.py
parentb39f68dcb0ecdc5f2c3f12fe75b47ff1f4d51e86 (diff)
downloadbugseverywhere-dfb7878b674e8eed1cfa55928d5464dc6fb0f085.tar.gz
Renamed test->manipulate_encodings in becommands.*.execute.
Reminder from my initial libbe/encoding.py commit: Because of the stdout replacement, the doctests executes now need an optional 'test' argument to turn off replacement during the doctests, otherwise doctest flips out (since it had set up stdout to catch output, and then we clobbered it's setup). I'm also trying to catch stdout/stderr from be-handle-mail, and I ran into the same problem. It took me a bit to remember exactly what "test" was supposed to do, so I thought I'd make the argument name more specific. If you need other changes when running in "test" mode, you'll have to add other kwargs.
Diffstat (limited to 'becommands/merge.py')
-rw-r--r--becommands/merge.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/becommands/merge.py b/becommands/merge.py
index c030dd0..c7cae2b 100644
--- a/becommands/merge.py
+++ b/becommands/merge.py
@@ -18,7 +18,7 @@ from libbe import cmdutil, bugdir
import os, copy
__desc__ = __doc__
-def execute(args, test=False):
+def execute(args, manipulate_encodings=True):
"""
>>> from libbe import utility
>>> bd = bugdir.simple_bug_dir()
@@ -37,7 +37,7 @@ def execute(args, test=False):
>>> dummy.time = 2
>>> bd.save()
>>> os.chdir(bd.root)
- >>> execute(["a", "b"], test=True)
+ >>> execute(["a", "b"], manipulate_encodings=False)
Merging bugs a and b
>>> bd._clear_bugs()
>>> a = bd.bug_from_shortname("a")
@@ -133,7 +133,8 @@ def execute(args, test=False):
help()
raise cmdutil.UsageError("Too many arguments.")
- bd = bugdir.BugDir(from_disk=True, manipulate_encodings=not test)
+ bd = bugdir.BugDir(from_disk=True,
+ manipulate_encodings=manipulate_encodings)
bugA = bd.bug_from_shortname(args[0])
bugA.load_comments()
bugB = bd.bug_from_shortname(args[1])