be.git
15 years agoAdded darcs support.
W. Trevor King [Tue, 30 Jun 2009 15:29:06 +0000 (11:29 -0400)]
Added darcs support.

I don't know much darcs, so I make no claims about the beauty of my
implementation.  It seems to get the job done though, until a darcs
guru comes along.

I also tweaked the libbe.git.Git._rcs_get_user_id to handle the case
where user.name or user.email are not set.

I also added the option to pass a stdin string into the
libbe.rcs.RCS._u_invoke* functions.

15 years agoRemove blank line from bug.xml() output when bug has no comments.
W. Trevor King [Tue, 30 Jun 2009 15:00:46 +0000 (11:00 -0400)]
Remove blank line from bug.xml() output when bug has no comments.

15 years agoAdded ability to handle non text/* MIME types.
W. Trevor King [Fri, 26 Jun 2009 13:27:50 +0000 (09:27 -0400)]
Added ability to handle non text/* MIME types.

The main problem was the encoding/decoding that was happening to _all_
input/output.  Now many I/O activities have a `binary' option to
disable any encoding/decoding.  The `binary' flag is set whenever the
comment content-type is not a text/* type.

In order to print valid XML (and make life easy on xml/be-xml-to-mbox),
non text/* types are printed out as base64-encoded MIME messages, so
  be list --xml | be-xml-to-mbox | catmutt
works as you'd expect.

With the standard (non-XML) output from `be show', we just print a
message telling the user that we can't reasonably display the MIME
type and that they should use the XML output if they want to see it.

15 years agoUpdated help strings, man page, and completions
W. Trevor King [Fri, 26 Jun 2009 01:57:02 +0000 (21:57 -0400)]
Updated help strings, man page, and completions

15 years agoFixed libbe.rcs.RCS.installed to handle missing backend binary.
wking [Thu, 25 Jun 2009 21:10:57 +0000 (17:10 -0400)]
Fixed libbe.rcs.RCS.installed to handle missing backend binary.

This makes all the failed tests understandable, since they all crash
with strings like:
  AssertionError: Arch RCS not found
Which makes more sense than spitting out the raw CommandError.

It also means that installed_rcs() actually works now ;).

15 years agoUpdated .bzringore and Makefile.GENERATED_FILES
W. Trevor King [Thu, 25 Jun 2009 17:42:19 +0000 (13:42 -0400)]
Updated .bzringore and Makefile.GENERATED_FILES

15 years agoAdded auto-generated version info. (be --version)
W. Trevor King [Thu, 25 Jun 2009 17:31:31 +0000 (13:31 -0400)]
Added auto-generated version info. (be --version)

15 years agoRemove blank line from tag's output if no tags exist
W. Trevor King [Thu, 25 Jun 2009 17:30:23 +0000 (13:30 -0400)]
Remove blank line from tag's output if no tags exist

15 years agoAdded regexp matching to `be list --extra-strings'
W. Trevor King [Thu, 25 Jun 2009 14:05:25 +0000 (10:05 -0400)]
Added regexp matching to `be list --extra-strings'

15 years agoAdded extra_strings functionality to libbe.bug.xml and be-xml-to-mbox.
W. Trevor King [Thu, 25 Jun 2009 13:51:41 +0000 (09:51 -0400)]
Added extra_strings functionality to libbe.bug.xml and be-xml-to-mbox.

15 years agoMerged extra-strings branch, adding be tag/depend.
W. Trevor King [Thu, 25 Jun 2009 13:11:32 +0000 (09:11 -0400)]
Merged extra-strings branch, adding be tag/depend.

15 years agoAdded `be depend'.
W. Trevor King [Thu, 25 Jun 2009 13:10:04 +0000 (09:10 -0400)]
Added `be depend'.

This closes bug 7ec2c071-9630-42b0-b08a-9854616f9144.  BE is now bug
free ;).  At least until the next commit :p.

Writing depend.py turned up a few style points in tag.py which I also
fixed.

15 years agoAdded `be tag --list' to list all tags.
W. Trevor King [Thu, 25 Jun 2009 12:30:52 +0000 (08:30 -0400)]
Added `be tag --list' to list all tags.

Loading all the bugs for the list search had the side effect of
updating all the bug values files to the new YAML format.

15 years agoAdded -e/--extra-strings option to `be list`
W. Trevor King [Thu, 25 Jun 2009 12:16:47 +0000 (08:16 -0400)]
Added -e/--extra-strings option to `be list`

Now you can limit your list to bugs matching certain extra strings,
e.g. "TAG:working".

15 years agoFixed settings=None bug when bug values file is blank/missing.
W. Trevor King [Thu, 25 Jun 2009 12:05:43 +0000 (08:05 -0400)]
Fixed settings=None bug when bug values file is blank/missing.

Just return an empty dict instead.

Steps to reproduce:

  $ mkdir /tmp/BE-test
  $ cd /tmp/BE-test
  $ be set-root
  $ be new 'having too much fun'

15 years agotag --remove now returns bug.settings["extra_strings"] to EMPTY.
W. Trevor King [Thu, 25 Jun 2009 11:45:57 +0000 (07:45 -0400)]
tag --remove now returns bug.settings["extra_strings"] to EMPTY.

extra_strings returns to a defaulting property from a cached/generator
property, with the help of the new, mutable defaults.  Lots of
deepcopies avoid mutable default uncertainty too ;).  And
copy.deepcopy([]) should be pretty cheap.

tag --remove had previously left settings["extra_strings"] as [],
which polluted the bug's values file.  Now the improved
defaulting_property notices a return to the default [], and sets the
internally stored value to EMPTY.

I struggled with creating a more intuitive way to notice changes to
extra_strings than the
  tmp = bug.extra_strings
  <work on tmp>
  bug.extra_strings = tmp
but didn't have any luck.  The problem seems to be that if you only
hand out copies of your default, you don't have any pointers to what
you handed out to check for changes.  On the other hand, if you hand
out your original default, any external changes will _change_ your
original default.  I suppose you could only hand out copies, but keep
a list of all copies handed out, but that sounds like a disaster.
Reassigning is easy enough.

15 years agoMerged from main branch. I like my version better ;).
W. Trevor King [Wed, 24 Jun 2009 21:58:41 +0000 (17:58 -0400)]
Merged from main branch.  I like my version better ;).

15 years ago`be target list` -> `be target --list` to standardize syntax.
W. Trevor King [Wed, 24 Jun 2009 21:41:56 +0000 (17:41 -0400)]
`be target list` -> `be target --list` to standardize syntax.

And avoid confusion with bugs who's shorname is `list'? ;)

Now the usage info and help string also reflect the new method.

15 years agoAdd documentation and testcase for "be target list".
Chris Ball [Wed, 24 Jun 2009 21:40:59 +0000 (17:40 -0400)]
Add documentation and testcase for "be target list".

15 years agoOnly print a target in "be target list" if it's a string.
Gianluca Montecchi [Wed, 24 Jun 2009 21:26:50 +0000 (17:26 -0400)]
Only print a target in "be target list" if it's a string.

15 years agoAdd "be target list", to show a list of existing targets.
Chris Ball [Wed, 24 Jun 2009 21:25:02 +0000 (17:25 -0400)]
Add "be target list", to show a list of existing targets.

15 years agoMerge with W. Trevor King's tree.
Chris Ball [Wed, 24 Jun 2009 21:24:25 +0000 (17:24 -0400)]
Merge with W. Trevor King's tree.

15 years agoAdd ability to list all current targets.
Gianluca Montecchi [Wed, 24 Jun 2009 21:20:12 +0000 (17:20 -0400)]
Add ability to list all current targets.

From his Wed, 24 Jun 2009 23:08:25 +0200 email to the list:

Hello

As I noted some time ago, there is not a way to list all the present targets
in the current repository.

At the time, Chris send me a patch to have this feature, but it still not
merged in the last revision (314).

So this is a patch for this feature to apply against revision 314. It is
basically a port of the old Chris's patch.

bye
Gianluca

15 years agoUse generator instead of default for libbe.bug.Bug.extra_strings.
W. Trevor King [Tue, 23 Jun 2009 23:59:50 +0000 (19:59 -0400)]
Use generator instead of default for libbe.bug.Bug.extra_strings.

This avoids the problems associated with mutable defaults.

15 years agoAdded test case for mutables to libbe/settings_object.
W. Trevor King [Tue, 23 Jun 2009 23:52:20 +0000 (19:52 -0400)]
Added test case for mutables to libbe/settings_object.

This continues the line of changes started in libbe/properties with
the last two commits.  Also straightened up stranch double-default in
libbe.settings_object.versioned_property and moved the fn_checked
before checked, which shouldn't matter because I never use both at
once, and can't think of a case where you'd want to.

I've also added some docstrings to the settings_object unit tests,
since apparently docstrings get printed during the test if they exist,
and they look nicer than the name of the unittest itself.  More like
./configure output ;).

15 years agoCleaned up libbe.propertied.change_hook_property for mutables.
W. Trevor King [Tue, 23 Jun 2009 18:05:36 +0000 (14:05 -0400)]
Cleaned up libbe.propertied.change_hook_property for mutables.

Now (except for a wimpy hash function) it's as good as it's going to
get for true mutables.  Calls to change_hook occur for all changes,
sometime after the change-enducing action and before the next
attribute access.  See testChangeHookMutableProperty for an example of
the expected behavior.

If you're doing some mutable-modification (e.g. t.x.append(5)) and you
want to `flush' the changes into a change_hook call, just assign t.x
to a dummy variable.  e.g.
  t.x.append(5)
  dummy = t.x

If you _really_ need post-modification change_hook calls without such
a flush, you're on your own.  Would you get the property-owning class
to poll for changes?

15 years agoAdded becommands/tag.py
W. Trevor King [Tue, 23 Jun 2009 15:44:06 +0000 (11:44 -0400)]
Added becommands/tag.py

Oops, I forgot to add becommands/tag.py with my last commit.  Here it
is now, with the added ability to remove tags.

15 years agoAdded Bug.extra_strings to support add-on functionality, e.g. `be tag`.
W. Trevor King [Tue, 23 Jun 2009 15:35:23 +0000 (11:35 -0400)]
Added Bug.extra_strings to support add-on functionality, e.g. `be tag`.

Versioned properties whose data is a mutable type are tricky, since
the simple comparisons we'd been using in
libbe.properties.change_hook_property don't work for mutables.  For
now, we avoid that problem by assuming a change happened whenever a
mutable property is set.  change_hook_property is a bit untidy at the
moment while I work out how to deal with mutables.

As an example of using Bug.extra_strings to patch on some useful
functionality, I've written becommands/tag.py.  I'd suggest future
add-ons (e.g. becommands/depend.py?) use the "<LABEL>:<value>" string
format to keep it easy to sort out which strings belong to which
add-ons.  tag.py is still missing command line tag-removal and
tag-searching for `be list'.  Perhaps something like

  be list --extra-strings TAG:<your-tag>,TAG:<another-tag>,DEPEND:<bug-id>

would be good, although it would requre escaping commas from the tags,
or refusing to allow commas in the tags...

libbe.properties.ValueCheckError also got a minor update so the
printed error message makes sense when raised with allowed being an
iterable (i.e. check_property) or a function
(e.g. fn_checked_property).

All of this digging around turned up a really buggy
libbe.bugdir.MultipleBugMatches.  Obviously I had never actually
called it before :p.  Should be fixed now.

libbe.comment._set_comment_body has also been normalized to match the
suggested change_hook interface: change_hook(self, old, new).
Although, I'm not sure why it hadn't been causing obvious problems
before, so maybe I'm misunderstanding something about that.

15 years agoConsolidated outstanding bugs.
W. Trevor King [Mon, 22 Jun 2009 21:31:13 +0000 (17:31 -0400)]
Consolidated outstanding bugs.

Only one live bug left:
  7ec2c071-9630-42b0-b08a-9854616f9144

I've decided (mostly due to the huge Trac post, see bug comments) to
_not_ hardcode dependencies, but to add an attribute-creation
mechanism that a becommand/depend.py could use for dependency
tracking.  Time for a new branch to think this out...

15 years agoAdded `be list --sort *` for user-selectable sorting.
W. Trevor King [Mon, 22 Jun 2009 20:27:46 +0000 (16:27 -0400)]
Added `be list --sort *` for user-selectable sorting.

Also added libbe.bug.cmp_last_modified, which handles part of
9ce2f015-8ea0-43a5-a03d-fc36f6d202fe.  To do better we could extend
the RCS framework.

I also transcribed a few emails from the be-devel list onto their
relavent bugs and closed a few bugs.

Finally, I removed some left over InvalidValue cruft.

15 years agoUse Comment.content_type in xml output.
W. Trevor King [Mon, 22 Jun 2009 18:30:42 +0000 (14:30 -0400)]
Use Comment.content_type in xml output.

15 years agoMerged be-xml-to-mbox
W. Trevor King [Mon, 22 Jun 2009 16:20:09 +0000 (12:20 -0400)]
Merged be-xml-to-mbox

15 years agoCreated be-xml-to-mbox.
W. Trevor King [Mon, 22 Jun 2009 16:16:27 +0000 (12:16 -0400)]
Created be-xml-to-mbox.

Converts the output of `be list --xml` mbox format.
For example:
  $ be list --xml | be-xml-to-mbox | catmutt

15 years agoOnly print RFC 2822 date in bug xml output.
W. Trevor King [Mon, 22 Jun 2009 15:50:09 +0000 (11:50 -0400)]
Only print RFC 2822 date in bug xml output.

15 years agoEscape XML strings.
W. Trevor King [Mon, 22 Jun 2009 14:39:05 +0000 (10:39 -0400)]
Escape XML strings.

Since
  <creator>John Doe <jdoe@example.com></creator>
is not valid XML.

15 years agoAdjusted catmutt for portability following Mortiz' suggestions.
W. Trevor King [Mon, 22 Jun 2009 14:15:07 +0000 (10:15 -0400)]
Adjusted catmutt for portability following Mortiz' suggestions.

15 years agoFixed libbe.settings_object.EMPTY output in bug/comment XML.
W. Trevor King [Mon, 22 Jun 2009 14:02:11 +0000 (10:02 -0400)]
Fixed libbe.settings_object.EMPTY output in bug/comment XML.

The xml() method hadn't been updated since the settings_object revamp.

15 years agoAdjusted comment XML fields for consistency.
W. Trevor King [Mon, 22 Jun 2009 13:15:22 +0000 (09:15 -0400)]
Adjusted comment XML fields for consistency.

Renamed "name" -> "short-name" and "in_reply_to" -> "in-reply-to".
Reordered uuid before short-name.

15 years agoConverted xml/grepm to xml/catmutt.
W. Trevor King [Mon, 22 Jun 2009 12:38:09 +0000 (08:38 -0400)]
Converted xml/grepm to xml/catmutt.

Now
  $ cat example.mbox | catmutt
works.  Onwards to be-xml-to-mbox!

15 years agoAdded grepm as a template for an output-mbox-to-mutt script.
Moritz Barsnick (at dot) [Mon, 22 Jun 2009 11:22:26 +0000 (07:22 -0400)]
Added grepm as a template for an output-mbox-to-mutt script.

The goal is to turn grepm into catmutt, and end up with
  $ be --xml list | be-xml-to-mbox | catmutt
to browse current bugs and comments in mutt.

Moritz has generously donated grepm under GPLv2.  Not GPLv>=2 yet, so
if the project decides to go to GLPv3 for example, this file will have
to stay behind.  Not that I see such a change coming, but I thought it
was worth commenting on, so we don't forget.

15 years agoReplaced some doctest output with ellipses.
W. Trevor King [Mon, 22 Jun 2009 01:54:07 +0000 (21:54 -0400)]
Replaced some doctest output with ellipses.

Following Chris' advice.  Don't know what I was thinking before ;).

15 years agoAdded --xml option to becommands/list.py
W. Trevor King [Sun, 21 Jun 2009 13:41:13 +0000 (09:41 -0400)]
Added --xml option to becommands/list.py

15 years agoRestored completion/be.bash.
W. Trevor King [Sun, 21 Jun 2009 13:22:31 +0000 (09:22 -0400)]
Restored completion/be.bash.

Oops.  I seem to have removed it in my Thu 2008-11-27 19:35:55 -0500
commit.  Luckily, the version I removed was still sitting right were
it belongs as
 /etc/bash_completion.d/be
Now it will be back in the tree.

15 years agoTouch missing userwide config file before read if it's missing.
W. Trevor King [Sun, 21 Jun 2009 11:56:05 +0000 (07:56 -0400)]
Touch missing userwide config file before read if it's missing.

Another bug introduced by James Rowe's user-config patch.  Obviously
it's hard to read a file if there's no file there.  I'm not sure how
it passed the unit tests earlier.  Maybe I forgot to install the
pre-commit version before running the test suite...  Anyhow, fixed
now.

15 years agoMerge from Ben Finney's RCS unittest patch
W. Trevor King [Sun, 21 Jun 2009 11:28:48 +0000 (07:28 -0400)]
Merge from Ben Finney's RCS unittest patch

This involved an `upgrade' of BE's bzr repo
Previous version (via `bzr info path/to/repo`): pack-0.92
Current version: rich-root-pack

The whole rich-root thing is a bzr features-vs-backwards-compatability
thing they've been wrestling with [1,2,3,4,...].  It seems that BE was
in some sort of unstable equilibrium [5], so I'll follow Ben's lead
and make the official switch.  Note that you'll need to use bzr>=1.5
to make the shift [6].  For the sake of completeness, the whole
rich-root thing was introduced here [7], but I don't understand enough
of bzr to make sense of the diff.  It just versions the repo's root
directory the same way it versions other directories [3].  The bzr
people seem to be planning to phase out non-rich-root formats in favor
of brisbane-core, aka 2.0beta [8], by bzr 2.0 [8], which is apparently
on the horizon [9,10,11].  What a headache.

Citations are all titles/X-List-Received-Date from
  https://lists.ubuntu.com/archives/bazaar/
with the exception of the URL [11].

[1] [RFC] rich root pack as default in 1.8 ?
  Sat, 06 Sep 2008 03:33:46 -0000
  (conclusion: none)
[2] Re: 1.9rc1 countdown
  Thu, 30 Oct 2008 08:44:53 -0000
  (conclusion: "primary" format should be rich-root next time we make a new format)
[3] So many repo formats
  Fri, 14 Nov 2008 08:41:33 -0000
  Mon, 17 Nov 2008 07:37:47 -0000  (explains rich-root format)
  Mon, 17 Nov 2008 22:37:39 -0000  (explains no-return policy)
  Mon, 17 Nov 2008 20:57:08 -0000  (explicitly lists non-svn reasons for rich-root)
[4] Branch fails from 'pack-0.92' repo to 'rich-root-pack' repo.
  Wed, 27 Aug 2008 11:31:11 -0000
  (we're not sure again)
[5] Branch fails from 'pack-0.92' repo to 'rich-root-pack' repo.
  Sun, 20 Apr 2008 12:58:09 -0000
[6] Branch fails from 'pack-0.92' repo to 'rich-root-pack' repo.
  Fri, 29 Aug 2008 13:23:52 -0000
[7] [RFC] Knit format 2
  Fri, 25 Aug 2006 22:55:36 -0000
[8] bazaar 2.0beta format for launchpad release
  Fri, 29 May 2009 06:00:03 -0000
[9] Upgrading loggerhead to 1.9-rich-root
  Mon, 11 May 2009 22:35:28 -0000
  (mentions eventual switch to rich-root in 2.0)
[10] bzr 1.16rc1 released!
  Fri, 12 Jun 2009 08:00:08 -0000
  (confirms eventual switch to rich-root in 2.0)
[11] https://launchpad.net/bzr/+announcement/2733
  (current outstanding releases: 1.17, 2.0)

15 years agoConform new docstrings to PEP 257.
John Doe [Sat, 20 Jun 2009 23:51:39 +0000 (09:51 +1000)]
Conform new docstrings to PEP 257.

15 years agoAdded comments-from-stdin, so we can add tracebacks, e.g. with
W. Trevor King [Fri, 19 Jun 2009 20:26:01 +0000 (16:26 -0400)]
Added comments-from-stdin, so we can add tracebacks, e.g. with

  $ be list --invalid-option | be comment <bug-id> -

15 years agoAllow defaults for config.get_val() in case of missing user-config file.
W. Trevor King [Fri, 19 Jun 2009 19:16:49 +0000 (15:16 -0400)]
Allow defaults for config.get_val() in case of missing user-config file.

Fixes bug introduced by James Rowe's previous patch:

  $ be list
  Traceback (most recent call last):
    ...
    File ".../libbe/rcs.py", line 34, in _get_matching_rcs
      import arch
    File ".../libbe/arch.py", line 29, in <module>
      client = config.get_val("arch_client")
    File ".../libbe/config.py", line 70, in get_val
    File "/usr/lib/python2.5/codecs.py", line 817, in open
      file = __builtin__.open(filename, mode, buffering)
  IOError: [Errno 2] No such file or directory: '/home/wking/.bugs_everywhere'

15 years agoMerged James Rowe's arch-shouldn't-create-userwide-config-file patch.
James Rowe [Fri, 19 Jun 2009 19:10:34 +0000 (15:10 -0400)]
Merged James Rowe's arch-shouldn't-create-userwide-config-file patch.

From his email to the be-devel list:

From: James Rowe <jnrowe@ukfsn.org>
Date: Tue, 3 May 2009 11:44:41 +0000
Subject: [PATCH] Don't create config file unless we're using arch.

Hi,

  I find the current behaviour of creating a config file simply to set
a default for a revision control system I'm never going to use to be
a little annoying, the attached patch changes this behaviour to only
set the default in the config file if you're actually using arch.

Thanks,

James

15 years agoMerged Thomas Habets 2009-01-07 XML output for "be show".
W. Trevor King [Fri, 19 Jun 2009 18:42:15 +0000 (14:42 -0400)]
Merged Thomas Habets 2009-01-07 XML output for "be show".

I rewrote a few of his routines, e.g. generalizing
Comment.string_thread to run a caller-specified method avoided the
need for some duplicate code in Comment.xml_thread.  There was also a
reasonable reorganization of libbe.settings_object.versioned_property
because the <in_reply_to> field of the Comment.xml output was giving
me `-1' (= old settings_object.EMPTY) instead of None, even after I
had set comm.in_reply_to to None.  The rewritten versioned_property
avoids the ambiguity of UNPRIMED vs EMPTY, and avoids the stupididy of
my using EMPTY=-1 ;).

15 years agoRemoved unused libbe/restconvert.py and fixed a typo in README.dev
W. Trevor King [Fri, 19 Jun 2009 16:06:32 +0000 (12:06 -0400)]
Removed unused libbe/restconvert.py and fixed a typo in README.dev

15 years agoMerge from main branch.
W. Trevor King [Fri, 19 Jun 2009 15:09:03 +0000 (11:09 -0400)]
Merge from main branch.

15 years agolibbe/encoding.py
W. Trevor King [Fri, 19 Jun 2009 15:06:59 +0000 (11:06 -0400)]
libbe/encoding.py

15 years agoFollow existing docstring whitespace convention.
John Doe [Mon, 15 Jun 2009 10:13:22 +0000 (20:13 +1000)]
Follow existing docstring whitespace convention.

15 years agoDistinguish tests for VCS which can't handle an uninitialised identity.
John Doe [Sun, 14 Jun 2009 07:27:18 +0000 (17:27 +1000)]
Distinguish tests for VCS which can't handle an uninitialised identity.

15 years agoRefactor mega-testcases into separate true-or-false testcases.
John Doe [Sun, 14 Jun 2009 07:24:29 +0000 (17:24 +1000)]
Refactor mega-testcases into separate true-or-false testcases.

15 years agoMake RCS testcase subclasses dynamically.
John Doe [Sun, 14 Jun 2009 04:34:11 +0000 (14:34 +1000)]
Make RCS testcase subclasses dynamically.

15 years agoUse a more general regex to test GIT commits; GIT's output has changed.
Chris Ball [Sat, 13 Jun 2009 12:43:28 +0000 (08:43 -0400)]
Use a more general regex to test GIT commits; GIT's output has changed.

15 years agoXML output for "be show"
Thomas Habets [Wed, 7 Jan 2009 18:39:32 +0000 (19:39 +0100)]
XML output for "be show"

15 years agoFixed spelling mistake in test_usage.sh
W. Trevor King [Sun, 21 Dec 2008 05:35:12 +0000 (00:35 -0500)]
Fixed spelling mistake in test_usage.sh

15 years agoFixed lack of user_id caching in bugdir.BugDir
W. Trevor King [Thu, 4 Dec 2008 23:33:33 +0000 (18:33 -0500)]
Fixed lack of user_id caching in bugdir.BugDir

15 years agoClosed search bug
W. Trevor King [Thu, 4 Dec 2008 18:06:10 +0000 (13:06 -0500)]
Closed search bug

9a942b1d-a3b5-441d-8aef-b844700e1efa

Aaron says it's already implemented in the Bugs-Everywhere-Web, and
  $ be show `be list --status all --uuids` | grep -A5 -B5 XYZ
works pretty well for me on the command line.

15 years agoMerged in the successful per-tree-config branch.
W. Trevor King [Thu, 4 Dec 2008 17:42:22 +0000 (12:42 -0500)]
Merged in the successful per-tree-config branch.

15 years agoAdded per-tree default assignee option.
W. Trevor King [Thu, 4 Dec 2008 17:40:39 +0000 (12:40 -0500)]
Added per-tree default assignee option.

The new setting is currently only used when creating new bugs with
becommand/new.

15 years agoClosed a few old bugs that seem outdated/dealt with.
W. Trevor King [Thu, 4 Dec 2008 17:24:24 +0000 (12:24 -0500)]
Closed a few old bugs that seem outdated/dealt with.

15 years agoFixed missing directory error when merging comments onto a bare bug.
W. Trevor King [Thu, 4 Dec 2008 17:07:49 +0000 (12:07 -0500)]
Fixed missing directory error when merging comments onto a bare bug.

If bug_A had no comments (and so, no comment directory), changing
comment settings before saving raised missing directory errors.
save_settings had previously assumed the
 .be/bugs/XYZ/comments/
directory existed, which wasn't true for comment-less bugs.  Now it
checks, and creates the directory if necessary.

15 years agobecommands/severity and status now handle --complete appropriately.
W. Trevor King [Thu, 4 Dec 2008 16:56:34 +0000 (11:56 -0500)]
becommands/severity and status now handle --complete appropriately.

I also disabled interspersed options and arguments in
cmdutils.CmdOptionParser.  See
  http://docs.python.org/library/optparse.html
Now
  $ be severity xyz --complete
returns available severities.  It had previously returned
  --help --complete

15 years agoPer-tree status levels working.
W. Trevor King [Thu, 4 Dec 2008 16:32:57 +0000 (11:32 -0500)]
Per-tree status levels working.

15 years agoClosed 4a4609c8-1882-47de-9d30-fee410b8a802
W. Trevor King [Thu, 4 Dec 2008 15:44:29 +0000 (10:44 -0500)]
Closed 4a4609c8-1882-47de-9d30-fee410b8a802

Per-tree severity levels working.

15 years agoAdjusted becommands/list.py to use current bug severities levels.
W. Trevor King [Thu, 4 Dec 2008 15:40:24 +0000 (10:40 -0500)]
Adjusted becommands/list.py to use current bug severities levels.

15 years agobug severity verification now works with per-tree severities.
W. Trevor King [Thu, 4 Dec 2008 15:32:10 +0000 (10:32 -0500)]
bug severity verification now works with per-tree severities.

I adjusted the YAML format following
  http://pyyaml.org/ticket/11
  Unicode support
To remove '!!python/unicode' escapes and allow unicode in the output.
We can always have unicode in the output because the output is encoded
(as per the BugFile.encoding setting) before being sent to the outside
world.

15 years agoPer-tree settings now passed into bug module.
W. Trevor King [Thu, 4 Dec 2008 14:54:39 +0000 (09:54 -0500)]
Per-tree settings now passed into bug module.

becommands/severity gets the configured settings appropriately.

Todo:
  adjust setting-validation to compare against the current values.
  setup becommands/severity to --complete severities.

15 years agoAdded per-tree configurable severities.
W. Trevor King [Thu, 4 Dec 2008 14:14:01 +0000 (09:14 -0500)]
Added per-tree configurable severities.

They currently have no effect, but you can see them with
  $ be set
There's a lot of information in this one 'settings' variable.  I think
set will have to be specialized to handle arrays smoothly...

15 years agoCleaned up some older bugs.
W. Trevor King [Thu, 4 Dec 2008 13:52:23 +0000 (08:52 -0500)]
Cleaned up some older bugs.

15 years agoAdded support for bug reporter field.
W. Trevor King [Wed, 3 Dec 2008 00:23:04 +0000 (19:23 -0500)]
Added support for bug reporter field.

Closes e2f6514c-5f9f-4734-a537-daf3fbe7e9a0

15 years agoMerged decorator branch.
W. Trevor King [Wed, 3 Dec 2008 00:11:56 +0000 (19:11 -0500)]
Merged decorator branch.

15 years agoFixed comparison bug in Bug._get_time.
W. Trevor King [Wed, 3 Dec 2008 00:06:24 +0000 (19:06 -0500)]
Fixed comparison bug in Bug._get_time.

15 years agoAdded auto-completion for becommands/set property names.
W. Trevor King [Tue, 2 Dec 2008 16:12:56 +0000 (11:12 -0500)]
Added auto-completion for becommands/set property names.

15 years agoConverted Comment to the settings_object system.
W. Trevor King [Tue, 2 Dec 2008 16:06:00 +0000 (11:06 -0500)]
Converted Comment to the settings_object system.

15 years agoBug moved to the settings_object system.
W. Trevor King [Tue, 2 Dec 2008 15:39:52 +0000 (10:39 -0500)]
Bug moved to the settings_object system.

15 years agoAdded decorator-style properties to bugdir. Created settings_object module.
W. Trevor King [Tue, 2 Dec 2008 15:14:06 +0000 (10:14 -0500)]
Added decorator-style properties to bugdir.  Created settings_object module.

settings_object.SavedSettingsObject encapsulates some of the common
settings functionality in the BE BugDir, Bug, and Comment classes.
It's a bit awkward due to the nature of scoping in python subclasses,
but it's better than reproducing this code in each of the above classes.
Now I need to move Bug and Comment over to *this* system ;).

15 years agoAdded decorator-style properties to libbe/comment.py.
W. Trevor King [Mon, 1 Dec 2008 19:42:20 +0000 (14:42 -0500)]
Added decorator-style properties to libbe/comment.py.

Also some typo corrections and some reworking of bug/bugdir to better
support the lazier loading.

15 years agoFixed some erroneous "no test suite" messages in test.py.
W. Trevor King [Mon, 1 Dec 2008 19:08:59 +0000 (14:08 -0500)]
Fixed some erroneous "no test suite" messages in test.py.

15 years agoAdded libbe/properties to make property management easier.
W. Trevor King [Sat, 29 Nov 2008 04:08:10 +0000 (23:08 -0500)]
Added libbe/properties to make property management easier.

libbe/bug has been moved over to the new system.
comment and bugdir still to go.

15 years agoAdded more helpful error message for libbe modules missing test suites.
W. Trevor King [Fri, 28 Nov 2008 15:15:15 +0000 (10:15 -0500)]
Added more helpful error message for libbe modules missing test suites.

15 years agoOptimized bug loading from becommands/comment with partial-uuid matching.
W. Trevor King [Fri, 28 Nov 2008 00:35:55 +0000 (19:35 -0500)]
Optimized bug loading from becommands/comment with partial-uuid matching.

The code is a bit uglier now, but it's a good deal faster :).

15 years agoAdded becommands/comment completion.
W. Trevor King [Thu, 27 Nov 2008 16:34:44 +0000 (11:34 -0500)]
Added becommands/comment completion.

15 years agoCompletion support added to becommands/help
W. Trevor King [Thu, 27 Nov 2008 16:12:26 +0000 (11:12 -0500)]
Completion support added to becommands/help

15 years agoAdded bugid_args option to cmdutil.default_complete.
W. Trevor King [Thu, 27 Nov 2008 16:03:21 +0000 (11:03 -0500)]
Added bugid_args option to cmdutil.default_complete.

Now most of the bug-id arguments support Bash completion.  Since there
will hopefully be lots of bugs in the database, I decided to filter
the list of available bugs.  Currently, we just auto-complete active
bugs for most commands, with the exceptions of open (obviously) and
status (which needs to work on all types of bugs).

15 years agoCommand completion simplified and working for list, dummies for other cmds.
W. Trevor King [Thu, 27 Nov 2008 15:16:18 +0000 (10:16 -0500)]
Command completion simplified and working for list, dummies for other cmds.

All the other commands currently use default_complete(), which has no
effect other than catching the --complete option and effectively
aborting execution.

This closes 8e1bbda4-35b6-4579-849d-117b1596ee99

15 years agoMerged --commands and --options into --complete. Simpler that way.
W. Trevor King [Thu, 27 Nov 2008 14:34:54 +0000 (09:34 -0500)]
Merged --commands and --options into --complete.  Simpler that way.

15 years agoBasic bash completion is now supported.
W. Trevor King [Thu, 27 Nov 2008 14:26:52 +0000 (09:26 -0500)]
Basic bash completion is now supported.

I'm still working on a clean implementation though...

15 years agoFixed typo in becommands/comment help string.
W. Trevor King [Thu, 27 Nov 2008 13:06:12 +0000 (08:06 -0500)]
Fixed typo in becommands/comment help string.

15 years agoAdded --commands option to be to help with bash completion.
W. Trevor King [Thu, 27 Nov 2008 12:35:40 +0000 (07:35 -0500)]
Added --commands option to be to help with bash completion.

A'la ditz
  http://gitorious.org/projects/ditz

See also this good intro to bash completion
  http://www.debian-administration.org/articles/317

15 years agoAdded -a/n/m/r to becommands/diff.py.
W. Trevor King [Tue, 25 Nov 2008 21:45:42 +0000 (16:45 -0500)]
Added -a/n/m/r to becommands/diff.py.

15 years agoadded -u/uuids option to becommands/list
W. Trevor King [Tue, 25 Nov 2008 21:07:08 +0000 (16:07 -0500)]
added -u/uuids option to becommands/list

15 years agoAdded libbe/encoding.py to wrap input/output/file access appropriately.
W. Trevor King [Tue, 25 Nov 2008 20:47:19 +0000 (15:47 -0500)]
Added libbe/encoding.py to wrap input/output/file access appropriately.

I borrowed most of the code for this.

get_encoding() is from Trac
  http://trac.edgewall.org/browser/trunk/trac/util/datefmt.py
  format_datetime()
Trac has a BSD license
  http://trac.edgewall.org/wiki/TracLicense
I don't know if such a small snippet requires us to "reproduce the
above copyright" or where we need to reproduce it if it is needed.

The stdout/stdin replacement code follows
  http://wiki.python.org/moin/ShellRedirectionFails

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).

References:
  http://wiki.python.org/moin/Unicode
  http://www.amk.ca/python/howto/unicode
  http://www.python.org/dev/peps/pep-0100/

I also split libbe/editor.py off from libbe.utility.py and started
explaining the motivation for the BugDir init flags in it's docstring.

15 years agoOops, should be passing libbe.tree.Tree.sort() args to children. Fixed.
W. Trevor King [Tue, 25 Nov 2008 12:12:52 +0000 (07:12 -0500)]
Oops, should be passing libbe.tree.Tree.sort() args to children.  Fixed.

15 years agoHack to fixe encoding bug in becommands/show
W. Trevor King [Tue, 25 Nov 2008 03:03:20 +0000 (22:03 -0500)]
Hack to fixe encoding bug in becommands/show

The situation really calls for a global encoding setting rather than
lots of hardcoded "utf-8"s.  See bug
  f7ccd916-b5c7-4890-a2e3-8c8ace17ae3a

15 years agoAdded becommands/merge to join duplicate bugs.
W. Trevor King [Tue, 25 Nov 2008 02:20:56 +0000 (21:20 -0500)]
Added becommands/merge to join duplicate bugs.