Merged assorted changes from be.wtk-rr for BugDir.extra_strings.
authorW. Trevor King <wking@drexel.edu>
Tue, 21 Jul 2009 20:33:28 +0000 (16:33 -0400)
committerW. Trevor King <wking@drexel.edu>
Tue, 21 Jul 2009 20:33:28 +0000 (16:33 -0400)
Other highlights:
  * be show --no-comments
  * Improved *.sync_with_disk.
  * Improved be-mbox-to-xml.

15 files changed:
1  2 
Makefile
becommands/comment.py
becommands/depend.py
becommands/diff.py
becommands/merge.py
becommands/new.py
becommands/open.py
becommands/remove.py
becommands/set.py
becommands/severity.py
becommands/show.py
becommands/status.py
becommands/tag.py
becommands/target.py
interfaces/xml/be-mbox-to-xml

diff --cc Makefile
index cc2f91cfff1d8d70b115fa2b22c52a84cc62cfff,b1207c2baaa62daed53dddd6b41a7b7831d20754..29ed94ad66e357e248d9a126b69638335e9138a4
+++ 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}"
  
  \f
  .PHONY: all
Simple merge
Simple merge
Simple merge
index c7cae2b9f762ab6054d3dfaa6bc2c948e776710c,4aaefa85a7fd16ef83e47ec6a022eb2c45cc0252..8e1fd50225175e2a68df09264cdf5e529c1aaf2c
@@@ -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")
Simple merge
index ee81422714cb017cfe0456e186acc788bae07d4a,2ef5f4303aa628d58091bbc053b58e027194d6f8..b98463d055008b31a0c60e1141a0828f76d4e4d0
@@@ -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")
index d6ba999dfcf103113cb1436f2b939cdbd0488334,d79a7bef125712497bf824370c65d85855ea88a9..884b792a58c0061b5cc653fc5bd821e872645c6d
@@@ -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():
Simple merge
Simple merge
index ae1c7f397c3bcb4d70082edf46e5953d3b91d73a,e43cfb9391303b0ae3256dfb1bb9bc525dbf108c..b7bfe78915bf299f6287c01dffb5792464d03f53
@@@ -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 '<?xml version="1.0" encoding="%s" ?>' % bd.encoding
      for shortname in args:
          if shortname.count(':') > 1:
              raise cmdutil.UserError("Invalid id '%s'." % shortname)        
Simple merge
index 29325891f2ab01708d2c57713611d732a5b7c67b,216ffbcbe00e1b50fc1995c7cb6509a9f18cf33f..5c4b7a6e3eb8eb8e22890a27f8ca0138b04cff97
@@@ -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
Simple merge
Simple merge