diff options
author | Chris Ball <cjb@laptop.org> | 2009-10-05 23:15:39 -0400 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2009-10-05 23:15:39 -0400 |
commit | b6a50c703369467132876f21efa8e4ffc672afae (patch) | |
tree | 905a9ae34efa2bce47d754893093b016d18d0162 /becommands/set.py | |
parent | 6a639574fa95e50f82fa3052e5524b961295a7ab (diff) | |
parent | e35ccf95ea89b6e622202caae30d3b8cca3f2473 (diff) | |
download | bugseverywhere-b6a50c703369467132876f21efa8e4ffc672afae.tar.gz |
Large merge from W. Trevor King, including Gianluca's HTML export.
Diffstat (limited to 'becommands/set.py')
-rw-r--r-- | becommands/set.py | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/becommands/set.py b/becommands/set.py index 0c0862f..f7e68d3 100644 --- a/becommands/set.py +++ b/becommands/set.py @@ -19,7 +19,7 @@ # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. """Change tree settings""" import textwrap -from libbe import cmdutil, bugdir, rcs, settings_object +from libbe import cmdutil, bugdir, vcs, settings_object __desc__ = __doc__ def _value_string(bd, setting): @@ -32,26 +32,28 @@ def _value_string(bd, setting): val = None return str(val) -def execute(args, test=False): +def execute(args, manipulate_encodings=True): """ >>> import os - >>> bd = bugdir.simple_bug_dir() + >>> bd = bugdir.SimpleBugDir() >>> os.chdir(bd.root) - >>> execute(["target"], test=True) + >>> execute(["target"], manipulate_encodings=False) None - >>> execute(["target", "tomorrow"], test=True) - >>> execute(["target"], test=True) + >>> execute(["target", "tomorrow"], manipulate_encodings=False) + >>> execute(["target"], manipulate_encodings=False) tomorrow - >>> execute(["target", "none"], test=True) - >>> execute(["target"], test=True) + >>> execute(["target", "none"], manipulate_encodings=False) + >>> execute(["target"], manipulate_encodings=False) None + >>> bd.cleanup() """ parser = get_parser() options, args = parser.parse_args(args) complete(options, args, parser) if len(args) > 2: 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) if len(args) == 0: keys = bd.settings_properties keys.sort() @@ -85,12 +87,12 @@ def get_bugdir_settings(): set = getattr(bugdir.BugDir, s) dstr = set.__doc__.strip() # per-setting comment adjustments - if s == "rcs_name": + if s == "vcs_name": lines = dstr.split('\n') while lines[0].startswith("This property defaults to") == False: lines.pop(0) assert len(lines) != None, \ - "Unexpected rcs_name docstring:\n '%s'" % dstr + "Unexpected vcs_name docstring:\n '%s'" % dstr lines.insert( 0, "The name of the revision control system to use.\n") dstr = '\n'.join(lines) |