be.git
14 years agoFix agressive be-handle-mail.Message._strip_footer().
W. Trevor King [Sat, 26 Sep 2009 16:45:27 +0000 (12:45 -0400)]
Fix agressive be-handle-mail.Message._strip_footer().

It had been eating the last line of the message (which wasn't a
problem when I had a blank line before the footer, but was when I had
neither footer nor trailing blank line).

14 years agoPrefix cache attributes in be-handle-mail with underscore (_).
W. Trevor King [Sat, 26 Sep 2009 16:43:40 +0000 (12:43 -0400)]
Prefix cache attributes in be-handle-mail with underscore (_).

To conform with Python convention for "hiding" class attributes only
intended for internal use.

14 years agoFixed invalid TAG error in becommands.subscribe.get_subscribers()
W. Trevor King [Sat, 26 Sep 2009 16:39:37 +0000 (12:39 -0400)]
Fixed invalid TAG error in becommands.subscribe.get_subscribers()

Check that the string has the right tag before attempting to parse it
:p.

14 years agoAdded -a and -l options to be subscribe.
W. Trevor King [Sat, 26 Sep 2009 16:37:49 +0000 (12:37 -0400)]
Added -a and -l options to be subscribe.

It's useful to have some way to see the current subscription status
from the command line ;).

14 years agoAdded normalize_RFC_2822_date() to be-mbox-to-xml.
W. Trevor King [Wed, 23 Sep 2009 16:18:31 +0000 (12:18 -0400)]
Added normalize_RFC_2822_date() to be-mbox-to-xml.

The
  if new_fields[u'date'] != None:
bit avoids attemting to normalize missing dates (which fails).  You
get messages with missing dates when comment_message_to_xml() is
called recursively for multipart messages.

Also fixed some unicode keys (['X'] -> [u'X']) for consistency.

14 years agoAdded normalize_email_address() to be-mbox-to-xml
W. Trevor King [Wed, 23 Sep 2009 15:03:59 +0000 (11:03 -0400)]
Added normalize_email_address() to be-mbox-to-xml

14 years agoFixed mutliple in-reply-to splitting in be-mbox-to-xml
W. Trevor King [Wed, 23 Sep 2009 14:47:17 +0000 (10:47 -0400)]
Fixed mutliple in-reply-to splitting in be-mbox-to-xml

14 years agoFixed bugdir name collision in cmdutil.bug_from_shortname()
W. Trevor King [Wed, 23 Sep 2009 14:07:38 +0000 (10:07 -0400)]
Fixed bugdir name collision in cmdutil.bug_from_shortname()

14 years agoUse Bug.active to decide active status in becommands/html.py
W. Trevor King [Wed, 23 Sep 2009 13:13:46 +0000 (09:13 -0400)]
Use Bug.active to decide active status in becommands/html.py

14 years agoConvert incoming text/* email payloads to unicode in be-handle-mail.
W. Trevor King [Wed, 23 Sep 2009 10:30:31 +0000 (06:30 -0400)]
Convert incoming text/* email payloads to unicode in be-handle-mail.

Switched from cStringIO to StringIO in be-handle-mail because:
  (from http://docs.python.org/library/stringio.html)

  "Unlike the memory files implemented by the StringIO module, those
  provided by this [cStringIO] module are not able to accept Unicode
  strings that cannot be encoded as plain ASCII strings."

I'm not sure what all the fuss with sys.__stdin__ had been about in
Command.run(), but I took it out and everything still seems to work
;).

Also fix Makefail (again!) to install under $HOME by default.

14 years agoos.path.isdir() -> .exists() for check for "comments" file.
W. Trevor King [Mon, 21 Sep 2009 13:52:28 +0000 (09:52 -0400)]
os.path.isdir() -> .exists() for check for "comments" file.

"comments" should always be a directory if it exists, but if it is
something else, be should fail rather than return an empty comment
list.

This fix was inspired by some browsing around in response to Thomas
Habets' version of a fix for missing "bugs" directory.

14 years agoInclude stdout in CommandError.
W. Trevor King [Sat, 19 Sep 2009 21:58:09 +0000 (17:58 -0400)]
Include stdout in CommandError.

14 years agoFixed email.Parser typo in send_pgp_mime.py imports for Python 2.4.
W. Trevor King [Thu, 17 Sep 2009 19:31:01 +0000 (15:31 -0400)]
Fixed email.Parser typo in send_pgp_mime.py imports for Python 2.4.

14 years agoAdded `be --verbose-version' option to print full version information.
W. Trevor King [Tue, 15 Sep 2009 22:59:16 +0000 (18:59 -0400)]
Added `be --verbose-version' option to print full version information.

14 years agoAdded libbe.version, wrapping the auto-generated libbe._version.
W. Trevor King [Tue, 15 Sep 2009 13:32:40 +0000 (09:32 -0400)]
Added libbe.version, wrapping the auto-generated libbe._version.

Two major benefits:

1) Programatic access to the BE version.  Previously the
version-string logic was internal to the commandline interface ./be,
which left the other interfaces hanging.

2) Simple to override auto-generated revision id version with any
string you like (by setting libbe.version._VERSION, if that's the way
you want to run things or the way your packaging system requires.

Note that other modules should never read libbe.version._VERSION,
since it may not be defined.  Instead they should use the output of
libbe.version.version().

14 years agoFixed a few typos in be-handle-mail
W. Trevor King [Sun, 13 Sep 2009 10:42:38 +0000 (06:42 -0400)]
Fixed a few typos in be-handle-mail

14 years agoMention commit message in interactive email README subject explaination.
W. Trevor King [Sun, 13 Sep 2009 10:32:07 +0000 (06:32 -0400)]
Mention commit message in interactive email README subject explaination.

14 years agoExplicitly set encoding to UTF-8.
W. Trevor King [Sun, 13 Sep 2009 09:54:31 +0000 (05:54 -0400)]
Explicitly set encoding to UTF-8.

Because otherwise we run into problems when running be from inside
cron jobs.

14 years agoTypo EncryptedMessageFactory -> PGPMimeMessageFactory in send-pgp-mime.py
W. Trevor King [Fri, 11 Sep 2009 15:52:02 +0000 (11:52 -0400)]
Typo EncryptedMessageFactory -> PGPMimeMessageFactory in send-pgp-mime.py

I changed the class name in commit
  wking@drexel.edu-20090718201613-n242qfl4s3j3kfjf
but missed two references.

14 years agoAdded docstrings to libbe submodules.
W. Trevor King [Mon, 31 Aug 2009 18:19:40 +0000 (14:19 -0400)]
Added docstrings to libbe submodules.

Also a few minor tweaks to the module imports.

14 years agoBugDir.duplicate_bugdir() fix for when parent bugdir's sync_with_disk == False.
W. Trevor King [Mon, 31 Aug 2009 17:54:09 +0000 (13:54 -0400)]
BugDir.duplicate_bugdir() fix for when parent bugdir's sync_with_disk == False.

14 years agoRCS -> VCS, BUGDIR_DISK_VERSION -> v1.2
W. Trevor King [Mon, 31 Aug 2009 17:43:32 +0000 (13:43 -0400)]
RCS -> VCS, BUGDIR_DISK_VERSION -> v1.2

14 years agoMerged be.on-disk-upgrade, which added libbe.upgrade
W. Trevor King [Mon, 31 Aug 2009 17:19:45 +0000 (13:19 -0400)]
Merged be.on-disk-upgrade, which added libbe.upgrade

14 years agoUse 'v#.#' for major/minor version in upgrade.BUGDIR_DISK_VERSIONS
W. Trevor King [Mon, 31 Aug 2009 17:18:36 +0000 (13:18 -0400)]
Use 'v#.#' for major/minor version in upgrade.BUGDIR_DISK_VERSIONS

14 years agoUpgrade duplicate bugdirs if necessary (e.g. for `be diff').
W. Trevor King [Mon, 31 Aug 2009 17:16:48 +0000 (13:16 -0400)]
Upgrade duplicate bugdirs if necessary (e.g. for `be diff').

Also moved pre-YAML mapfile handling in mapfile.parse() into
upgrade.Upgrade_1_0_to_2._upgrade_mapfile().

14 years agoAdded libbe/upgrade.py to handle upgrading on-disk bugdirs.
W. Trevor King [Mon, 31 Aug 2009 16:32:05 +0000 (12:32 -0400)]
Added libbe/upgrade.py to handle upgrading on-disk bugdirs.

14 years agoMade get_path() definitions consistent between bugdirs, bugs, and comments.
W. Trevor King [Mon, 31 Aug 2009 15:50:28 +0000 (11:50 -0400)]
Made get_path() definitions consistent between bugdirs, bugs, and comments.

14 years agoBug 22b (target-bugs) blocked by 519 (on-disk upgrade) and assigned to Trevor
W. Trevor King [Mon, 31 Aug 2009 13:54:55 +0000 (09:54 -0400)]
Bug 22b (target-bugs) blocked by 519 (on-disk upgrade) and assigned to Trevor

14 years agoVCS vs. RCS terminology blocked by on-disk upgrade path.
W. Trevor King [Mon, 31 Aug 2009 06:31:21 +0000 (02:31 -0400)]
VCS vs. RCS terminology blocked by on-disk upgrade path.

14 years agoAdded comment 22b:7 about representing targets with Bug() instances.
W. Trevor King [Mon, 31 Aug 2009 06:26:19 +0000 (02:26 -0400)]
Added comment 22b:7 about representing targets with Bug() instances.

14 years agoBroke up be-handle-mail.parse() into parse_new(), _comment(), and _control().
W. Trevor King [Sun, 16 Aug 2009 20:02:18 +0000 (16:02 -0400)]
Broke up be-handle-mail.parse() into parse_new(), _comment(), and _control().

Also fleshed out the be-handle-mail docstring.

14 years agoAdded on-disk representation upgrade bug
W. Trevor King [Sun, 16 Aug 2009 19:09:21 +0000 (15:09 -0400)]
Added on-disk representation upgrade bug

14 years agoHandle BugDir.list_uuids() in the case of missing ".be/bugs/".
W. Trevor King [Tue, 11 Aug 2009 18:46:26 +0000 (14:46 -0400)]
Handle BugDir.list_uuids() in the case of missing ".be/bugs/".

Previously:
  $ be init
  $ be list
  ...
    File ".../libbe/bugdir.py", line 537, in list_uuids
      for uuid in os.listdir(self.get_path("bugs")):
  OSError: [Errno 2] No such file or directory: '.../.be/bugs'

14 years ago"be html" fixes bug 2f0
W. Trevor King [Sat, 8 Aug 2009 14:24:33 +0000 (10:24 -0400)]
"be html" fixes bug 2f0

14 years agoOops, update comment.From->author and .time_string->.date in becommands/html.py
W. Trevor King [Sat, 8 Aug 2009 14:23:23 +0000 (10:23 -0400)]
Oops, update comment.From->author and .time_string->.date in becommands/html.py

14 years agoUpdated AUTHORS and copyright info for becommands/html.py.
W. Trevor King [Fri, 7 Aug 2009 18:29:16 +0000 (14:29 -0400)]
Updated AUTHORS and copyright info for becommands/html.py.

Also adjusted update_copyright.sh to ignore Gianluca's temporary use
of
  gianluca <gian@galactica>
since he's now using
  Gianluca Montecchi <gian@grys.it>
on becommands/html.py.

14 years agoMerged Gianluca's html output branch.
W. Trevor King [Fri, 7 Aug 2009 18:19:30 +0000 (14:19 -0400)]
Merged Gianluca's html output branch.

Changes to merge with my branch:

  * Added some reference to "be html" or "becommands/html.py" in his
    new bugs' summaries.  Bug titles should make clear to which aspect
    of our growing repository they refer.
  * Fixed unittests in becommands/html.py.
  * execute() kwarg "test"->!"manipulate_encodings
  * bugdir.simple_bug_dir() -> bugdir.SimpleBugDir()
  * bd.cleanup() at end of unittests

14 years agoSort bugs in HTML output.
W. Trevor King [Fri, 7 Aug 2009 17:53:26 +0000 (13:53 -0400)]
Sort bugs in HTML output.

14 years agoXHTML attribute values should be strings, and cellspacing not allowed in tr.
W. Trevor King [Fri, 7 Aug 2009 17:49:47 +0000 (13:49 -0400)]
XHTML attribute values should be strings, and cellspacing not allowed in tr.

14 years agoEscape HTML entities (e.g. & and @) in HTML output
W. Trevor King [Fri, 7 Aug 2009 17:45:19 +0000 (13:45 -0400)]
Escape HTML entities (e.g. & and @) in HTML output

14 years agoXHTML tags must be closed (e.g. <br />, not <br>)
W. Trevor King [Fri, 7 Aug 2009 17:23:00 +0000 (13:23 -0400)]
XHTML tags must be closed (e.g. <br />, not <br>)

14 years agoXHTML attribute values should be strings.
W. Trevor King [Fri, 7 Aug 2009 17:21:47 +0000 (13:21 -0400)]
XHTML attribute values should be strings.

14 years agoProtect bug html from libbe.settings_object.EMPTY
W. Trevor King [Fri, 7 Aug 2009 17:19:58 +0000 (13:19 -0400)]
Protect bug html from libbe.settings_object.EMPTY

14 years agoAdded DOCTYPE to detail html as well
W. Trevor King [Fri, 7 Aug 2009 17:15:19 +0000 (13:15 -0400)]
Added DOCTYPE to detail html as well

14 years agoRespect bugdir's encoding in html generation
W. Trevor King [Fri, 7 Aug 2009 17:12:08 +0000 (13:12 -0400)]
Respect bugdir's encoding in html generation

14 years agoAdded DOCTYPE and post-</div> endlines
W. Trevor King [Fri, 7 Aug 2009 17:09:15 +0000 (13:09 -0400)]
Added DOCTYPE and post-</div> endlines

14 years agoImproved threaded comment handling.
W. Trevor King [Fri, 7 Aug 2009 17:04:46 +0000 (13:04 -0400)]
Improved threaded comment handling.

The previous method only grabbed first line of a comment.  The new
approach replaces the messy Comment->string->parse->html with
Comment->html.

Also replaced all open()s with codecs.open to allow for non-ASCII
output.  Alphabetized the non libbe imports while I was adding codecs.

14 years agoAdjusted help/doc strings in becommands/html.py
W. Trevor King [Fri, 7 Aug 2009 15:52:39 +0000 (11:52 -0400)]
Adjusted help/doc strings in becommands/html.py

14 years ago- closed bugs f77, 2b8 d8d
Gianluca Montecchi [Tue, 4 Aug 2009 21:31:33 +0000 (23:31 +0200)]
- closed bugs f77, 2b8 d8d
- some changes to the css and to the html layout

14 years agoMerged bugfix branch be.missing-git-config
W. Trevor King [Tue, 4 Aug 2009 19:43:33 +0000 (15:43 -0400)]
Merged bugfix branch be.missing-git-config

14 years agoNow libbe.git.Git handles missing name/email and guesses instead.
W. Trevor King [Tue, 4 Aug 2009 19:42:49 +0000 (15:42 -0400)]
Now libbe.git.Git handles missing name/email and guesses instead.

14 years agoMerged Gianluca's missing-git-config bug report
W. Trevor King [Tue, 4 Aug 2009 19:34:19 +0000 (15:34 -0400)]
Merged Gianluca's missing-git-config bug report

14 years agoImported Ben's VCS vs. RCS bug report from the mailing list.
W. Trevor King [Mon, 3 Aug 2009 23:28:34 +0000 (19:28 -0400)]
Imported Ben's VCS vs. RCS bug report from the mailing list.

14 years agoSsupport for UTF-8 in "be comment" calls to EDITOR/VISUAL.
W. Trevor King [Mon, 3 Aug 2009 23:27:00 +0000 (19:27 -0400)]
Ssupport for UTF-8 in "be comment" calls to EDITOR/VISUAL.

14 years agoFixed width and index
Gianluca Montecchi [Mon, 3 Aug 2009 19:29:21 +0000 (21:29 +0200)]
Fixed width and index

14 years agoMerged dependency tree branch.
W. Trevor King [Sat, 1 Aug 2009 18:21:08 +0000 (14:21 -0400)]
Merged dependency tree branch.

Also exposes dependency manipulation functions/classes for use by
other modules.

14 years agoAdded dependency tree display with "be depend -t DEPTH BUG-ID".
W. Trevor King [Sat, 1 Aug 2009 18:16:09 +0000 (14:16 -0400)]
Added dependency tree display with "be depend -t DEPTH BUG-ID".

Should probably be a directed graph, since people might not make
tree-like dependency graphs.  Cyclic graphs seem unlikely, though,
so a tree only risks redundant bug entries.

14 years agoAdded one-way-link repair.
W. Trevor King [Sat, 1 Aug 2009 11:52:51 +0000 (07:52 -0400)]
Added one-way-link repair.

14 years agoAdded two-way dependency links.
W. Trevor King [Sat, 1 Aug 2009 11:12:46 +0000 (07:12 -0400)]
Added two-way dependency links.

Still need to implement and test one-way-link repair.

14 years agoClosed bug f77, minox fix to layout
Gianluca Montecchi [Fri, 31 Jul 2009 21:54:05 +0000 (23:54 +0200)]
Closed bug f77, minox fix to layout

14 years agoNow becommands.new's unittest cleans up after itself.
W. Trevor King [Fri, 31 Jul 2009 19:05:19 +0000 (15:05 -0400)]
Now becommands.new's unittest cleans up after itself.

14 years agoImproved unittest cleanup by adding BugDir.cleanup().
W. Trevor King [Fri, 31 Jul 2009 18:59:06 +0000 (14:59 -0400)]
Improved unittest cleanup by adding BugDir.cleanup().

Also simple_bug_dir -> SimpleBugDir class, which allows me to add
utility.Dir cleanup to SimpleBugDir.cleanup().

Still having a bit of trouble with the becommand.new tests due to
bugdir loading though...

14 years agoReturn to original directory after libbe.bugdir.SimpleBugDirTestCase().
W. Trevor King [Fri, 31 Jul 2009 09:24:05 +0000 (05:24 -0400)]
Return to original directory after libbe.bugdir.SimpleBugDirTestCase().

This was causing strange "RCS not found" errors in the bzr and hg
unittests.  For example, the bzr tests all passed:
  wking@thor:be.wtk-rr$ python test.py bzr
  ...
  Ran 12 tests in 24.143s

  OK
Except when run after the bugdir tests:
  wking@thor:be.wtk-rr$ python test.py bugdir bzr
  ...
  Ran 19 tests in 1.862s

  FAILED (errors=12)
Where the failures were all
  AssertionError: bzr RCS not found

Fixed by returning to intial directory after SimpleBugDirTestCase
execution.  Problem is due to Python issues with unlinked directories
though, so bzr/hg will _still_ not work from unlinked directories.
This is for Python 2.5.4 on Ubuntu 8.04.3, but probably effects other
pythons too.

Details:

Isolated problem to unlinked directories:
  mkdir /tmp/a
  cd /tmp/a
  rmdir /tmp/a
  python /home/wking/src/fun/be/be.wtk-rr/test.py bzr
which fails with the same "RCS not found" errors because bzr fails:
  wking@thor:/$ mkdir /tmp/a; cd /tmp/a; rmdir /tmp/a; bzr --help; cd /;
  rmdir: removing directory, /tmp/a
  'import site' failed; use -v for traceback
  bzr: ERROR: Couldn't import bzrlib and dependencies.
  Please check bzrlib is on your PYTHONPATH.

  Traceback (most recent call last):
    File "/usr/bin/bzr", line 64, in <module>
      import bzrlib
  ImportError: No module named bzrlib
which fails becase 'import site' fails:
  wking@thor:/$ mkdir /tmp/a; cd /tmp/a; rmdir /tmp/a; python -c 'import site'; cd /;
  rmdir: removing directory, /tmp/a
  'import site' failed; use -v for traceback
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/home/wking/lib/python/site.py", line 73, in <module>
      __boot()
    File "/home/wking/lib/python/site.py", line 33, in __boot
      imp.load_module('site',stream,path,descr)
    File "/usr/lib/python2.5/site.py", line 408, in <module>
      main()
    File "/usr/lib/python2.5/site.py", line 392, in main
      paths_in_sys = removeduppaths()
    File "/usr/lib/python2.5/site.py", line 96, in removeduppaths
      dir, dircase = makepath(dir)
    File "/usr/lib/python2.5/site.py", line 72, in makepath
      dir = os.path.abspath(os.path.join(*paths))
    File "/usr/lib/python2.5/posixpath.py", line 403, in abspath
      path = join(os.getcwd(), path)
  OSError: [Errno 2] No such file or directory
which fails because our cwd doesn't exist.  That makes sense ;).
Still I think Python should be able to handle it, so I reported it
  http://bugs.python.org/issue6612

14 years agoRemoved libbe.bzr.Bzr's automerge on post-commit.
W. Trevor King [Fri, 31 Jul 2009 08:57:32 +0000 (04:57 -0400)]
Removed libbe.bzr.Bzr's automerge on post-commit.

I'd done this already in
  wking@drexel.edu-20090723154304-swmkxpfagdzff9ai
but for some reason the merge with the email branch brought it back.

14 years agoFixed libbe.bugdir.BugDirTestCase.testComments(sync_with_disk=False).
W. Trevor King [Fri, 31 Jul 2009 08:25:21 +0000 (04:25 -0400)]
Fixed libbe.bugdir.BugDirTestCase.testComments(sync_with_disk=False).

14 years agoFixed comment.cmp_attr unittest because "o" > "a" so cmp("o", "a") == 1.
W. Trevor King [Fri, 31 Jul 2009 08:17:05 +0000 (04:17 -0400)]
Fixed comment.cmp_attr unittest because "o" > "a" so cmp("o", "a") == 1.

14 years agoFixed indent spacing in libbe.diff.report().
W. Trevor King [Fri, 31 Jul 2009 08:13:33 +0000 (04:13 -0400)]
Fixed indent spacing in libbe.diff.report().

Only increment depth if data_part != None.

14 years agoMerged interactive email interface
W. Trevor King [Wed, 29 Jul 2009 19:56:10 +0000 (15:56 -0400)]
Merged interactive email interface

14 years agoCorrected some problems with revision_id() before an initial commit.
W. Trevor King [Wed, 29 Jul 2009 19:49:45 +0000 (15:49 -0400)]
Corrected some problems with revision_id() before an initial commit.

14 years agoAdded clean messages on bug_from_shortname failure.
W. Trevor King [Wed, 29 Jul 2009 19:46:37 +0000 (15:46 -0400)]
Added clean messages on bug_from_shortname failure.

So user's don't get confused.

14 years agoMoved all the implementation into the html.py file
Gianluca Montecchi [Mon, 27 Jul 2009 21:59:40 +0000 (23:59 +0200)]
Moved all the implementation into the html.py file
Implemented the creation of the index for active and inactive bugs, with detail for earch of them

14 years agobe-handle-mail no longer sends blank subscriber emails when no change occurs.
W. Trevor King [Mon, 27 Jul 2009 21:04:42 +0000 (17:04 -0400)]
be-handle-mail no longer sends blank subscriber emails when no change occurs.

It had been mailing out the empty MIMEMultipart root returned by
diff_tree.report().

14 years agoFixed _procmailrc rules.
W. Trevor King [Mon, 27 Jul 2009 20:38:30 +0000 (16:38 -0400)]
Fixed _procmailrc rules.

"[" is a special character.

Also a few minor cleanups in be-handle-mail.

14 years agoRestored Makefile to /home/wking installation
W. Trevor King [Mon, 27 Jul 2009 19:05:55 +0000 (15:05 -0400)]
Restored Makefile to /home/wking installation

14 years agoCleaned up be-handle-mail's subscriber notification emails (fewer attachments).
W. Trevor King [Mon, 27 Jul 2009 18:42:17 +0000 (14:42 -0400)]
Cleaned up be-handle-mail's subscriber notification emails (fewer attachments).

Previously, every node in the DiffTree created it's own attachment.
Now they're consolidated into a single attachment per bug.  higher
level nodes are still one attachment per node.

Also:
  * added send_pgp_mime.append_text()
  * pulled guess_encoding() out of send_pgp_mime.encodedMIMEText().
  * renamed data_string -> data_part in libbe.diff, since it needn't be a string.

14 years agoAllow "subscribe" command via the email interface.
W. Trevor King [Mon, 27 Jul 2009 13:24:46 +0000 (09:24 -0400)]
Allow "subscribe" command via the email interface.

14 years agoTweaked the output text for modified bugs in libbe.diff and be-handle-mail.
W. Trevor King [Mon, 27 Jul 2009 13:06:27 +0000 (09:06 -0400)]
Tweaked the output text for modified bugs in libbe.diff and be-handle-mail.

14 years agoAdded "be-handle-mail --notify-since REVISION".
W. Trevor King [Mon, 27 Jul 2009 13:01:04 +0000 (09:01 -0400)]
Added "be-handle-mail --notify-since REVISION".

14 years agoAdded an additional format check to be-handle-mail's pseudoheader parsing.
W. Trevor King [Mon, 27 Jul 2009 12:38:33 +0000 (08:38 -0400)]
Added an additional format check to be-handle-mail's pseudoheader parsing.

Marked outstanding email interface bugs as fixed.

14 years agoMerged "be subscribe" and be-handle-mail subscription support.
W. Trevor King [Mon, 27 Jul 2009 12:12:16 +0000 (08:12 -0400)]
Merged "be subscribe" and be-handle-mail subscription support.

Also assorted other changes and fixes in the be.subscribe branch.
Highlights:
  * Much more powerful libbe.diff with subclassable report generators.
  * "be diff" compares working copy with last commit by default.
  * comment reference text shown in "be comment" EDITOR footer
  * .revision_id() for all VCSs
  * meaningful comment comparison and stricter bug comparison
  * stricter .sync_with_disk interpretation.  See BugDir.__doc__.
  * Comment.From and .time_string -> .author and .date, for better
    conformance with settings_object.setting_name_to_attr_name().

14 years agoSubscribing myself to all changes.
W. Trevor King [Mon, 27 Jul 2009 12:11:11 +0000 (08:11 -0400)]
Subscribing myself to all changes.

14 years agoMoved be-handle-mail over to new libbe.diff classes.
W. Trevor King [Mon, 27 Jul 2009 12:09:20 +0000 (08:09 -0400)]
Moved be-handle-mail over to new libbe.diff classes.

14 years agoRemoved debugging exception from libbe/comment.py.
W. Trevor King [Mon, 27 Jul 2009 11:59:38 +0000 (07:59 -0400)]
Removed debugging exception from libbe/comment.py.

14 years agoComment.remove() now ignores .sync_with_disk when removing the root comment.
W. Trevor King [Mon, 27 Jul 2009 11:56:17 +0000 (07:56 -0400)]
Comment.remove() now ignores .sync_with_disk when removing the root comment.

14 years agoAdded default to settings_object.versioned_property's change_hook_property.
W. Trevor King [Mon, 27 Jul 2009 11:47:35 +0000 (07:47 -0400)]
Added default to settings_object.versioned_property's change_hook_property.

Now change_hook properties handle defaults, which allows them to avoid
an initial
  None -> default
save hook trigger.

Removed the now-redundant read-only mode business in
becommands/diff.py.

14 years agoPut bd into read-only mode in becommands/diff.py.
W. Trevor King [Mon, 27 Jul 2009 11:22:01 +0000 (07:22 -0400)]
Put bd into read-only mode in becommands/diff.py.

Otherwise comment comparison reads were triggering notice of the
  None -> EMPTY
transition in comment.extra_strings, which was causing a write to
disk.  This trigger is probably occuring in Bug and BugDir too.
Perhaps I should just remove the trigger...

14 years agoAdded cmp functions to libbe.comment, and fleshed them out in libbe.bug.
W. Trevor King [Mon, 27 Jul 2009 11:18:13 +0000 (07:18 -0400)]
Added cmp functions to libbe.comment, and fleshed them out in libbe.bug.

Previous comment comparison had just been the default Tree.__cmp__.

Fleshed out so A == B ensures no meaningful differences between A and B.

Also added first line of comments to new comment output in libbe.diff,
and added a comment/"settings" node and .comment_mod_string() (to
mirror bugdir and bug).

14 years agoHack Comment.load_settings() to work around From->Author change.
W. Trevor King [Mon, 27 Jul 2009 10:23:20 +0000 (06:23 -0400)]
Hack Comment.load_settings() to work around From->Author change.

"Author" -> comment.author obeys settings_object.setting_name_to_attr_name(),
but all the current on-disk mapfiles talk about "From".  Add a hack to accept
both forms of on-disk comment files.

14 years agoCache data strings in libbe.diff.DiffTree.
W. Trevor King [Mon, 27 Jul 2009 09:57:40 +0000 (05:57 -0400)]
Cache data strings in libbe.diff.DiffTree.

This makes repeated .report() generation from the same tree more
efficient.

14 years agoMajor rewrite of libbe.diff introduces DiffTree and Diff classes.
W. Trevor King [Mon, 27 Jul 2009 09:14:49 +0000 (05:14 -0400)]
Major rewrite of libbe.diff introduces DiffTree and Diff classes.

To make the interface proposed by becommands/subscribers.py easier to
implement, I've moved the libbe.diff functionality into classes.  Now
it should be easy two tweak the output as desired by subclassing these
classes.  The basic idea is that Diff.report_tree() generates a
diff_tree tree of changes between two bugdirs, where diff_tree is some
subclass of DiffTree.  Each type of change has a default .*_string()
method producing a string summary of the change.  DiffTree.report()
moves through and generates a report by joining all those summary
strings to a single root, and DiffTree.report_string() serialized the
report to produce e.g. the output of becommands/diff.py.

14 years ago.sync_with_disk fixes for libbe.bugdir and .comment.
W. Trevor King [Mon, 27 Jul 2009 09:11:33 +0000 (05:11 -0400)]
.sync_with_disk fixes for libbe.bugdir and .comment.

In BugDir, only call bug.remove if bug.sync_with_disk==True.  If it's
just in memory, automatic garbage collection is sufficient cleanup.

Comment.set_sync_with_disk() had been setting .sync_with_disk=True
regardless of the value passed in.  Fixed now.

Also some minor textual adjustments.

14 years agoAdded DiskAccessRequired errors to libbe.bug.Bug and .comment.Comment.
W. Trevor King [Mon, 27 Jul 2009 00:40:08 +0000 (20:40 -0400)]
Added DiskAccessRequired errors to libbe.bug.Bug and .comment.Comment.

14 years agoBugDir._in_memory was a stupid idea. Took it back out.
W. Trevor King [Mon, 27 Jul 2009 00:04:32 +0000 (20:04 -0400)]
BugDir._in_memory was a stupid idea.  Took it back out.

It was too confusing having three memory access levels:
  1) syncronized
  2) explicit
  3) memory-only
with .sync_with_disk selecting between 1 and 2/3 and ._in_memory
selecting between 2/3.

Now there are only two:
  1) syncronized
  2) memory-only excepting explicit BugDir.save() calls.

I avoid the problem of non-syncronized loading of on-disk bugs in
simple_bug_dir by restricting .list_uuids() to in-memory bugs when
.sync_with_disk==True.

Beyond that, I shifted the order of the BugDir methods around a bit so
that they were better grouped according to general idea.

Note that the DiskAccessRequired exceptions on filesystem access when
.sync_with_disk==False should be propogated to the Bug and Comment
methods, but I haven't done that yet.

14 years agoAdded in_memory to BugDir.__init__ to disable saving/loading completely.
W. Trevor King [Sat, 25 Jul 2009 12:59:38 +0000 (08:59 -0400)]
Added in_memory to BugDir.__init__ to disable saving/loading completely.

The previous simple_bug_dir(on_disk==False) supprised me by loading my
BE bugdir when called from the BE directory.  This functionality could
probably move out to Bug and Comment as well, but I have avoided that
for now.

14 years agoAdded on_disk option to libbe.bugdir.simple_bug_dir().
W. Trevor King [Sat, 25 Jul 2009 11:32:12 +0000 (07:32 -0400)]
Added on_disk option to libbe.bugdir.simple_bug_dir().

Now you can easily generate simple_bug_dirs that live only in memory.

14 years agoRenamed Comment.From and .time_string to .author and .date respectively.
W. Trevor King [Sat, 25 Jul 2009 11:26:19 +0000 (07:26 -0400)]
Renamed Comment.From and .time_string to .author and .date respectively.

Now they conform to the
  libbe.settings_object.setting_name_to_attr_name()
standard.

I fixed the references I found in
  becommands/comment.py
  interfaces/xml/be-mbox-to-xml
  interfaces/xml/be-xml-to-mbox
but there may have been some references or files that slipped through.

14 years agoAdded autocommit wishlist request by Martin Krafft
W. Trevor King [Fri, 24 Jul 2009 20:14:57 +0000 (16:14 -0400)]
Added autocommit wishlist request by Martin Krafft

14 years agobe-handle-mail successfully generates bugdir-changed notification emails.
W. Trevor King [Thu, 23 Jul 2009 20:18:34 +0000 (16:18 -0400)]
be-handle-mail successfully generates bugdir-changed notification emails.

This still needs a lot of cleaning up, but it worked for an "all"
subscription to "DIR", so I thought I'd lock in the current status ;).

14 years ago"be diff" now compares agains the last commit (for versioning VCSs).
W. Trevor King [Thu, 23 Jul 2009 18:24:36 +0000 (14:24 -0400)]
"be diff" now compares agains the last commit (for versioning VCSs).

This is the default behaviour of most of the VCSs own diff commands.

14 years agoAdded .revision_id() to all the VCSs.
W. Trevor King [Thu, 23 Jul 2009 18:19:15 +0000 (14:19 -0400)]
Added .revision_id() to all the VCSs.

This makes it easier to compare recent revisions without a human
around to give you revision numbers.