be.git
14 years agoWork around mercurial (hg) issue 618.
W. Trevor King [Mon, 14 Dec 2009 00:40:06 +0000 (19:40 -0500)]
Work around mercurial (hg) issue 618.

14 years agoDon't regexp out the short-revid in Git._vcs_commit()
W. Trevor King [Sun, 13 Dec 2009 13:43:01 +0000 (08:43 -0500)]
Don't regexp out the short-revid in Git._vcs_commit()

The output version strings change:
  Version 1.5.4.3:
    Created initial commit 217efa7: MESSAGE
    Created commit acb3066: MESSAGE
  Version 1.6.4.4:
    [master (root-commit) c5b48cf] MESSAGE
    [master 66a48c1] MESSAGE
Instead, get the full revid, and look for its beginning in the output.

14 years agoFix Git._vcs_revision_id() offset bug.
W. Trevor King [Sun, 13 Dec 2009 13:31:33 +0000 (08:31 -0500)]
Fix Git._vcs_revision_id() offset bug.

14 years agoHandle non-int args to VCS.revision_id at the VCS level.
W. Trevor King [Sun, 13 Dec 2009 13:12:47 +0000 (08:12 -0500)]
Handle non-int args to VCS.revision_id at the VCS level.

14 years agoAdjust Hg._vcs_revision_id to bail cleanly on non-int revids
W. Trevor King [Sun, 13 Dec 2009 13:03:58 +0000 (08:03 -0500)]
Adjust Hg._vcs_revision_id to bail cleanly on non-int revids

14 years agoUse detect rather than catching errors in _vcs_root().
W. Trevor King [Sun, 13 Dec 2009 12:53:17 +0000 (07:53 -0500)]
Use detect rather than catching errors in _vcs_root().

14 years ago.bzr transition.
W. Trevor King [Sun, 13 Dec 2009 12:45:43 +0000 (07:45 -0500)]
.bzr transition.

14 years agoMore fixes for libbe.storage.vcs.hg + .git transition.
W. Trevor King [Sun, 13 Dec 2009 12:39:55 +0000 (07:39 -0500)]
More fixes for libbe.storage.vcs.hg + .git transition.

14 years agoFixes to get libbe.storage.vcs.hg passing tests.
W. Trevor King [Sun, 13 Dec 2009 12:26:37 +0000 (07:26 -0500)]
Fixes to get libbe.storage.vcs.hg passing tests.

14 years agoConverted libbe.storage.vcs.hg to new Storage format.
W. Trevor King [Sun, 13 Dec 2009 12:20:31 +0000 (07:20 -0500)]
Converted libbe.storage.vcs.hg to new Storage format.

14 years agoRearrange libbe.ui.command_line.CmdOptionParser._add_option() for Python 2.5
W. Trevor King [Sun, 13 Dec 2009 11:33:50 +0000 (06:33 -0500)]
Rearrange libbe.ui.command_line.CmdOptionParser._add_option() for Python 2.5

Python 2.6 doesn't mind, but 2.5 doesn't like kwargs after a *
expansion:

  $ ./be list
  Traceback (most recent call last):
    File "./be", line 5, in <module>
      import libbe.ui.command_line
    File "/home/wking/src/fun/be/be.restructure/libbe/ui/command_line.py", line 63
      *opt_strings, action='callback', dest=dest,
                         ^
  SyntaxError: invalid syntax

14 years agoConverted libbe.storage.vcs.base to new Storage format.
W. Trevor King [Sun, 13 Dec 2009 11:19:23 +0000 (06:19 -0500)]
Converted libbe.storage.vcs.base to new Storage format.

14 years agoMoved be to libbe.ui.command_line and transitioned to Command format.
W. Trevor King [Sun, 13 Dec 2009 01:57:59 +0000 (20:57 -0500)]
Moved be to libbe.ui.command_line and transitioned to Command format.

14 years agoUse get_input/output_encoding() in libbe.command.base.Command
W. Trevor King [Sat, 12 Dec 2009 06:46:22 +0000 (01:46 -0500)]
Use get_input/output_encoding() in libbe.command.base.Command

14 years agoAdded libbe.ui.util.user for managing user ids.
W. Trevor King [Sat, 12 Dec 2009 06:43:20 +0000 (01:43 -0500)]
Added libbe.ui.util.user for managing user ids.

14 years agoMoved command completion from libbe.ui.util to libbe.command.util
W. Trevor King [Sat, 12 Dec 2009 06:12:17 +0000 (01:12 -0500)]
Moved command completion from libbe.ui.util to libbe.command.util

14 years agoAdded libbe.command.base (with Command class) and moved list command to new format.
W. Trevor King [Sat, 12 Dec 2009 05:31:55 +0000 (00:31 -0500)]
Added libbe.command.base (with Command class) and moved list command to new format.

14 years agoMoved bugdir, bug, and comment over to new id implementation.
W. Trevor King [Fri, 11 Dec 2009 00:31:47 +0000 (19:31 -0500)]
Moved bugdir, bug, and comment over to new id implementation.

14 years agoRethought libbe.util.id module
W. Trevor King [Wed, 9 Dec 2009 12:23:54 +0000 (07:23 -0500)]
Rethought libbe.util.id module

14 years agoReworked test.py to handle deeper directory structure
W. Trevor King [Wed, 9 Dec 2009 01:02:34 +0000 (20:02 -0500)]
Reworked test.py to handle deeper directory structure

14 years agoMoved properties.py and settings_object.py to libbe/storage/util/
W. Trevor King [Tue, 8 Dec 2009 14:01:26 +0000 (09:01 -0500)]
Moved properties.py and settings_object.py to libbe/storage/util/

14 years agoTransitioned bugdir.py to new storage format.
W. Trevor King [Tue, 8 Dec 2009 13:54:50 +0000 (08:54 -0500)]
Transitioned bugdir.py to new storage format.

14 years agoTransitioned bug.py to new storage format.
W. Trevor King [Tue, 8 Dec 2009 09:33:49 +0000 (04:33 -0500)]
Transitioned bug.py to new storage format.

14 years agoTransitioned comment.py to new storage format.
W. Trevor King [Tue, 8 Dec 2009 09:10:10 +0000 (04:10 -0500)]
Transitioned comment.py to new storage format.

14 years agoUse .storage.is_read/writeable() rather than .sync_with_disk() in settings_object.py
W. Trevor King [Tue, 8 Dec 2009 09:01:38 +0000 (04:01 -0500)]
Use .storage.is_read/writeable() rather than .sync_with_disk() in settings_object.py

14 years agoUse mapfile to only create & parse mapfile strings, not files
W. Trevor King [Tue, 8 Dec 2009 08:58:36 +0000 (03:58 -0500)]
Use mapfile to only create & parse mapfile strings, not files

14 years agoExtended libbe.storage.base for separate read/write control.
W. Trevor King [Tue, 8 Dec 2009 08:52:37 +0000 (03:52 -0500)]
Extended libbe.storage.base for separate read/write control.

Rather than just having .read_only to set write permissions and
assuming that read was always legal.  We also added user and backend
control of both readable and writeable:
  do you want to read/write?
and
  can you read/write?

Specialized NotSupported into NotWriteable and NotReadable.

Added automatic unicode encoding on .set(), and decode option on
.get().

14 years agoExtend libbe.util.id to handle id (path) creation.
W. Trevor King [Tue, 8 Dec 2009 08:51:27 +0000 (03:51 -0500)]
Extend libbe.util.id to handle id (path) creation.

14 years agoAdded libbe.storage.base and test suite.
W. Trevor King [Tue, 8 Dec 2009 06:49:06 +0000 (01:49 -0500)]
Added libbe.storage.base and test suite.

14 years agoInitial directory restructuring to clarify dependencies
W. Trevor King [Tue, 8 Dec 2009 01:07:55 +0000 (20:07 -0500)]
Initial directory restructuring to clarify dependencies

14 years agoReorganization bug created
W. Trevor King [Tue, 8 Dec 2009 01:07:36 +0000 (20:07 -0500)]
Reorganization bug created

14 years agoAdded libbe.pager and --paginate/--no-pager options to be.
W. Trevor King [Mon, 7 Dec 2009 12:36:14 +0000 (07:36 -0500)]
Added libbe.pager and --paginate/--no-pager options to be.

14 years agoUpdated NEWS
W. Trevor King [Mon, 7 Dec 2009 12:34:14 +0000 (07:34 -0500)]
Updated NEWS

14 years agoAdded --paginate and --no-pager to be
W. Trevor King [Mon, 7 Dec 2009 12:25:18 +0000 (07:25 -0500)]
Added --paginate and --no-pager to be

14 years agoUse 'auto' for run_pager default rather than None
W. Trevor King [Mon, 7 Dec 2009 12:20:23 +0000 (07:20 -0500)]
Use 'auto' for run_pager default rather than None

14 years agobe --dir DIR COMMAND now roots the bugdir in DIR without changing directories.
W. Trevor King [Mon, 7 Dec 2009 12:18:48 +0000 (07:18 -0500)]
be --dir DIR COMMAND now roots the bugdir in DIR without changing directories.

Previously, for the directory structure
  A
  |-- X
  `-- Y
You could do something like
  A$ be --dir X diff --dir ../Y
Now it's
  A$ be --dir X diff --dir Y

The --root option to `be init` has been removed as redundant.  Replace
calls like
  be init --root DIR
with
  be --dir DIR init

14 years agoUpdate libbe.pager copyright
W. Trevor King [Mon, 7 Dec 2009 12:02:15 +0000 (07:02 -0500)]
Update libbe.pager copyright

14 years agoAdded libbe.pager
W. Trevor King [Mon, 7 Dec 2009 12:00:34 +0000 (07:00 -0500)]
Added libbe.pager

14 years agobe --dir DIR COMMAND now roots the bugdir in DIR without changing directories.
W. Trevor King [Sun, 6 Dec 2009 22:20:39 +0000 (17:20 -0500)]
be --dir DIR COMMAND now roots the bugdir in DIR without changing directories.

Previously, for the directory structure
  A
  |-- X
  `-- Y
You could do something like
  A$ be --dir X diff --dir ../Y
Now it's
  A$ be --dir X diff --dir Y

The --root option to `be init` has been removed as redundant.  Replace
calls like
  be init --root DIR
with
  be --dir DIR init

14 years agoSet BugDir(root=X) instead of os.chdir(X) in
W. Trevor King [Sun, 6 Dec 2009 09:24:07 +0000 (04:24 -0500)]
Set BugDir(root=X) instead of os.chdir(X) in

14 years agobecommands.target.bug_target(TARGET-BUG) now returns TARGET-BUG
W. Trevor King [Sun, 6 Dec 2009 08:11:39 +0000 (03:11 -0500)]
becommands.target.bug_target(TARGET-BUG) now returns TARGET-BUG

14 years agoMerged be.target-as-bug
W. Trevor King [Sun, 6 Dec 2009 05:44:22 +0000 (00:44 -0500)]
Merged be.target-as-bug

Highlights:
 * targets are now a special type of bug (severity 'target'), so you
   can do all the things you do with normal bugs to them as well
   (e.g. comment on them, link them into dependency trees, etc.)
 * new command `be due` to get/set bug due dates.
 * changes to `be depend`
   * added options --status, --severity
 * changes to `be list`
   * added blacklist capability to --status, --severity, --assigned
   * removed options --target, --cur-target
   Replace:
     'be list --target TARGET' with
     'be depend --status -closed,fixed,wontfix --severity -target \
        $(be target --resolve TARGET)'
     'be list --cur-target' with
     'be depend --status -closed,fixed,wontfix --severity -target \
        $(be target --resolve)'
 * changes to `be target`
   * added option --resolve
   * removed option --list
   Replace:
     'be target --list' with 'be list --status all --severity target'
 * new function cmdutil.select_values() for whitelist/blacklist selection.
 * assorted cleanups and bugfixes

14 years agoMarked as fixed 22b: Sorting targets chronologically
W. Trevor King [Sun, 6 Dec 2009 05:43:59 +0000 (00:43 -0500)]
Marked as fixed 22b: Sorting targets chronologically

14 years agoUpdated NEWS.
W. Trevor King [Sun, 6 Dec 2009 05:28:22 +0000 (00:28 -0500)]
Updated NEWS.

14 years agoUpdated becommands/due.py copyright.
W. Trevor King [Sun, 6 Dec 2009 05:27:24 +0000 (00:27 -0500)]
Updated becommands/due.py copyright.

14 years agoAdded becommands/due.py to manage bug due dates.
W. Trevor King [Sun, 6 Dec 2009 05:21:07 +0000 (00:21 -0500)]
Added becommands/due.py to manage bug due dates.

This fulfills the following part of 22b:7

  * "due_by"

  We could add "due-by" to Bug.extra_strings as well, so that anyone
  could set due dates for any issue they wanted.

Currently there's not much going on, but perhaps other people will
have ideas for useful extensions.  Maybe
  be due --sort BUG-ID [BUG-ID ...]
or
  be --due-in-days 7

14 years ago`be target` gains --resolve and loses --list.
W. Trevor King [Sun, 6 Dec 2009 04:52:07 +0000 (23:52 -0500)]
`be target` gains --resolve and loses --list.

`be target` now works with bug-style targets.

14 years agoDocstring clarification in becommands.depend.get_blocked_by()
W. Trevor King [Sun, 6 Dec 2009 04:51:43 +0000 (23:51 -0500)]
Docstring clarification in becommands.depend.get_blocked_by()

14 years agoRemoved target stuff from becommands/list.py and tweaked options.
W. Trevor King [Sun, 6 Dec 2009 03:00:04 +0000 (22:00 -0500)]
Removed target stuff from becommands/list.py and tweaked options.

Now --status, --severity, and --assigned all use
cmdutil.select_values() for nice whitelist/blacklist selection.

14 years agoMoved becommands.depend._allowed_values() to cmdutil.select_values()
W. Trevor King [Sun, 6 Dec 2009 02:35:56 +0000 (21:35 -0500)]
Moved becommands.depend._allowed_values() to cmdutil.select_values()

I like this code, and I want to use it for other places, e.g.
`be list`.

Also renamed depend options
  --limit-severity and --limit-status
to
  --severity and --status

14 years agoRemoved Bugs-Everywhere-Web/server.log from version control
W. Trevor King [Sun, 6 Dec 2009 02:04:41 +0000 (21:04 -0500)]
Removed Bugs-Everywhere-Web/server.log from version control

14 years agoRemoved Bug.target reference from interfaces/xml/be-xml-to-mbox.
W. Trevor King [Sun, 6 Dec 2009 02:01:49 +0000 (21:01 -0500)]
Removed Bug.target reference from interfaces/xml/be-xml-to-mbox.

14 years agoRemove Bug.target references from several becommands (all but target.py).
W. Trevor King [Sun, 6 Dec 2009 01:57:31 +0000 (20:57 -0500)]
Remove Bug.target references from several becommands (all but target.py).

14 years agoAdded --limit-status and --limit-severity to `be depend'.
W. Trevor King [Sun, 6 Dec 2009 01:52:29 +0000 (20:52 -0500)]
Added --limit-status and --limit-severity to `be depend'.

Currently only effective in tree mode, but that's where it matters
most.

14 years agoAdded retroactive dependencies between the legacy targets.
W. Trevor King [Sun, 6 Dec 2009 01:03:36 +0000 (20:03 -0500)]
Added retroactive dependencies between the legacy targets.

bug uuid                              created    resolved   target
ee681951-f254-43d3-a53a-1b36ae415d5c  revno: 45  revno: 51  patch-52
f51dc5a7-37b7-4ce1-859a-b7cb58be6494  revno: 41  revno: 41  0.1
f5c06914-dc64-4658-8ec7-32a026a53f55  revno: 45  revno: 93  0.2

reasonable target blockage:
  0.1 ------------| 0.2
     `-| patch-52 --|

Here are the old targets
  $ be list --severity target --status all
  4fc:ct: patch-52
  47c:ft: 0.1
  bd0:ft: 0.2
And here is the implemented dependency tree
  $ be depend -t -1 bd0
  bd0ebb56-fb46-45bc-af08-1e4a94e8ef3c blocked by:
   47c:ft: 0.1
    f51:ff: Can't create bugs
   4fc:ct: patch-52
    47c:ft: 0.1
     f51:ff: Can't create bugs
    ee6:cm: Support rcs configuration
   f5c:fm: Implement bug tree diff

14 years agoRemove some more Bug.target references from libbe/bug.py
W. Trevor King [Sun, 6 Dec 2009 00:46:11 +0000 (19:46 -0500)]
Remove some more Bug.target references from libbe/bug.py

14 years agoUpdated the new target bugs' status to match blockers
W. Trevor King [Sun, 6 Dec 2009 00:43:54 +0000 (19:43 -0500)]
Updated the new target bugs' status to match blockers

14 years agoUpgraded to Bugs Everywhere Directory v1.3
W. Trevor King [Sun, 6 Dec 2009 00:38:50 +0000 (19:38 -0500)]
Upgraded to Bugs Everywhere Directory v1.3

14 years agoAdded "Bugs Everywhere Directory v1.3" which transitions to bug-type targets.
W. Trevor King [Sun, 6 Dec 2009 00:36:56 +0000 (19:36 -0500)]
Added "Bugs Everywhere Directory v1.3" which transitions to bug-type targets.

See bug 22b6f620-d2f7-42a5-a02e-145733a4e366 for the motivation.  This
upgrade will replace all "target" settings.  The new BugDir target
setting will be the uuid of the appropriate target.  The Bug target
setting is removed, replaced by an extra_strings BLOCKS tag blocking
the appropriate target.  New target bugs are created on the fly as
required.

14 years agoThis addresses the following portion of 22b:7:
W. Trevor King [Sat, 5 Dec 2009 23:25:03 +0000 (18:25 -0500)]
This addresses the following portion of 22b:7:

  * Targeting normal bugs

  With "be depend".  I think we should remove the "target" field from
  bugs, and move target dependencies over into the "be depend"
  framework.

  * be target list

  Would become "be list --severity target".  A target "severity" would
  keep target bugs distinct from other bug/issue types.

14 years agoFixed shortname -> bugname in becommands/show.py.
W. Trevor King [Sat, 5 Dec 2009 23:16:05 +0000 (18:16 -0500)]
Fixed shortname -> bugname in becommands/show.py.

Fixes
  wking@thor:be.target-as-bug$ be show 22b:7
  Traceback (most recent call last):
    File "/home/wking/bin/be", line 65, in <module>
      sys.exit(cmdutil.execute(args[0], args[1:]))
    File "/home/wking/src/fun/be/be.target-as-bug/libbe/cmdutil.py", line 87, in execute
      restrict_file_access=restrict_file_access)
    File "/home/wking/src/fun/be/be.target-as-bug/becommands/show.py", line 82, in execute
      print output(args, bd, as_xml=options.XML, with_comments=options.comments)
    File "/home/wking/src/fun/be/be.target-as-bug/becommands/show.py", line 174, in output
      lines.append(comment.string(shortname=shortname))
  NameError: global name 'shortname' is not defined

14 years agoCommented on 12c: Bug aggregation. Multi-repo meta-BE?
W. Trevor King [Sat, 5 Dec 2009 22:40:08 +0000 (17:40 -0500)]
Commented on 12c: Bug aggregation.  Multi-repo meta-BE?

14 years agoAdjusted be-mbox-to-xml to not drop author info from multipart messages
W. Trevor King [Sat, 5 Dec 2009 22:34:09 +0000 (17:34 -0500)]
Adjusted be-mbox-to-xml to not drop author info from multipart messages

14 years agoAdded missing author entries to some comments + cleanups.
W. Trevor King [Sat, 5 Dec 2009 22:17:21 +0000 (17:17 -0500)]
Added missing author entries to some comments + cleanups.

14 years agoFix libbe.diff.Diff._changed_bugs() to handle subscriptions by bug shortname.
W. Trevor King [Sat, 5 Dec 2009 21:50:34 +0000 (16:50 -0500)]
Fix libbe.diff.Diff._changed_bugs() to handle subscriptions by bug shortname.

14 years agoCleanup Dir in becommands/init.py doctest.
W. Trevor King [Sat, 5 Dec 2009 13:31:04 +0000 (08:31 -0500)]
Cleanup Dir in becommands/init.py doctest.

14 years agoMerged be.diff-subscribe
W. Trevor King [Sat, 5 Dec 2009 13:16:27 +0000 (08:16 -0500)]
Merged be.diff-subscribe

Highlights:
 * changes to `be diff`
   * exits with an error if required revision control is not possible.
     Previously it printed a message, but exitted with status 0.
   * removed options --new, --removed, --modified, --all
   * added options --uuids, --subscribe
 * New method diff.Diff.full_report() allows fast generation of
   similar report_tree()s via diff.DiffTree.masked.
 * New method diff.subscriptions_from_string() for consistent
   subscription string parsing.
 * clean up be-handle-mail.Message.subscriber_emails() with
   diff.Diff.report_tree(subscriptions)
 * hardcoded 'DIR' replaced with diff.BUGDIR_ID
 * assorted cleanups and bugfixes

14 years agoUpdated NEWS
W. Trevor King [Sat, 5 Dec 2009 13:15:52 +0000 (08:15 -0500)]
Updated NEWS

14 years agoAdjust libbe.diff.DiffTree to fix failed doctest.
W. Trevor King [Sat, 5 Dec 2009 13:08:09 +0000 (08:08 -0500)]
Adjust libbe.diff.DiffTree to fix failed doctest.

======================================================================
FAIL: Doctest: libbe.diff.DiffTree
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.5/doctest.py", line 2128, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for libbe.diff.DiffTree
  File "/home/wking/src/fun/be/be.diff-subscribe/libbe/diff.py", line 136, in DiffTree

----------------------------------------------------------------------
File "/home/wking/src/fun/be/be.diff-subscribe/libbe/diff.py", line 172, in libbe.diff.DiffTree
Failed example:
    print bugdir.report_string()
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python2.5/doctest.py", line 1228, in __run
        compileflags, 1) in test.globs
      File "<doctest libbe.diff.DiffTree[18]>", line 1, in <module>
        print bugdir.report_string()
      File "/home/wking/src/fun/be/be.diff-subscribe/libbe/diff.py", line 213, in report_string
        return "\n".join(self.report())
    TypeError

14 years agoUse new libbe.diff.Diff.report_tree(subscriptions) in be-handle-mail.
W. Trevor King [Sat, 5 Dec 2009 12:41:50 +0000 (07:41 -0500)]
Use new libbe.diff.Diff.report_tree(subscriptions) in be-handle-mail.

This makes Message.subscriber_emails() much cleaner.

Also fix libbe.diff.Diff._sub_report() to handle missing
'bugdir/settings'.

Added libbe.diff.SubscriptionType.__cmp__ so that
  SubscriptionType('all') == SubscriptionType('all')
This is important when comparing the types returned by
  becommands.subscribe.get_bugdir_subscribers()
with the libbe.diff.*_TYPE_* types.

14 years agoAdded libbe.diff.Diff.full_report() for speed with several subscription lists.
W. Trevor King [Sat, 5 Dec 2009 10:38:48 +0000 (05:38 -0500)]
Added libbe.diff.Diff.full_report() for speed with several subscription lists.

Now report_tree() returns an appropriately .masked version of the
cached full report, which is much faster than recomputing a new diff
tree from scratch.

Also fixed bug in libbe.diff.DiffTree.report() where
.requires_children=True was exposing nodes with children, when it
should (and now does) only expose nodes with _unmasked_ children.

14 years agoMore 'DIR'->diff.BUGDIR_ID updates
W. Trevor King [Sat, 5 Dec 2009 09:21:04 +0000 (04:21 -0500)]
More 'DIR'->diff.BUGDIR_ID updates

14 years agoCreated diff.subscriptions_from_string()
W. Trevor King [Sat, 5 Dec 2009 09:11:39 +0000 (04:11 -0500)]
Created diff.subscriptions_from_string()

14 years agoAdded --subscribe option to `be diff`
W. Trevor King [Sat, 5 Dec 2009 08:55:55 +0000 (03:55 -0500)]
Added --subscribe option to `be diff`

14 years agoAdded BUGDIR_TYPE_MOD and BUGDIR_TYPE_REM to libbe.diff.
W. Trevor King [Sat, 5 Dec 2009 08:53:26 +0000 (03:53 -0500)]
Added BUGDIR_TYPE_MOD and BUGDIR_TYPE_REM to libbe.diff.

Now you can subscribe to only hear about modified bugs or only about
removed bugs.  Kindof odd for a general subscription, but possibly
useful as an argument to the upcoming `be diff --subscribe`, e.g.
  be diff --subscribe DIR:mod
which would replace the old
  be diff --modified

14 years agoAdjusted diff.Subscription.__init__() to guess type_root if required.
W. Trevor King [Sat, 5 Dec 2009 08:32:06 +0000 (03:32 -0500)]
Adjusted diff.Subscription.__init__() to guess type_root if required.

14 years agoAdded subscriptions option to diff.Diff.report_tree().
W. Trevor King [Sat, 5 Dec 2009 08:22:25 +0000 (03:22 -0500)]
Added subscriptions option to diff.Diff.report_tree().

Also added diff.BUGDIR_ID to avoid lots of magic 'DIR' definitions,
and added diff.Subscription class to make the old (id, type) tuples a
bit more elegant.

14 years agoMoved subscription types from becommands/subscribe.py to libbe/diff.py.
W. Trevor King [Sat, 5 Dec 2009 06:58:41 +0000 (01:58 -0500)]
Moved subscription types from becommands/subscribe.py to libbe/diff.py.

14 years agoReplaced `be diff` options --new, --removed, --modified, and --all with --uuids.
W. Trevor King [Sat, 5 Dec 2009 06:30:30 +0000 (01:30 -0500)]
Replaced `be diff` options --new, --removed, --modified, and --all with --uuids.

We'll be adding a --subscribe option which will select the
bugs/changes we're interested in, which deprecates the selection
portion of the old options.  The new --uuids just selects the "bug
uuid" output over the default "change summary" output.

14 years agoSet boolean options default to False in becommands/list.py
W. Trevor King [Sat, 5 Dec 2009 06:10:01 +0000 (01:10 -0500)]
Set boolean options default to False in becommands/list.py

Otherwise they default to None.  It doesn't matter at the moment,
since all the comparisons seem to be
  if options.XYZ == True:
but this protects against confusion in the future if someone tries
  if options.XYZ == False:

14 years ago`be diff` raises UsageError if required revision control not possible.
W. Trevor King [Sat, 5 Dec 2009 06:00:35 +0000 (01:00 -0500)]
`be diff` raises UsageError if required revision control not possible.

It had previously printed an message and exitted without error.

14 years agoFix cmdutil.help() calls in be to use args not sys.argv.
W. Trevor King [Sat, 5 Dec 2009 05:57:43 +0000 (00:57 -0500)]
Fix cmdutil.help() calls in be to use args not sys.argv.

sys.argv won't work if there are any options in the be call, e.g.
  be -d DIR diff

14 years agoAdd __eq__ and __ne__ methods to Tree.
W. Trevor King [Sat, 5 Dec 2009 05:21:35 +0000 (00:21 -0500)]
Add __eq__ and __ne__ methods to Tree.

This fixes a bug introduced by
  revision-id: wking@drexel.edu-20091205034412-8apqxq8zqim48tf7
  committer: W. Trevor King <wking@drexel.edu>
  timestamp: Fri 2009-12-04 22:44:12 -0500
  message:
    Use __cmp__ instead of __eq__ for Tree comparison.

When I made that commit, I'd forgotten that Tree inherits an __eq__
method from list, so it won't fall back to the __cmp__ method to
determine equality.  The new __eq__ and __ne__ methods use __cmp__
internally, so further subclasses (e.g. Comment) only need to override
__cmp__.  Of course, list also defines __ge__, __gt__, __le__, __lt__,
... which I don't bother with, so stay away from TreeA > TreeB and the
like.

14 years agoMerged `be diff --dir DIR` functionality
W. Trevor King [Sat, 5 Dec 2009 04:55:11 +0000 (23:55 -0500)]
Merged `be diff --dir DIR` functionality

14 years agoUpdated NEWS
W. Trevor King [Sat, 5 Dec 2009 04:53:27 +0000 (23:53 -0500)]
Updated NEWS

14 years agoUpdated NEWS
W. Trevor King [Sat, 5 Dec 2009 04:39:15 +0000 (23:39 -0500)]
Updated NEWS

14 years agoAdded --dir option to `be diff'.
W. Trevor King [Sat, 5 Dec 2009 04:33:25 +0000 (23:33 -0500)]
Added --dir option to `be diff'.

Now you can compare two repositories:
  be -d branchA diff -d branchB
or
  branchA$ be diff -d ../branchB
which is helpful for VCSs like bzr that lack cross-branch revid
visibility.  Git users can still use
  branchA$ be diff REVID
where REVID is a commit from any branch in the repo.

This new functionality acts like a BE counterpart to `bzr missing DIR'.

14 years agoFixed removed comment listing in libbe/diff.py.
W. Trevor King [Sat, 5 Dec 2009 04:30:32 +0000 (23:30 -0500)]
Fixed removed comment listing in libbe/diff.py.

Previous implementation guaranteed to raise KeyErrors, because new bug
doesn't contain the uuid.

14 years agoUse __cmp__ instead of __eq__ for Tree comparison.
W. Trevor King [Sat, 5 Dec 2009 03:44:12 +0000 (22:44 -0500)]
Use __cmp__ instead of __eq__ for Tree comparison.

This ensures that __ne__ will also work, and makes it easier to
subclass Tree.  For example, in the previous implementation you could
have
  >>> commA == commB
  False
  >>> cmp(commA, commB)
  0
if the comments had different ids, but equivalent content.

At the user-interface level, this removes some false "modified
comments" from `be diff`.

14 years agoDon't necessarily initialize a new VCS in BugDir.load_settings().
W. Trevor King [Fri, 4 Dec 2009 03:05:23 +0000 (22:05 -0500)]
Don't necessarily initialize a new VCS in BugDir.load_settings().

We may already have the right type, in which case, don't mess with it.
This speeds up bugdir loading a bit more:
  $ time be list > /dev/null

  real    0m1.245s
  user    0m1.116s
  sys     0m0.124s

14 years agoDon't get VCS version in VCS.__init__().
W. Trevor King [Fri, 4 Dec 2009 02:37:29 +0000 (21:37 -0500)]
Don't get VCS version in VCS.__init__().

Often, this just causes a slow subprocess.Popen() call to
get information we woln't even look at.

Old benchmark:
  $ time be list > /dev/null

  real    0m2.369s
  user    0m1.980s
  sys     0m0.388s
New benchmark:
  $ time be list > /dev/null

  real    0m1.472s
  user    0m1.304s
  sys     0m0.164s

14 years agoAdded libbe.TESTING (defaults to False).
W. Trevor King [Fri, 4 Dec 2009 02:19:54 +0000 (21:19 -0500)]
Added libbe.TESTING (defaults to False).

This flag allows us to skip unittest and testsuite declaration if we
woln't need them.  It speeds up simple be calls a suprising amount.
With Testing=True (the old behavior):
  wking@thor:be.wtk$ time ./be > /dev/null

  real    0m0.393s
  user    0m0.340s
  sys     0m0.048s
With TESTING=False (the new behavior):
  be.wtk$ time ./be > /dev/null

  real    0m0.216s
  user    0m0.152s
  sys     0m0.064s

This adjustment was inspired by Jakub Wilk's Debian bug:
  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=559295

14 years agoAdded copyright blurbs to __init__.py files.
W. Trevor King [Fri, 4 Dec 2009 01:38:58 +0000 (20:38 -0500)]
Added copyright blurbs to __init__.py files.

14 years agoRemove _test() functions from plugin.py and cmdutil.py.
W. Trevor King [Fri, 4 Dec 2009 01:16:56 +0000 (20:16 -0500)]
Remove _test() functions from plugin.py and cmdutil.py.

Testing should be handled through test.py, not by calling per-module
_test() functions.

14 years agoMerged completed be.email-bugs branch.
W. Trevor King [Mon, 30 Nov 2009 11:29:48 +0000 (06:29 -0500)]
Merged completed be.email-bugs branch.

Highlights:
  * import-xml now works as advertized in its longhelp string
  * new methods Bug.merge() and Comment.merge()
  * comment.list_to_root() is now Bug.add_comments()
  * BugDir.list_uuids() is now BugDir.uuids()
  * Bug.from_xml() now imports comments :p
  * test.py uses unittest.TestSuite 'suite' in becommands, if present.

14 years agoMark bug 565 as fixed: be email-bugs for bug submission from bzr-less users
W. Trevor King [Mon, 30 Nov 2009 11:29:04 +0000 (06:29 -0500)]
Mark bug 565 as fixed: be email-bugs for bug submission from bzr-less users

14 years agobe-handle-mail uses more conservative --add-only for be-bugs:xml
W. Trevor King [Mon, 30 Nov 2009 11:28:01 +0000 (06:28 -0500)]
be-handle-mail uses more conservative --add-only for be-bugs:xml

14 years agoGeneralized doctest string in subproc.py
W. Trevor King [Mon, 30 Nov 2009 11:26:09 +0000 (06:26 -0500)]
Generalized doctest string in subproc.py

14 years agoAdded some thoughts on import_xml merge algorithms
W. Trevor King [Mon, 30 Nov 2009 11:36:38 +0000 (06:36 -0500)]
Added some thoughts on import_xml merge algorithms

14 years agoFixed import_xml.py to live up to its longhelp description.
W. Trevor King [Mon, 30 Nov 2009 11:35:29 +0000 (06:35 -0500)]
Fixed import_xml.py to live up to its longhelp description.

Also added LonghelpTestCase to prove it.