be.git
14 years agoFix "extra_strings" -> "extra-strings" typos in be-xml-to-mbox
W. Trevor King [Thu, 28 Jan 2010 22:50:17 +0000 (17:50 -0500)]
Fix "extra_strings" -> "extra-strings" typos in be-xml-to-mbox

14 years agoAdd some workarounds for older bzrlibs. Tested on 1.3.1
W. Trevor King [Thu, 28 Jan 2010 18:17:42 +0000 (13:17 -0500)]
Add some workarounds for older bzrlibs.  Tested on 1.3.1

14 years agoWork around "bzr ls --non-recursive PATH : no list" bug in old bzrlib.
W. Trevor King [Thu, 28 Jan 2010 18:06:06 +0000 (13:06 -0500)]
Work around "bzr ls --non-recursive PATH : no list" bug in old bzrlib.

See: https://bugs.launchpad.net/bzr/+bug/158690

Bug affected versions:
  0.90.0 (reported)
  1.3.1  (my test suite hit it)
Doesn't affect versions:
  2.0+   (non_recursive -> recursive)
But I haven't isolated the source more specifically.

Working around it for everything < 2.0 should be safe, but the cutoff
could be fine-tuned if someone wants to dig through the bzr.dev
history...

14 years agoFix bzrlib.builtins.cmd_cat() output for pre 1.6.0 bzrlibs.
W. Trevor King [Thu, 28 Jan 2010 17:46:18 +0000 (12:46 -0500)]
Fix bzrlib.builtins.cmd_cat() output for pre 1.6.0 bzrlibs.

Fixed in bzr.dev
  revno: 3341.2.1
  revision-id: bialix@ukr.net-20080407074826-5lwuyv4dn1qlijg4
  parent: pqm@pqm.ubuntu.com-20080407044456-s1a9orh0kssphdh9
  committer: Alexander Belchenko <bialix@ukr.net>
  branch nick: cmd-cat
  timestamp: Mon 2008-04-07 10:48:26 +0300
  message: `bzr cat` no more internally used Tree.print_file().
Merged into bzr.dev's trunk
  revno: 3512 [merge]
  revision-id: pqm@pqm.ubuntu.com-20080626004245-dnw85so4xqg8r9hy
  parent: pqm@pqm.ubuntu.com-20080625230724-lyux37pu8nx8tq34
  parent: aaron@aaronbentley.com-20080626001706-wo3w74fwgliy12s4
  committer: Canonical.com Patch Queue Manager <pqm@pqm.ubuntu.com>
  branch nick: +trunk
  timestamp: Thu 2008-06-26 01:42:45 +0100
  message: (bialix) Deprectate (Branch|Repository).print_file, fix cmd_cat

Before bzr branch 1.6
  bzr.dev$ bzr tags
  ...
  bzr-1.5rc1           3418.6.3
  bzr-1.6              3606.5.9
  ...

Fixes:

python test.py -q libbe.storage.vcs.bzr
...............................FSome value:1E..
======================================================================
ERROR: Get should be able to return the previous version.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/wking/src/fun/be/be.wtk/libbe/storage/base.py", line 976, in test_
get_previous_version
    ret = self.s.get(self.id, revision=revs[i])
  File "/home/wking/src/fun/be/be.wtk/libbe/storage/base.py", line 335, in get
    value = self._get(*args, **kwargs)
  File "/home/wking/src/fun/be/be.wtk/libbe/storage/vcs/base.py", line 849, in _
get
    raise InvalidID(id, revision)
InvalidID: unlikely id in revision 1
...

14 years agoFix bzrlib.builtins.cmd_ls() recursion argument for pre 2.0 bzrlibs.
W. Trevor King [Thu, 28 Jan 2010 16:47:59 +0000 (11:47 -0500)]
Fix bzrlib.builtins.cmd_ls() recursion argument for pre 2.0 bzrlibs.

$ python test.py libbe.storage.vcs.bzr
...
======================================================================
ERROR: Children list should be revision dependent.
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".../libbe/storage/base.py", line 997, in test_
get_previous_children
    ret = sorted(self.s.children('parent', revision=revs[i]))
  File ".../libbe/storage/base.py", line 314, in child
ren
    return self._children(*args, **kwargs)
  File ".../libbe/storage/vcs/base.py", line 811, in _
children
    path = self.path(id, revision, relpath=False)
  File ".../libbe/storage/vcs/base.py", line 716, in p
ath
    path = self._vcs_path(id, revision)
  File ".../libbe/storage/vcs/bzr.py", line 145, in _v
cs_path
    self.repo, revision=revision, recursive=True)
  File ".../libbe/storage/vcs/bzr.py", line 163, in _v
cs_listdir
    cmd.run(revision=revision, path=path, recursive=recursive)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 800, in ignor
e_pipe
    result = func(*args, **kwargs)
TypeError: run() got an unexpected keyword argument 'recursive'
...

The change is due to (in bzr.dev):

revno: 4206.2.1
revision-id: ian.clatworthy@canonical.com-20090326133831-orvicmmc6w29mpfp
parent: pqm@pqm.ubuntu.com-20090326063330-evutyvml3067dpsz
committer: Ian Clatworthy <ian.clatworthy@canonical.com>
branch nick: bzr.ls-recursive-off
timestamp: Thu 2009-03-26 23:38:31 +1000
message: ls should be non-recursive by default

Which occured between bzr-1.9rc1 and 2.0rc1.:

bzr.dev$ bzr tags
2.0rc1               4634.9.1
...
bzr-1.9rc1           3815.3.1
bzr-2.0.1            4634.73.2
...

14 years agoMerged with be.wtk trunk
W. Trevor King [Thu, 28 Jan 2010 16:00:27 +0000 (11:00 -0500)]
Merged with be.wtk trunk

14 years agoOops, fix Comment doctest EDITOR cleanup
W. Trevor King [Thu, 28 Jan 2010 15:56:44 +0000 (10:56 -0500)]
Oops, fix Comment doctest EDITOR cleanup

14 years agoAdd #bea/9c2# : Can comment punt functionality to email.Message?
W. Trevor King [Thu, 28 Jan 2010 15:42:32 +0000 (10:42 -0500)]
Add #bea/9c2# : Can comment punt functionality to email.Message?

14 years agoDon't accidentally spawn VISUAL in Comment doctests.
W. Trevor King [Thu, 28 Jan 2010 12:33:51 +0000 (07:33 -0500)]
Don't accidentally spawn VISUAL in Comment doctests.

14 years agoImplement Arch._vcs_path()
W. Trevor King [Wed, 27 Jan 2010 21:50:34 +0000 (16:50 -0500)]
Implement Arch._vcs_path()

Fixes VersionedStorage_commit_TestCase.test_get_previous_children.
Should have fixed
  VersionedStorage_commit_TestCase.test_get_previous_version
too, but 'tla file-find' is buggy:
  https://bugs.launchpad.net/ubuntu/+source/tla/+bug/513472

Also:
  * sort children in test_get_previous_children, since we shouldn't
    require a particular child order
  * unescape filenames in Arch._diff()
  * remove debugging prints from Arch._parse_diff()
  * remove silly blank line in git.py I'd stumbled across ;).

14 years agoImplement Arch._vcs_changed().
W. Trevor King [Wed, 27 Jan 2010 17:47:37 +0000 (12:47 -0500)]
Implement Arch._vcs_changed().

Fixes VersionedStorage_changed_TestCase.test_changed failure.

14 years agoFix StorageTestCase.classname -> ._classname()
W. Trevor King [Wed, 27 Jan 2010 17:41:18 +0000 (12:41 -0500)]
Fix StorageTestCase.classname -> ._classname()

Introduced in
  wking@drexel.edu-20100127152727-nu58o4g6jea5or7w

14 years ago`be html` links (<a href="...) #-delimited references in text/* bodies.
W. Trevor King [Wed, 27 Jan 2010 17:06:53 +0000 (12:06 -0500)]
`be html` links (<a href="...) #-delimited references in text/* bodies.

14 years agoMerged clarifications requested by Ben Finney
W. Trevor King [Wed, 27 Jan 2010 15:29:40 +0000 (10:29 -0500)]
Merged clarifications requested by Ben Finney

14 years agoMake VCS error messages and Storage test failures more descriptive
W. Trevor King [Wed, 27 Jan 2010 15:27:27 +0000 (10:27 -0500)]
Make VCS error messages and Storage test failures more descriptive

14 years agoMerged be.auth, adding "--auth" to `be serve`
W. Trevor King [Wed, 27 Jan 2010 13:50:48 +0000 (08:50 -0500)]
Merged be.auth, adding "--auth" to `be serve`

14 years agoAdd --help, --quiet options to test.py.
W. Trevor King [Wed, 27 Jan 2010 13:39:00 +0000 (08:39 -0500)]
Add --help, --quiet options to test.py.

Fixes Ben's "unintuitive test.py interface" bug:

Date: Wed, 27 Jan 2010 14:09:14 +1100
From: Ben Finney
Subject: [Be-devel] Re: Test suite on Trevor's development branch
...
> $ python ./test.py -q
>
> ----------------------------------------------------------------------
> Ran 0 tests in 0.000s
>
> OK

Running a Python unittest-capable test suite with "-q" should run it in
"quiet" mode, where progress is indicated by single characters along a
lone, and only failures and errors are reported.
...

14 years agoEncourage a run of `make` to build auto-generated files.
W. Trevor King [Wed, 27 Jan 2010 13:22:22 +0000 (08:22 -0500)]
Encourage a run of `make` to build auto-generated files.

Fixes Ben's "unintuitive test procedure" bug:

Date: Wed, 27 Jan 2010 14:09:14 +1100
From: Ben Finney
Subject: [Be-devel] Re: Test suite on Trevor's development branch
...
> $ python ./test.py
> Traceback (most recent call last):
[...]
> ImportError: No module named _version

So it's not possible to simply get a copy of the branch and try running
the test suite.
...

14 years agoStreamlined libbe.command.serve, adding --auth option, #/bea/c1b#, and testing.
W. Trevor King [Wed, 27 Jan 2010 13:07:31 +0000 (08:07 -0500)]
Streamlined libbe.command.serve, adding --auth option, #/bea/c1b#, and testing.

14 years agoAdded --ssl to `be serve` using cherrypy.wsgiserver.
W. Trevor King [Mon, 25 Jan 2010 21:49:00 +0000 (16:49 -0500)]
Added --ssl to `be serve` using cherrypy.wsgiserver.

14 years agoConvert libbe.command.serve to WSGI for increased flexibility.
W. Trevor King [Mon, 25 Jan 2010 17:15:57 +0000 (12:15 -0500)]
Convert libbe.command.serve to WSGI for increased flexibility.

The Python Web Server Gateway Interface (WSGI) is a simple and
universal interface between web servers and web applications or
frameworks.  See PEP 333 for details.
  http://www.python.org/dev/peps/pep-0333/

14 years agoRework fix for #bea/8fc# : be crashes on outdated id-cache
W. Trevor King [Mon, 25 Jan 2010 12:54:37 +0000 (07:54 -0500)]
Rework fix for #bea/8fc# : be crashes on outdated id-cache

Now we re-run CachedPathID.init in an 'append' mode, rather than
starting over from scratch.  This avoids problems like

  ======================================================================
  ERROR: Should not be able to add children to non-directories.
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File ".../be.wtk/libbe/storage/base.py", line 680, in test_add_invalid_directory
      self.s.add('child', 'parent', directory=False)
    File ".../be.wtk/libbe/storage/base.py", line 248, in add
      self._add(id, *args, **kwargs)
    File ".../be.wtk/libbe/storage/vcs/base.py", line 737, in _add
      path = self._cached_path_id.add_id(id, parent)
    File ".../be.wtk/libbe/storage/vcs/base.py", line 267, in add_id
      parent_path = self.path(parent, relpath=True)
    File ".../be.wtk/libbe/storage/vcs/base.py", line 246, in path
      raise InvalidID(uuid)
  InvalidID: parent in revision None

and similar.

14 years agoDon't print 'Multiple paths' message on cache regen
W. Trevor King [Mon, 25 Jan 2010 12:31:57 +0000 (07:31 -0500)]
Don't print 'Multiple paths' message on cache regen

14 years agoFixed #bea/8fc# : be crashes on outdated id-cache
W. Trevor King [Mon, 25 Jan 2010 01:39:00 +0000 (20:39 -0500)]
Fixed #bea/8fc# : be crashes on outdated id-cache

Also explicitly avoid loading or saving settings for root comments.

14 years agoAdded bug #bea/8fc# : be crashes on outdated id-cache
W. Trevor King [Mon, 25 Jan 2010 00:51:17 +0000 (19:51 -0500)]
Added bug #bea/8fc# : be crashes on outdated id-cache

14 years agoMerged be.doc documentation rewrite + bugfixes + new bugs
W. Trevor King [Sun, 24 Jan 2010 16:22:53 +0000 (11:22 -0500)]
Merged be.doc documentation rewrite + bugfixes + new bugs

Highlights:
  * Fix broken Diff.comment_body_change_string implementation.
  * Fix List --severity handling, added --important
  * Fix `be target --help`
  * Fix non-text/plain `be comment` code and added 'Created
    comment...' output

14 years agoRewrote documentation
W. Trevor King [Sun, 24 Jan 2010 16:20:47 +0000 (11:20 -0500)]
Rewrote documentation

14 years agoAdded some bugs (and fixed typo) noticed while rewriting documentation
W. Trevor King [Sun, 24 Jan 2010 16:00:09 +0000 (11:00 -0500)]
Added some bugs (and fixed typo) noticed while rewriting documentation

14 years agoFix Diff.comment_body_change_string's difflib.unified_diff call
W. Trevor King [Sun, 24 Jan 2010 15:59:20 +0000 (10:59 -0500)]
Fix Diff.comment_body_change_string's difflib.unified_diff call

14 years agoFixed List --severity handling, added --important
W. Trevor King [Sun, 24 Jan 2010 00:28:57 +0000 (19:28 -0500)]
Fixed List --severity handling, added --important

14 years agoFix vars call for `be target --help`
W. Trevor King [Sat, 23 Jan 2010 23:51:57 +0000 (18:51 -0500)]
Fix vars call for `be target --help`

14 years agoUpdate --subscriber option help string for Subscribe
W. Trevor King [Sat, 23 Jan 2010 23:49:13 +0000 (18:49 -0500)]
Update --subscriber option help string for Subscribe

14 years agoModern ID format in `be list` _long_help
W. Trevor King [Sat, 23 Jan 2010 21:49:46 +0000 (16:49 -0500)]
Modern ID format in `be list` _long_help

14 years agoFix broken handling of non-text/plain comments
W. Trevor King [Sat, 23 Jan 2010 21:44:55 +0000 (16:44 -0500)]
Fix broken handling of non-text/plain comments

14 years agoAdded "Created comment..." output to `be comment`
W. Trevor King [Sat, 23 Jan 2010 20:56:14 +0000 (15:56 -0500)]
Added "Created comment..." output to `be comment`

14 years agoReorganized documentation to clean doc/ for user-readable files
W. Trevor King [Sat, 23 Jan 2010 16:40:11 +0000 (11:40 -0500)]
Reorganized documentation to clean doc/ for user-readable files

14 years agoFixed some bugs in settings_object handling and got test_usage.sh working.
W. Trevor King [Sat, 23 Jan 2010 16:16:42 +0000 (11:16 -0500)]
Fixed some bugs in settings_object handling and got test_usage.sh working.

Highlights:
  * clarified settings_object handling and improved unittests
  * added `be list --mine`
  * fixed some bugs in List, Import_XML, Init
  * added Storage.exists() (haven't implemented it in all VCS backends though).
  * added VCS.path()

14 years agoUpdate test_usage.sh
W. Trevor King [Sat, 23 Jan 2010 16:11:04 +0000 (11:11 -0500)]
Update test_usage.sh

14 years agoFix typos in untested parts of List and Import_XML for test_usage.py
W. Trevor King [Sat, 23 Jan 2010 16:10:45 +0000 (11:10 -0500)]
Fix typos in untested parts of List and Import_XML for test_usage.py

14 years agoAdded `be list --mine`
W. Trevor King [Sat, 23 Jan 2010 15:05:07 +0000 (10:05 -0500)]
Added `be list --mine`

14 years agoInit should tell the UI about its connected storage and bugdir.
W. Trevor King [Sat, 23 Jan 2010 15:05:00 +0000 (10:05 -0500)]
Init should tell the UI about its connected storage and bugdir.

14 years agoMove BugDir, Bug, and Comment to new _setup_saved_settings
W. Trevor King [Sat, 23 Jan 2010 01:38:57 +0000 (20:38 -0500)]
Move BugDir, Bug, and Comment to new _setup_saved_settings

14 years agoAdded testSimplePropertySetStorageSave and relavant rewrites to settings_object
W. Trevor King [Sat, 23 Jan 2010 01:35:23 +0000 (20:35 -0500)]
Added testSimplePropertySetStorageSave and relavant rewrites to settings_object

It hadn't been handling the "attach storage after initializing"
technique that BugDir, Bug, and Comment use when from_memory==True.
Now it does, by refusing to overwrite self.settings with the
newly-loaded settings.

14 years agoAdd Bzr._vcs_exists() anyway :p
W. Trevor King [Fri, 22 Jan 2010 19:14:03 +0000 (14:14 -0500)]
Add Bzr._vcs_exists() anyway :p

14 years agoWe don't need VCS._vcs_exists yet, with exists only used in _add
W. Trevor King [Fri, 22 Jan 2010 19:13:08 +0000 (14:13 -0500)]
We don't need VCS._vcs_exists yet, with exists only used in _add

14 years agoMinor cleanups + remove debuging line in Init doctest
W. Trevor King [Fri, 22 Jan 2010 19:05:01 +0000 (14:05 -0500)]
Minor cleanups + remove debuging line in Init doctest

14 years agoAdd VCS._exists(), VCS.path(). Fix default handling in VCS._get().
W. Trevor King [Fri, 22 Jan 2010 18:54:53 +0000 (13:54 -0500)]
Add VCS._exists(), VCS.path().  Fix default handling in VCS._get().

VCS.path() consolidates a bunch of distributed code.

The VCS backend cannot distinguish between _EMPTY and '' entry values,
so it assumes
  len(contents) == 0
means _EMPTY.  However, it had been returing None then, not default
like its supposed to.

14 years agoAdded _EMPTY and Storage.exists() to libbe.storage.base.
W. Trevor King [Fri, 22 Jan 2010 18:28:01 +0000 (13:28 -0500)]
Added _EMPTY and Storage.exists() to libbe.storage.base.

There seem to be problems distinguishing between "added but unset" IDs
and "added and set to ''" IDs.  Now _EMPTY lets us mark "added but unset",
and Storage.exists() handles "already added?" more clearly than the old
hack "does .get() succeed?".

14 years agoReworked settings_object module, but command.init tests still fail:
W. Trevor King [Fri, 22 Jan 2010 16:30:26 +0000 (11:30 -0500)]
Reworked settings_object module, but command.init tests still fail:

$ python test.py libbe.command.init
Doctest: libbe.command.init.Init ... FAIL
...
-----------------------
File ".../libbe/command/init.py", line 47, in libbe.command.init.Init
Failed example:
    ui.run(cmd)
Exception raised:
    Traceback (most recent call last):
      ...
      File "/tmp/be.wtk/libbe/command/init.py", line 97, in _run
        bd = libbe.bugdir.BugDir(storage, from_storage=False)
      File "/tmp/be.wtk/libbe/bugdir.py", line 185, in __init__
        self.save()
      File "/tmp/be.wtk/libbe/bugdir.py", line 228, in save
        self.save_settings()
      File "/tmp/be.wtk/libbe/bugdir.py", line 204, in save_settings
        mf = mapfile.generate(self._get_saved_settings())
      File "/tmp/be.wtk/libbe/storage/util/settings_object.py", line 230, in _get_saved_settings
        self, self._setting_name_to_attr_name(k))
      File "/tmp/be.wtk/libbe/storage/util/properties.py", line 194, in _fget
        value = fget(self)
      File "/tmp/be.wtk/libbe/storage/util/properties.py", line 329, in _fget
        primer(self)
      File "/tmp/be.wtk/libbe/storage/util/settings_object.py", line 69, in prop_load_settings
        self.load_settings()
      File "/tmp/be.wtk/libbe/bugdir.py", line 194, in load_settings
        self.settings = mapfile.parse(settings_mapfile)
      File "/tmp/be.wtk/libbe/storage/util/mapfile.py", line 123, in parse
        c = yaml.load(contents)
      ...
      File "/usr/lib/python2.6/site-packages/yaml/reader.py", line 213, in update_raw
        data = self.stream.read(size)
    AttributeError: 'NoneType' object has no attribute 'read'
...

14 years agoAdded unprimableVal option to primed_property.
W. Trevor King [Fri, 22 Jan 2010 14:17:08 +0000 (09:17 -0500)]
Added unprimableVal option to primed_property.

For clearer handling of the "Tried to load but failed" case.

14 years agoAdded tests to Init to check for empty settings file
W. Trevor King [Fri, 22 Jan 2010 14:15:36 +0000 (09:15 -0500)]
Added tests to Init to check for empty settings file

14 years agoBugfix merge: better Comment.xml() & libbe.util.id.parse_user()
W. Trevor King [Fri, 22 Jan 2010 11:40:23 +0000 (06:40 -0500)]
Bugfix merge: better Comment.xml() & libbe.util.id.parse_user()

Highlights:
  * new Comment.safe_in_reply_to to improve comment xml output.
  * don't raise MultipleIDMatches if one of the matches is exact.

14 years agoAdd Comment.safe_in_reply_to to improve comment xml output.
W. Trevor King [Fri, 22 Jan 2010 01:54:00 +0000 (20:54 -0500)]
Add Comment.safe_in_reply_to to improve comment xml output.

Now
  be show --xml ID | be-xml-to-mbox | catmutt
shows appropriate linking regardless of missing references or
references to alt-ids in the original comments.  On the other hand,
  be show --xml ID | be import-xml
could alter alt-ids.  If that's a problem we could turn off
save_in_reply_to usage via an option to the xml methods in the future.

14 years agoDon't raise MultipleIDMatches if one of the matches is exact.
W. Trevor King [Thu, 21 Jan 2010 22:25:05 +0000 (17:25 -0500)]
Don't raise MultipleIDMatches if one of the matches is exact.

14 years agoMerge assorted bugfixes and optimizations.
W. Trevor King [Thu, 21 Jan 2010 18:14:08 +0000 (13:14 -0500)]
Merge assorted bugfixes and optimizations.

Highlights:
  * `be new` adds creator field like its supposed to (oops :p).
  * `be list --xml` uses <be-xml> format (was <bugs>).
  * `be import-xml` handles root comments appropriately.
  * `be` raises an appropriate help message.
  * `be help` works.
  * `be html` prints Comment.id.user() information.
  * better SavedSettingsObject._get_saved_settings() avoids data loss.
  * be-mbox-to-xml -> be-mail-to-xml and adds assorted format support.
  * be-xml-to-mbox and be-handle-mail work with new libbe layout.
  * BugDir.uuids() now caches on-disk uuids for speed.
  * Mercurial detection works for mercurial <= 1.1.2 _and_ >= 1.2
  * Fix bugs in VCS._children() relative/absolute path handling.

14 years agoFix be-handle-mail's notification creation for new libbe structure
W. Trevor King [Thu, 21 Jan 2010 18:07:05 +0000 (13:07 -0500)]
Fix be-handle-mail's notification creation for new libbe structure

14 years agoAjdust Target tests for cached BugDir.uuids() implementation
W. Trevor King [Thu, 21 Jan 2010 17:52:24 +0000 (12:52 -0500)]
Ajdust Target tests for cached BugDir.uuids() implementation

14 years agoFix _uuids_cache reset in BugDir._clear_bugs
W. Trevor King [Thu, 21 Jan 2010 17:48:07 +0000 (12:48 -0500)]
Fix _uuids_cache reset in BugDir._clear_bugs

14 years agoUpdate libbe.storage.util.settings_object tests for new ._get_saved_settings
W. Trevor King [Thu, 21 Jan 2010 17:47:38 +0000 (12:47 -0500)]
Update libbe.storage.util.settings_object tests for new ._get_saved_settings

14 years agoFix version import for mercurial <= 1.1.2
W. Trevor King [Thu, 21 Jan 2010 17:45:49 +0000 (12:45 -0500)]
Fix version import for mercurial <= 1.1.2

14 years agoUse _get_user_id() in New, remove unused 'user-id' prop. from Commit.
W. Trevor King [Thu, 21 Jan 2010 17:24:45 +0000 (12:24 -0500)]
Use _get_user_id() in New, remove unused 'user-id' prop. from Commit.

Added creator field to bugs without creator information.  Mostly this
is due to the recent lack of creator-setting in `be new`.

14 years agoAdd _uuids_cache management to BugDir._clear_bugs
W. Trevor King [Thu, 21 Jan 2010 17:24:05 +0000 (12:24 -0500)]
Add _uuids_cache management to BugDir._clear_bugs

14 years agoAdd wrap_id to improve id handling in be-xml-to-mbox
W. Trevor King [Thu, 21 Jan 2010 15:25:24 +0000 (10:25 -0500)]
Add wrap_id to improve id handling in be-xml-to-mbox

14 years agoConverted `be list --xml` to <be-xml> format.
W. Trevor King [Thu, 21 Jan 2010 14:17:40 +0000 (09:17 -0500)]
Converted `be list --xml` to <be-xml> format.

Fixed up be-xml-to-mbox following the recent libbe restructuring.

Moved stdout manipulation in be-mail-to-xml into the if __name__ ==
'__main__' block, in case some other module wants to recycle some of
its functions/methods.

14 years agoFix not-yet-loaded bug in SavedSettingsObject._get_saved_settings()
W. Trevor King [Thu, 21 Jan 2010 00:15:02 +0000 (19:15 -0500)]
Fix not-yet-loaded bug in SavedSettingsObject._get_saved_settings()

The earlier implementation only copied in the currently loaded
properties and the required ones.  The new implementation copies
in _all_ the non-default properties.

14 years agoImprove `be import-xml` handling of root comments + tests.
W. Trevor King [Thu, 21 Jan 2010 00:13:44 +0000 (19:13 -0500)]
Improve `be import-xml` handling of root comments + tests.

14 years agoFix BugDir._uuid_cache management for new_bug()/remove_bug().
W. Trevor King [Wed, 20 Jan 2010 21:25:18 +0000 (16:25 -0500)]
Fix BugDir._uuid_cache management for new_bug()/remove_bug().

Initial implementation in wking@drexel.edu-20100120192451-j206hn1s78u9a3ys
missed them.

14 years agoStrip footers (signatures) in be-mail-to-xml
W. Trevor King [Wed, 20 Jan 2010 20:44:39 +0000 (15:44 -0500)]
Strip footers (signatures) in be-mail-to-xml

14 years ago'be-mbox-to-xml' -> 'be-mail-to-xml' + support for several formats.
W. Trevor King [Wed, 20 Jan 2010 20:22:28 +0000 (15:22 -0500)]
'be-mbox-to-xml' -> 'be-mail-to-xml' + support for several formats.

14 years agoOptimized BugDir.uuids, caching on-disk bug uuids.
W. Trevor King [Wed, 20 Jan 2010 19:24:51 +0000 (14:24 -0500)]
Optimized BugDir.uuids, caching on-disk bug uuids.

Output of
  python -m cProfile -o profile be list
  python -c "import pstats; p=pstats.Stats('profile'); p.sort_stats('cumulative').print_stats()"
on my slow netbook before optimization:
   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
    10290    0.417    0.000   10.832    0.001 libbe/bugdir.py:237(uuids)
after optimization:
      105    0.063    0.001    0.250    0.002 libbe/bugdir.py:237(uuids)
The old generator produced many more calls than the new
implementation, but the number of calls was not the source of the
slowdown (data not shown ;).

14 years agoAdd entry points for functionality needed by CFBE (and probably other UIs)
W. Trevor King [Wed, 20 Jan 2010 17:28:26 +0000 (12:28 -0500)]
Add entry points for functionality needed by CFBE (and probably other UIs)

14 years agoAdjust to modern mercurial version definition.
W. Trevor King [Wed, 20 Jan 2010 14:27:16 +0000 (09:27 -0500)]
Adjust to modern mercurial version definition.

  hg-stable$ hg log --patch mercurial/util.py
  ...
  changeset:   7640:9626819b2e3d
  user:        Matt Mackall <mpm@selenic.com>
  date:        Sat Jan 10 18:02:38 2009 -0600
  summary:     refactor version code

  diff --git a/mercurial/util.py b/mercurial/util.py
  --- a/mercurial/util.py
  +++ b/mercurial/util.py
  @@ -142,6 +142,14 @@
       """Find the length in characters of a local string"""
       return len(s.decode(_encoding, "replace"))

  +def version():
  +    """Return version information if available."""
  +    try:
  +        import __version__
  +        return __version__.version
  +    except ImportError:
  +        return 'unknown'
  +
   # used by parsedate
  ...
  hg-stable$ hg tags
  ...
  1.2                             7823:11efa41037e2
  1.1.2                           7497:11a4eb81fb4f
  ...

14 years agoFix _u_rel_path problems in VCS._children
W. Trevor King [Wed, 20 Jan 2010 14:06:58 +0000 (09:06 -0500)]
Fix _u_rel_path problems in VCS._children

14 years agoFixed `be help` (used to raise NotImplementedError)
W. Trevor King [Wed, 20 Jan 2010 12:32:56 +0000 (07:32 -0500)]
Fixed `be help` (used to raise NotImplementedError)

14 years agoAdd better help message on COMMAND-less be call
W. Trevor King [Wed, 20 Jan 2010 12:19:56 +0000 (07:19 -0500)]
Add better help message on COMMAND-less be call

14 years agoAdded shortname (.id.user()) data to `be html`s comment data
W. Trevor King [Tue, 19 Jan 2010 15:46:41 +0000 (10:46 -0500)]
Added shortname (.id.user()) data to `be html`s comment data

14 years agoAllow forward slashes (/) in commit email tags in be-handle-mail.
W. Trevor King [Tue, 19 Jan 2010 15:37:31 +0000 (10:37 -0500)]
Allow forward slashes (/) in commit email tags in be-handle-mail.

Also move unitsuite definition to the end of the file so it picks up
GenerateGlobalTagsTestCase.

14 years agoFixed libbe.utuil->libbe.util typo in be-handle-mail.
W. Trevor King [Tue, 19 Jan 2010 15:09:12 +0000 (10:09 -0500)]
Fixed libbe.utuil->libbe.util typo in be-handle-mail.

Also removed some references to the old XML interface.

14 years agoUse relative paths *._vcs_* methods.
W. Trevor King [Tue, 19 Jan 2010 14:43:37 +0000 (09:43 -0500)]
Use relative paths *._vcs_* methods.

14 years agoMerged be.faster-diff branch, fixing #bea/ed5#.
W. Trevor King [Tue, 19 Jan 2010 14:10:25 +0000 (09:10 -0500)]
Merged be.faster-diff branch, fixing #bea/ed5#.

14 years agoMarked #bea/ed5# as fixed
W. Trevor King [Tue, 19 Jan 2010 14:09:42 +0000 (09:09 -0500)]
Marked #bea/ed5# as fixed

14 years agoAdjust command.serve.Serve doctest to clarify remaining test failures.
W. Trevor King [Tue, 19 Jan 2010 14:04:09 +0000 (09:04 -0500)]
Adjust command.serve.Serve doctest to clarify remaining test failures.

Current test output
  $ python test.py libbe
  ...
  FAILED (failures=1, errors=3)

All failures and errors due to unimplemented functionality

Errors:
  * Darcs._vcs_isdir() not implemented (for Darcs <= 2.3.1)
  * Arch._vcs_path() not implemented
  * Arch._vcs_changed() not implemented

Failures:
  * command.serve.Serve tests not implemented

14 years agoBetter error messages in VCS._get
W. Trevor King [Tue, 19 Jan 2010 14:02:45 +0000 (09:02 -0500)]
Better error messages in VCS._get

14 years agoWork around the extra output of `tla file-find` to get path.
W. Trevor King [Tue, 19 Jan 2010 13:59:18 +0000 (08:59 -0500)]
Work around the extra output of `tla file-find` to get path.

Example output:
  * build pristine tree for ...--patch-1
  * from import revision: ...--base-0
  * patching for revision: ...--patch-1
  ./{arch}/++pristine-trees/...--patch-1/./.be/unlikely id

14 years agoGenerate string properly in libbe.util.subproc.CommandError
W. Trevor King [Tue, 19 Jan 2010 13:48:33 +0000 (08:48 -0500)]
Generate string properly in libbe.util.subproc.CommandError

14 years agoWork around Mercurial issue618 in Arch backend.
W. Trevor King [Tue, 19 Jan 2010 13:45:04 +0000 (08:45 -0500)]
Work around Mercurial issue618 in Arch backend.

Also add some NotImplementedErrors for clearer diagnostics.

14 years agoAdded changed() support for Darcs
W. Trevor King [Mon, 18 Jan 2010 21:35:33 +0000 (16:35 -0500)]
Added changed() support for Darcs

14 years agoFix modified ID reference in libbe.diff.Diff._changed_bugs
W. Trevor King [Mon, 18 Jan 2010 19:28:10 +0000 (14:28 -0500)]
Fix modified ID reference in libbe.diff.Diff._changed_bugs

14 years agoAdd .changed support to HTTP storage backend.
W. Trevor King [Mon, 18 Jan 2010 19:22:11 +0000 (14:22 -0500)]
Add .changed support to HTTP storage backend.

Also work around urlparse.parse_qs location in Python <= 2.5.

14 years agoAdd ancestors support to HTTP storage
W. Trevor King [Mon, 18 Jan 2010 19:05:59 +0000 (14:05 -0500)]
Add ancestors support to HTTP storage

14 years agoAdd .changed() support to Hg
W. Trevor King [Mon, 18 Jan 2010 18:12:46 +0000 (13:12 -0500)]
Add .changed() support to Hg

14 years agoFix VCS doctest for +revision InvalidID error message
W. Trevor King [Mon, 18 Jan 2010 17:46:56 +0000 (12:46 -0500)]
Fix VCS doctest for +revision InvalidID error message

14 years agoAdd class name to StorageTestCase failure reporting
W. Trevor King [Mon, 18 Jan 2010 17:46:08 +0000 (12:46 -0500)]
Add class name to StorageTestCase failure reporting

14 years agoUse RevisionedBugDir, not .duplicate_bugdir() in libbe.command.diff
W. Trevor King [Mon, 18 Jan 2010 17:29:09 +0000 (12:29 -0500)]
Use RevisionedBugDir, not .duplicate_bugdir() in libbe.command.diff

14 years agoOptimized libbe.diff.Diff._changed when old bugdir is a RevisionedBugDir
W. Trevor King [Mon, 18 Jan 2010 17:27:16 +0000 (12:27 -0500)]
Optimized libbe.diff.Diff._changed when old bugdir is a RevisionedBugDir

14 years agoAdded VCS._u_find_id_from_manifest for faster id->path calculation
W. Trevor King [Mon, 18 Jan 2010 17:25:17 +0000 (12:25 -0500)]
Added VCS._u_find_id_from_manifest for faster id->path calculation

14 years agoAdjust VCSTestCase method docstrings for unittest.
W. Trevor King [Mon, 18 Jan 2010 15:12:25 +0000 (10:12 -0500)]
Adjust VCSTestCase method docstrings for unittest.

14 years agoAdded VCS._ancestors
W. Trevor King [Mon, 18 Jan 2010 15:10:30 +0000 (10:10 -0500)]
Added VCS._ancestors

14 years agoAdded Storage.ancestors
W. Trevor King [Mon, 18 Jan 2010 15:00:31 +0000 (10:00 -0500)]
Added Storage.ancestors

14 years agoMoved BugDir.duplicate_bugdir to RevisionedBugDir class
W. Trevor King [Mon, 18 Jan 2010 14:28:16 +0000 (09:28 -0500)]
Moved BugDir.duplicate_bugdir to RevisionedBugDir class