From: W. Trevor King Date: Tue, 21 Jul 2009 20:33:28 +0000 (-0400) Subject: Merged assorted changes from be.wtk-rr for BugDir.extra_strings. X-Git-Tag: 1.0.0~62^2~46^2~10 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=885b04b50ad3bbde81ec2eccfbfb2e516d0d3a80;p=be.git Merged assorted changes from be.wtk-rr for BugDir.extra_strings. Other highlights: * be show --no-comments * Improved *.sync_with_disk. * Improved be-mbox-to-xml. --- 885b04b50ad3bbde81ec2eccfbfb2e516d0d3a80 diff --cc Makefile index cc2f91c,b1207c2..29ed94a --- a/Makefile +++ b/Makefile @@@ -38,9 -38,9 +38,9 @@@ MODULES += ${DOC_DIR RM = rm -#PREFIX = /usr/local -PREFIX = ${HOME} -INSTALL_OPTIONS = "--prefix=${PREFIX}" +PREFIX = /usr/local - PREFIX = ${HOME} ++#PREFIX = ${HOME} +#INSTALL_OPTIONS = "--prefix=${PREFIX}" .PHONY: all diff --cc becommands/merge.py index c7cae2b,4aaefa8..8e1fd50 --- a/becommands/merge.py +++ b/becommands/merge.py @@@ -35,9 -36,8 +36,8 @@@ def execute(args, manipulate_encodings= >>> dummy.time = 1 >>> dummy = dummy.new_reply("1 2 3 4") >>> 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") diff --cc becommands/open.py index ee81422,2ef5f43..b98463d --- a/becommands/open.py +++ b/becommands/open.py @@@ -40,11 -40,9 +40,10 @@@ def execute(args, manipulate_encodings= raise cmdutil.UsageError, "Please specify a bug id." if len(args) > 1: 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) bug = bd.bug_from_shortname(args[0]) bug.status = "open" - bd.save() def get_parser(): parser = cmdutil.CmdOptionParser("be open BUG-ID") diff --cc becommands/remove.py index d6ba999,d79a7be..884b792 --- a/becommands/remove.py +++ b/becommands/remove.py @@@ -40,11 -40,9 +40,10 @@@ def execute(args, manipulate_encodings= bugid_args={0: lambda bug : bug.active==True}) if len(args) != 1: raise cmdutil.UsageError, "Please specify a bug id." - bd = bugdir.BugDir(from_disk=True, manipulate_encodings=not test) + bd = bugdir.BugDir(from_disk=True, + manipulate_encodings=manipulate_encodings) bug = bd.bug_from_shortname(args[0]) bd.remove_bug(bug) - bd.save() print "Removed bug %s" % bug.uuid def get_parser(): diff --cc becommands/show.py index ae1c7f3,e43cfb9..b7bfe78 --- a/becommands/show.py +++ b/becommands/show.py @@@ -57,8 -57,9 +57,10 @@@ def execute(args, manipulate_encodings= bugid_args={-1: lambda bug : bug.active==True}) if len(args) == 0: raise cmdutil.UsageError - bd = bugdir.BugDir(from_disk=True, manipulate_encodings=not test) + bd = bugdir.BugDir(from_disk=True, + manipulate_encodings=manipulate_encodings) + if options.XML: + print '' % bd.encoding for shortname in args: if shortname.count(':') > 1: raise cmdutil.UserError("Invalid id '%s'." % shortname) diff --cc becommands/tag.py index 2932589,216ffbc..5c4b7a6 --- a/becommands/tag.py +++ b/becommands/tag.py @@@ -56,8 -57,7 +57,7 @@@ def execute(args, manipulate_encodings= >>> a.extra_strings = [] >>> print a.extra_strings [] - >>> a.save() - >>> execute(["a"], test=True) + >>> execute(["a"], manipulate_encodings=False) >>> bd._clear_bugs() # resync our copy of bug >>> a = bd.bug_from_shortname("a") >>> print a.extra_strings