be.git
12 years agodoc:install: we only use CherryPy for HTTPS.
W. Trevor King [Thu, 30 Aug 2012 03:57:57 +0000 (23:57 -0400)]
doc:install: we only use CherryPy for HTTPS.

We use wsgiref.simple_server for HTTP.

12 years agodoc:tutorial: document `be serve-storage`.
W. Trevor King [Thu, 30 Aug 2012 03:57:05 +0000 (23:57 -0400)]
doc:tutorial: document `be serve-storage`.

12 years agocommand:serve-storage: rename `be serve` -> `be serve-storage`.
W. Trevor King [Thu, 30 Aug 2012 03:55:37 +0000 (23:55 -0400)]
command:serve-storage: rename `be serve` -> `be serve-storage`.

This will help avoid confusion between

  be serve-storage

and

  be serve-commands

12 years agoRewrite commands to use bugdirs instead of a single bugdir.
W. Trevor King [Thu, 30 Aug 2012 03:26:17 +0000 (23:26 -0400)]
Rewrite commands to use bugdirs instead of a single bugdir.

The bulk of the work is in regard to XML, with new BugDir.xml and
.from_xml methods to support the new <bugdir> entity.  I also split
the guts import_xml's ._run method into sub-methods to make the import
logic more obvious.

12 years agoutil:wsgi: add BEExceptionApp for translating storage exceptions.
W. Trevor King [Wed, 29 Aug 2012 20:24:03 +0000 (16:24 -0400)]
util:wsgi: add BEExceptionApp for translating storage exceptions.

This fixes .test_get_initial_value for the HTTP backend, because the
tests use TestingHTTP.getURL, which only catch HandlerError, not the
more specific storage exceptions.

12 years agobugdir: add `update` argument to BugDir.append().
W. Trevor King [Wed, 29 Aug 2012 18:54:33 +0000 (14:54 -0400)]
bugdir: add `update` argument to BugDir.append().

This avoids a deepcopy error where the BugDir tries to update before
the Bug has had it's uuid assigned:

  Traceback (most recent call last):
    ...
    File ".../libbe/command/merge.py", line 168, in _run
      newCommTree = copy.deepcopy(bugB.comment_root)
    File "/usr/lib64/python2.7/copy.py", line 190, in deepcopy
      y = _reconstruct(x, rv, 1, memo)
    ...
    File "/usr/lib64/python2.7/copy.py", line 352, in _reconstruct
      y.append(item)
    File ".../libbe/bugdir.py", line 263, in append
      self._bug_map_gen()
    File ".../libbe/bugdir.py", line 152, in _bug_map_gen
      map[bug.uuid] = bug
  AttributeError: 'Bug' object has no attribute 'uuid'

12 years agobugdir: add BugDir.xml(), .from_xml(), and .append().
W. Trevor King [Wed, 29 Aug 2012 17:24:50 +0000 (13:24 -0400)]
bugdir: add BugDir.xml(), .from_xml(), and .append().

12 years agobug: fix invalid root element comment -> bug in Bug.from_xml().
W. Trevor King [Wed, 29 Aug 2012 15:56:17 +0000 (11:56 -0400)]
bug: fix invalid root element comment -> bug in Bug.from_xml().

12 years agobug: fix leading comment indentation in Bug.xml().
W. Trevor King [Wed, 29 Aug 2012 14:00:00 +0000 (10:00 -0400)]
bug: fix leading comment indentation in Bug.xml().

12 years agobug: add doctest for Bug.xml().
W. Trevor King [Wed, 29 Aug 2012 13:44:37 +0000 (09:44 -0400)]
bug: add doctest for Bug.xml().

12 years agoAllow symlinks in bugdir directories.
W. Trevor King [Tue, 28 Aug 2012 18:48:19 +0000 (14:48 -0400)]
Allow symlinks in bugdir directories.

This allows you to do things like:

  $ mkdir -p /tmp/joint-repo/.be
  $ cd /tml/joint-repo/.be
  $ ln -s ~/src/be/.be/version
  $ ln -s ~/src/be/.be/bea86499-824e-4e77-b085-2d581fa9ccab/
  $ ln -s ~/src/BEurtle/.be/7017b289-f207-4e39-9746-f58323404eba/
  $ be list

without crashing with a:

  Traceback (most recent call last):
    File ".../libbe/storage/base.py", line 316, in children
      return self._children(*args, **kwargs)
    File ".../libbe/storage/vcs/base.py", line 820, in _children
      path = self.path(id, revision, relpath=False)
    File ".../libbe/storage/vcs/base.py", line 721, in path
      path = self._cached_path_id.path(id)
    File ".../libbe/storage/vcs/base.py", line 280, in path
      raise InvalidID(uuid)
  libbe.storage.base.InvalidID: 7017b289-f207-4e39-9746-f58323404eba in revision None

Currently it only lists the first bug directory it comes across, but
after this patch, it doesn't crash ;).

12 years agoutil:plugin: modnames() should only list *.py or *.pyc files.
W. Trevor King [Tue, 28 Aug 2012 00:52:52 +0000 (20:52 -0400)]
util:plugin: modnames() should only list *.py or *.pyc files.

By appending '.py' to *everything*, it was listing '__pycache__' for
Python 3.

12 years agogitignore: ignore autogenerated dist/.
W. Trevor King [Mon, 27 Aug 2012 18:05:35 +0000 (14:05 -0400)]
gitignore: ignore autogenerated dist/.

12 years agogitignore: ignore autogenerated doc/libbe/.
W. Trevor King [Mon, 27 Aug 2012 18:04:49 +0000 (14:04 -0400)]
gitignore: ignore autogenerated doc/libbe/.

12 years agolibbe:util:wsgi: extract WSGI utilities into a separate module.
W. Trevor King [Mon, 27 Aug 2012 17:37:58 +0000 (13:37 -0400)]
libbe:util:wsgi: extract WSGI utilities into a separate module.

12 years agoConvert my subscription email to tremily.
W. Trevor King [Sun, 26 Aug 2012 23:18:53 +0000 (19:18 -0400)]
Convert my subscription email to tremily.

12 years agocommand:serve_commands: remove duplicate cruft and get working unit tests.
W. Trevor King [Fri, 24 Aug 2012 14:13:45 +0000 (10:13 -0400)]
command:serve_commands: remove duplicate cruft and get working unit tests.

12 years agocommand:serve: add ability to pass raw POST data with getURL.
W. Trevor King [Fri, 24 Aug 2012 14:08:33 +0000 (10:08 -0400)]
command:serve: add ability to pass raw POST data with getURL.

This is analagous to the earlier change to get_post_url:

  commit 0cd072b9710ee964e6f449abd9265d85e02f34d2
  Author: W. Trevor King <wking@tremily.us>
  Date:   Fri Aug 24 09:29:58 2012 -0400

    util:http: add ability to pass raw POST data with get_post_url.

12 years agocommand:serve_commands: new command for running a command server.
W. Trevor King [Fri, 24 Aug 2012 13:40:37 +0000 (09:40 -0400)]
command:serve_commands: new command for running a command server.

This is an initial step towards improving BE's efficiency.

Previously, BE gets slow as the bug count increases for several
commands (e.g. `be list`), because it takes time to load the bugdir
information from disk at each invocation.  If you use a remote repo
(`be --repo http://localhost:8000/ list`), the server process may have
already loaded the repo from disk, but now your listing process has to
fetch everything over the wire.  This is even worse than loading it
from disk.

With the new `be serve-commands` and `be --server URL ...` pair, the
bugdir loading happens once on the server, and all the processing is
also carried out on the server.  This means that calls like `be
--server http://localhost:8000/ list` will scale much better than
other methods.  For example:

  $ time be --server http://localhost:8000/ list > /dev/null

  real    0m2.234s
  user    0m0.548s
  sys     0m0.114s
  $ time be --server http://localhost:8000/ list > /dev/null

  real    0m0.730s
  user    0m0.548s
  sys     0m0.112s
  $ time be list > /dev/null

  real    0m2.453s
  user    0m2.289s
  sys     0m0.166s
  $ time be list > /dev/null

  real    0m2.521s
  user    0m2.350s
  sys     0m0.172s

The first call to a cold server takes about the same time as a local
call, because you need to load the bugs from the filesystem.  However,
later calls to a warm server are 3x faster, while later local calls
are still slow.

This is currently a minimal working implementation.  There's a good
deal of code in libbe.command.serve that I'd like to abstract out into
a libbe.util library (since there's still a bunch of duplication
between libbe.command.serve and libbe.command.serve_commands).  The
remote calls are also not as fast as I'd like, likely due to library
load times.  This commit just locks in an initial working
implementation.

12 years agocommand:base: only cleanup UseInterface.storage_callback if it's there.
W. Trevor King [Fri, 24 Aug 2012 13:38:13 +0000 (09:38 -0400)]
command:base: only cleanup UseInterface.storage_callback if it's there.

It's hard to see why it wouldn't be, but .setup_command handles the
case where it's missing, so we should be consistent here.

12 years agocommand:base: use is/is-not None instead of ==/!= None in setup_command.
W. Trevor King [Fri, 24 Aug 2012 13:35:40 +0000 (09:35 -0400)]
command:base: use is/is-not None instead of ==/!= None in setup_command.

More Pythonic.

12 years agocommand:serve: wrap server in ExceptionApp regardless of SSL.
W. Trevor King [Fri, 24 Aug 2012 13:33:14 +0000 (09:33 -0400)]
command:serve: wrap server in ExceptionApp regardless of SSL.

Previously, only the SSL server was using ExceptionApp.

12 years agoutil:http: add ability to pass raw POST data with get_post_url.
W. Trevor King [Fri, 24 Aug 2012 13:29:58 +0000 (09:29 -0400)]
util:http: add ability to pass raw POST data with get_post_url.

12 years agoutil:http: convert urllib2.URLError into HTTPError in get_post_url.
W. Trevor King [Fri, 24 Aug 2012 12:07:46 +0000 (08:07 -0400)]
util:http: convert urllib2.URLError into HTTPError in get_post_url.

Also rework liburl2.HTTPError handling to get both the reason and the
error code into the HTTPError message.

12 years agoutil:http: pull HTTP helpers from libbe.storage.http into their own module.
W. Trevor King [Fri, 24 Aug 2012 11:55:48 +0000 (07:55 -0400)]
util:http: pull HTTP helpers from libbe.storage.http into their own module.

This way they can be shared with the upcoming Command._run_remote.

12 years agostorage:http: use an explicit relative import for base.
W. Trevor King [Fri, 24 Aug 2012 11:36:20 +0000 (07:36 -0400)]
storage:http: use an explicit relative import for base.

12 years agostorage:http: adjust HTTPError message in get_post_url.
W. Trevor King [Fri, 24 Aug 2012 11:24:31 +0000 (07:24 -0400)]
storage:http: adjust HTTPError message in get_post_url.

We'll usually get this message if we fail to reach the server, but we
can also get it if the server is so broken that it dies without
returning a valid HTTP response.

12 years agostorage:http: add agent argument to get_post_url.
W. Trevor King [Fri, 24 Aug 2012 11:22:39 +0000 (07:22 -0400)]
storage:http: add agent argument to get_post_url.

This allows us to set an appropriate user agent if we use this
function in other places (e.g. upcoming Command._run_remote).

12 years agocommand:serve: add SilentRequestHandler to avoid double-logging requests.
W. Trevor King [Thu, 23 Aug 2012 21:26:36 +0000 (17:26 -0400)]
command:serve: add SilentRequestHandler to avoid double-logging requests.

They were being logged by the request handler, and then logged again
by WSGI_Object.log_request.  After this patch, requests are only
logged when logger.level is at a <= level (e.g. closer to DEBUG)
than the WSGI_Object.log_level (usually INFO).  For example, in
Serve_setup_logging,

  self.logger.setLevel(logging.INFO)

will get request logs printed, but

  self.logger.setLevel(logging.WARNING)

will not.

12 years agolibbe:util:plugin: cleanup recent zip/egg handling code.
W. Trevor King [Thu, 23 Aug 2012 17:35:58 +0000 (13:35 -0400)]
libbe:util:plugin: cleanup recent zip/egg handling code.

To test this, you'll need to build an egg.  You can use setuptools to
do this, by applying:

<snip-patch>

12 years agoCherrypick improved zipfile support from Niall Douglas.
Niall Douglas (a [underscors] sourceforge {at} nedprod [dot] com) [Wed, 22 Feb 2012 17:46:06 +0000 (17:46 +0000)]
Cherrypick improved zipfile support from Niall Douglas.

WTK: This is the meat of Niall's

  commit 4632cb6d22faa7220540f92af67693084f80f033
  Author: Niall Douglas ...
  Date:   Wed Feb 22 17:46:06 2012 +0000

    Fixed small bug where running from inside zip support was over
    preferring .pyc files

12 years agoCherrypick initial zipfile support from Niall Douglas.
Niall Douglas (a [underscors] sourceforge {at} nedprod [dot] com) [Fri, 24 Feb 2012 19:35:04 +0000 (14:35 -0500)]
Cherrypick initial zipfile support from Niall Douglas.

WTK: This is a portion of Niall's

  commit 7f7a7738bcbcfd06a026f2985c1823a4ba5eb55b
  Author: Niall Douglas ...
  Date:   Tue Feb 21 20:35:28 2012 +0000

    Several hacks to make BE compatible with bbfreeze and therefore
    compilable into a self contained directory

12 years agostorage:vcs:hg: remove grandchildren from Hg._vcs_listdir.
W. Trevor King [Thu, 23 Aug 2012 14:38:14 +0000 (10:38 -0400)]
storage:vcs:hg: remove grandchildren from Hg._vcs_listdir.

This fixes:

  From: Phil Schumm
  Date: Thu, 23 Aug 2012 08:15:21 -0500
  Subject: [Be-devel] -be diff- under Hg

  ...
  I've just noticed that -be diff- seems to yield different output
  under Git than it does under Hg (e.g., in a Mercurial +repository,
  -be diff- appears to show all changes as new bugs rather than
  modified).
  ...

12 years agostorage:base: add tests to catch grandchildren in .children() output.
W. Trevor King [Thu, 23 Aug 2012 14:35:43 +0000 (10:35 -0400)]
storage:base: add tests to catch grandchildren in .children() output.

With a tree like:

  a
  `-- b
      `-- c

children(a) should return [b], not [b, c] or [c].  This catches a bug
in the Mercurial backend.  Fix to follow.

12 years agostorage:vcs:hg: fix missformed file_a -> file_b message typo.
W. Trevor King [Thu, 23 Aug 2012 13:46:22 +0000 (09:46 -0400)]
storage:vcs:hg: fix missformed file_a -> file_b message typo.

12 years agoUpdate CherryPy dependency package to python-cherrypy3 on Debian.
W. Trevor King [Thu, 10 May 2012 12:56:02 +0000 (08:56 -0400)]
Update CherryPy dependency package to python-cherrypy3 on Debian.

Thanks to Tim Mazid for reporting the bug, and Israel Basurto for
suggesting the fix.

On Wed, May 09, 2012 at 07:26:14PM +1000, Tim Mazid wrote:
> $ interfaces/web/cfbe.py ~/projects/proj/
> Bugs Everywhere Directory v1.4
> Traceback (most recent call last):
>   File "interfaces/web/cfbe.py", line 42, in <module>
>     cherrypy.quickstart(WebInterface, '/', app_config)
> AttributeError: 'module' object has no attribute 'quickstart'
>
> This is with the latest be from git, and python-cherrypy 2.3.0-3 from
> Debian wheezy.

12 years agoFix deb-python -> dev-python typo in doc/install.txt.
W. Trevor King [Fri, 27 Apr 2012 00:08:47 +0000 (20:08 -0400)]
Fix deb-python -> dev-python typo in doc/install.txt.

12 years agoChange my email address from drexel.edu to tremily.us.
W. Trevor King [Wed, 18 Apr 2012 16:59:19 +0000 (12:59 -0400)]
Change my email address from drexel.edu to tremily.us.

12 years agoNormalize whitespace in interfaces/web/webpy.
W. Trevor King [Sun, 25 Mar 2012 15:43:33 +0000 (11:43 -0400)]
Normalize whitespace in interfaces/web/webpy.

12 years agoNormalize whitespace in interfaces/web/templates/base.html.
W. Trevor King [Sun, 25 Mar 2012 15:40:04 +0000 (11:40 -0400)]
Normalize whitespace in interfaces/web/templates/base.html.

12 years agoAdd tag filter on the web interface
Israel Basurto [Sat, 24 Mar 2012 12:22:11 +0000 (13:22 +0100)]
Add tag filter on the web interface

12 years agoApply Niall's earlier fix for comment XML loading to bug XML loading.
W. Trevor King [Sat, 3 Mar 2012 16:22:08 +0000 (11:22 -0500)]
Apply Niall's earlier fix for comment XML loading to bug XML loading.

Sometimes saxutils returns unicode.

12 years agoMake ID expansion less strict for comment text.
W. Trevor King [Sat, 3 Mar 2012 16:19:43 +0000 (11:19 -0500)]
Make ID expansion less strict for comment text.

This avoids errors if the comment text references a repository that
you don't have locally.

12 years agoFix `be import_xml` bugs.
Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) [Sat, 3 Mar 2012 15:59:43 +0000 (10:59 -0500)]
Fix `be import_xml` bugs.

12 years agoMake the full UUIDs optional for `new` and `comment`.
W. Trevor King [Sat, 3 Mar 2012 15:49:03 +0000 (10:49 -0500)]
Make the full UUIDs optional for `new` and `comment`.

This makes the default output less threatening for new users, while
still supplying the full UUIDs for driving BE from external software.

12 years agoPrint full UUIDs during `new` and `comment`.
Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) [Fri, 2 Mar 2012 12:28:34 +0000 (07:28 -0500)]
Print full UUIDs during `new` and `comment`.

12 years agoAdded BE_INPUT_ENCODING and BE_OUTPUT_ENCODING to allow charset for stdin and stdout...
Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) [Mon, 20 Feb 2012 15:34:59 +0000 (15:34 +0000)]
Added BE_INPUT_ENCODING and BE_OUTPUT_ENCODING to allow charset for stdin and stdout to be overridden. This is necessary on Windows as there is no way for external programs to set stdin or stdout charsets :(

12 years agoOops, forgot to bump the version and date when tweaking the man page.
W. Trevor King [Sat, 25 Feb 2012 21:12:26 +0000 (16:12 -0500)]
Oops, forgot to bump the version and date when tweaking the man page.

12 years agoUse a bare URL for the link from the man page to online docs.
W. Trevor King [Sat, 25 Feb 2012 21:08:30 +0000 (16:08 -0500)]
Use a bare URL for the link from the man page to online docs.

This will make it easier (possible?) for people using the roff version
of the man page to follow the link.

12 years agoUse $ instead of % for the prompt in the man page bug submission example.
W. Trevor King [Sat, 25 Feb 2012 21:04:51 +0000 (16:04 -0500)]
Use $ instead of % for the prompt in the man page bug submission example.

12 years agoI changed my mind and fixed #/03d07e61#.
W. Trevor King [Sat, 25 Feb 2012 20:47:58 +0000 (15:47 -0500)]
I changed my mind and fixed #/03d07e61#.

12 years agoKeep stdin (file descriptor 0) open in the pager's child process.
W. Trevor King [Sat, 25 Feb 2012 20:05:04 +0000 (15:05 -0500)]
Keep stdin (file descriptor 0) open in the pager's child process.

This fixes the underlying problem that we worked around in commit
2c9ae15f53aef57d28091b237c193c653c6e80dd.  Now even

  $ echo 'some bug | be --paginate new -

will work instead of raising IOError: [Errno 9] Bad file descriptor.

12 years agoAdd `new` to list of commands that should not default to using the pager.
W. Trevor King [Sat, 25 Feb 2012 17:53:17 +0000 (12:53 -0500)]
Add `new` to list of commands that should not default to using the pager.

If the command is run in the pager, access to stdin is tricky, so I
avoid it by default.  I'd just missed the fact that `new -` used
stdin, which caused

  https://bugzilla.redhat.com/show_bug.cgi?id=751473

  $ be new -
  Traceback (most recent call last):
    ...
    File "/usr/lib/python2.7/site-packages/libbe/command/new.py", line 89, in _run
      summary = self.stdin.readline()
    ...
    File "/usr/lib64/python2.7/codecs.py", line 473, in read
      newdata = self.stream.read(size)
  IOError: [Errno 9] Bad file descriptor

12 years agoHide the traceback on InvalidURL errors.
W. Trevor King [Sat, 25 Feb 2012 17:04:01 +0000 (12:04 -0500)]
Hide the traceback on InvalidURL errors.

In response to

  https://bugzilla.redhat.com/show_bug.cgi?id=733945

in which Neal Becker was bummed at the long traceback, which may
initially look like a programming issue.

12 years agoRemove util.subproc.Pipe, as we no longer use it in BE.
W. Trevor King [Sat, 25 Feb 2012 16:16:01 +0000 (11:16 -0500)]
Remove util.subproc.Pipe, as we no longer use it in BE.

This was at one point used by `update_copyright.py`.  Now that that is
an external package (and doesn't use `Pipe` anymore either), we can
safely remove this code.

As a side benifit, the Pipe doctests will no longer be there to fail
on OS X and other systems sufficiently different from my development
box.

12 years agoAdd CherryPy dependency and minimal install info to doc/install.txt.
W. Trevor King [Sat, 25 Feb 2012 15:43:09 +0000 (10:43 -0500)]
Add CherryPy dependency and minimal install info to doc/install.txt.

I seem to have left CherryPy out of the earlier list.

The extra handholding for minimal installations is an attempt to
address problems people have had installing BE on non-Linux systems,
where the standard build tools are less common.

I also mention my Gentoo overlay and Michel Alexandre Salim's Fedora
package, so people running Gentoo and Fedora don't have to bother
figuring any of this out ;).

Finally, I moved the package information up to the top of the install
page, so people on supported systems realize they have an easy out
before reading through the install procedure.

12 years agoCherrypick a better version string for setup.py from Niall Douglas.
Niall Douglas (a [underscors] sourceforge {at} nedprod [dot] com) [Fri, 24 Feb 2012 19:35:04 +0000 (14:35 -0500)]
Cherrypick a better version string for setup.py from Niall Douglas.

WTK: This is a small part of Niall's

  commit 7f7a7738bcbcfd06a026f2985c1823a4ba5eb55b
  Author: Niall Douglas ...
  Date:   Tue Feb 21 20:35:28 2012 +0000

    Several hacks to make BE compatible with bbfreeze and therefore
    compilable into a self contained directory

I cleaned up his string construction, which was originally

  version.version()+" ("+rev_date+")"

12 years agoAvoid generating another StringIO instance in StringInputOutput.get_stdout().
W. Trevor King [Fri, 24 Feb 2012 19:25:21 +0000 (14:25 -0500)]
Avoid generating another StringIO instance in StringInputOutput.get_stdout().

12 years agoShuffle doc/conf.py to get the Git revision into the Sphinx documentation.
W. Trevor King [Fri, 17 Feb 2012 20:02:57 +0000 (15:02 -0500)]
Shuffle doc/conf.py to get the Git revision into the Sphinx documentation.

12 years agoUpdate update-copyright to version 0.3.
W. Trevor King [Thu, 16 Feb 2012 22:05:19 +0000 (17:05 -0500)]
Update update-copyright to version 0.3.

12 years agoAdd update-copyright as a submodule and update release.py accordingly.
W. Trevor King [Thu, 16 Feb 2012 21:15:24 +0000 (16:15 -0500)]
Add update-copyright as a submodule and update release.py accordingly.

Also add `**kwargs` to `invoke` so we can specify the environment.

12 years agoFix release.py to allow uncommented initial _VERSION.
W. Trevor King [Thu, 16 Feb 2012 16:57:31 +0000 (11:57 -0500)]
Fix release.py to allow uncommented initial _VERSION.

I was in favor of always leaving _VERSION commented in the trunk,
since released branches should fork off the trunk:

  trunkA -> trunkB -> trunkC -> trunkD
   `-> 1.0.0           `-> 1.1.0
        `-> 1.0.1           `-> 1.1.1

But that doesn't seem to have been how things have worked out in BE.
In any case, you will need to release on top of a previous release
(e.g. 1.0.1 on top of 1.0.0 in my above example), so we cannot depend
on an initial comment character before _VERSION.

12 years agoModify release.py for external update-copyright.py.
W. Trevor King [Thu, 16 Feb 2012 16:50:23 +0000 (11:50 -0500)]
Modify release.py for external update-copyright.py.

12 years agoRan update-copyright.py.
W. Trevor King [Thu, 16 Feb 2012 16:45:25 +0000 (11:45 -0500)]
Ran update-copyright.py.

12 years agoTransition to my external update-copyright package.
W. Trevor King [Thu, 16 Feb 2012 16:44:27 +0000 (11:44 -0500)]
Transition to my external update-copyright package.

http://pypi.python.org/pypi/update-copyright/

12 years agoAdd .mailmap, mapping Git committers and authors to canonical names.
W. Trevor King [Thu, 16 Feb 2012 16:41:55 +0000 (11:41 -0500)]
Add .mailmap, mapping Git committers and authors to canonical names.

12 years agoGenerated libbe/_version.py was not UTF-8 aware.
Matěj Cepl [Mon, 2 Jan 2012 20:57:56 +0000 (15:57 -0500)]
Generated libbe/_version.py was not UTF-8 aware.

So make failed for me (Matěj Cepl).

Signed-off-by: Matěj Cepl <mcepl@redhat.com>
12 years agoFix .gitignore
Matěj Cepl [Mon, 2 Jan 2012 15:14:35 +0000 (16:14 +0100)]
Fix .gitignore

Per gitignore(5) it seems to me that directories in the root of the
repository should be ignored without leading ./ files. E.g.

build/

is correct for ignoring build/ directory and its content.

Signed-off-by: Matěj Cepl <mcepl@redhat.com>
12 years agoMerge http://www.physics.drexel.edu/~wking/code/git/be
Chris Ball [Mon, 2 Jan 2012 20:43:30 +0000 (15:43 -0500)]
Merge www.physics.drexel.edu/~wking/code/git/be

12 years agoFix up broken merge commit.
Chris Ball [Mon, 2 Jan 2012 20:43:13 +0000 (15:43 -0500)]
Fix up broken merge commit.

13 years agoFix my busted 1512c0e2a64e patch to libbe/util/encoding.py.
W. Trevor King [Mon, 14 Nov 2011 02:06:43 +0000 (21:06 -0500)]
Fix my busted 1512c0e2a64e patch to libbe/util/encoding.py.

Some temporary changes to encoding.py seem to have been added to
  commit 1512c0e2a64e19c8d4e5697257a4df5ddd8bc727
  Author: W. Trevor King <wking@drexel.edu>
  Date:   Tue Nov 8 07:14:43 2011 -0500
by accident.

The initial change came from discussions with Niall Douglas, during
which I realized that "filesystem encoding" ususally means the
encoding for the *path*, not the *contents*.  To avoid further
confusion I'd renamed `get_filesystem_encoding` to the less ambiguous
`get_text_file_encoding`.  This commit should complete the transition.

13 years agoRan update_copyright.py.
W. Trevor King [Wed, 9 Nov 2011 11:54:43 +0000 (06:54 -0500)]
Ran update_copyright.py.

13 years agoMention `~/.local/bin/` when using default `--user` install.
W. Trevor King [Tue, 8 Nov 2011 12:20:44 +0000 (07:20 -0500)]
Mention `~/.local/bin/` when using default `--user` install.

13 years agoCorrect doc/install.txt to refer to INSTALL_OPTIONS instead of PREFIX.
W. Trevor King [Tue, 8 Nov 2011 12:14:43 +0000 (07:14 -0500)]
Correct doc/install.txt to refer to INSTALL_OPTIONS instead of PREFIX.

This catches the docs up with the changes made in:
  commit a7ad89a6ad7da55089e6f9a4cdd645b7079ee04e
  Author: W. Trevor King <wking@drexel.edu>
  Date:   Sat Apr 16 21:26:02 2011 -0400

13 years agoAdd the BE_ENCODING environmental variable to override the default encoding.
W. Trevor King [Thu, 8 Sep 2011 20:10:02 +0000 (16:10 -0400)]
Add the BE_ENCODING environmental variable to override the default encoding.

13 years agoAdjust encoding detection (using sys.getfilesystemencoding for file contents).
W. Trevor King [Thu, 8 Sep 2011 20:03:09 +0000 (16:03 -0400)]
Adjust encoding detection (using sys.getfilesystemencoding for file contents).

13 years agoWon't fix #/03d07e61# (bad permission crash).
W. Trevor King [Thu, 8 Sep 2011 03:42:25 +0000 (23:42 -0400)]
Won't fix #/03d07e61# (bad permission crash).

13 years agoFixed #/bc1e6ff4# (extra argument crash).
W. Trevor King [Thu, 8 Sep 2011 03:24:18 +0000 (23:24 -0400)]
Fixed #/bc1e6ff4# (extra argument crash).

13 years agoOops, that forgot the equals part of Mercurial 1.9 or greater.
W. Trevor King [Thu, 8 Sep 2011 03:20:54 +0000 (23:20 -0400)]
Oops, that forgot the equals part of Mercurial 1.9 or greater.

13 years agoMerge remote branch 'tanguy/master'
W. Trevor King [Thu, 8 Sep 2011 03:15:25 +0000 (23:15 -0400)]
Merge remote branch 'tanguy/master'

13 years agoAdjust Mercurial execution so it works with version 1.9 and earlier.
W. Trevor King [Thu, 8 Sep 2011 02:54:00 +0000 (22:54 -0400)]
Adjust Mercurial execution so it works with version 1.9 and earlier.

This makes the changes for 1.9 brought in by
  bb645f8e489b9f50cd0aec7237ec9adb721797a8
optional.  If the Mercurial version is 1.9 or greater, the new code is
used.  Otherwise, the old code is used.

13 years agoMove Bzr.version_cmp to VCS.version_cmp.
W. Trevor King [Thu, 8 Sep 2011 02:47:14 +0000 (22:47 -0400)]
Move Bzr.version_cmp to VCS.version_cmp.

The version comparison code will be useful for all VCSs.

13 years agoMerge remote branch 'pschumms/master'
W. Trevor King [Thu, 8 Sep 2011 02:33:51 +0000 (22:33 -0400)]
Merge remote branch 'pschumms/master'

13 years agoAdd Jinja to the dependency documentation.
W. Trevor King [Thu, 8 Sep 2011 02:26:37 +0000 (22:26 -0400)]
Add Jinja to the dependency documentation.

13 years agoRemove redundant re import from previous bzr version_cmp patch.
W. Trevor King [Thu, 8 Sep 2011 02:09:00 +0000 (22:09 -0400)]
Remove redundant re import from previous bzr version_cmp patch.

13 years agoEnhance Bzr.version_cmp to handle non-numeric versions
Michel Alexandre Salim [Thu, 4 Aug 2011 15:50:32 +0000 (17:50 +0200)]
Enhance Bzr.version_cmp to handle non-numeric versions

bzr uses non-numeric tags to indicate prereleases; previously, this
triggers an exception in be's Bzr module as version comparison is only
supported between version strings that only contain numbers and dots.

This patch extends version_cmp to support a single non-numeric
pre-release string of arbitrary length (e.g. 'a', 'b', 'pre', 'rc'), and
extends the docstring tests to cover this extension.

Signed-off-by: Michel Alexandre Salim <salimma@fedoraproject.org>
13 years agoMinor fix to doctest for command.base.get_command(); failure introduced by change...
Phil Schumm [Sat, 30 Jul 2011 17:00:53 +0000 (12:00 -0500)]
Minor fix to doctest for command.base.get_command(); failure introduced by change to command.base.UnknownCommand in commit 0d5c9c68e947617c9d073d5f19351bdd8f3866db

13 years agoAdd ImportError to UnknownCommand output in get_command doctest.
W. Trevor King [Sat, 30 Jul 2011 15:46:27 +0000 (11:46 -0400)]
Add ImportError to UnknownCommand output in get_command doctest.

This catches the test result up after:

  Commit: 0d5c9c68e947617c9d073d5f19351bdd8f3866db
  Author: W. Trevor King <wking@drexel.edu>
  Date:   Wed May 25 10:30:19 2011 -0400

    Attach ImportError message to UnknownCommand to aid debugging.

13 years agobugseverywhere.org has changed URL handling, so use different URLs for HTTP testing.
W. Trevor King [Sat, 30 Jul 2011 15:43:30 +0000 (11:43 -0400)]
bugseverywhere.org has changed URL handling, so use different URLs for HTTP testing.

13 years agoFixed problem with Hg support under version 1.9 (mercurial.dispatch.dispatch() now...
Phil Schumm [Thu, 28 Jul 2011 12:42:11 +0000 (07:42 -0500)]
Fixed problem with Hg support under version 1.9 (mercurial.dispatch.dispatch() now takes a single request object with option for capturing output stream)

13 years agoReport bug: crash on permission problems
Tanguy LE CARROUR [Mon, 6 Jun 2011 18:48:57 +0000 (20:48 +0200)]
Report bug: crash on permission problems

13 years agoReport bug in arguments processing
Tanguy LE CARROUR [Mon, 6 Jun 2011 18:07:34 +0000 (20:07 +0200)]
Report bug in arguments processing

13 years agoRaise UserError if summary is not given to `be commit`.
W. Trevor King [Wed, 25 May 2011 14:39:51 +0000 (10:39 -0400)]
Raise UserError if summary is not given to `be commit`.

If the user doesn't provide the summary on the command line, through
stdin, or through editor_string, raise an error.  This will generally
happen with

  $ be commit
  (user doesn't enter any text in the editory)

13 years agoAttach ImportError message to UnknownCommand to aid debugging.
W. Trevor King [Wed, 25 May 2011 14:30:19 +0000 (10:30 -0400)]
Attach ImportError message to UnknownCommand to aid debugging.

13 years agoAdd 'Power features' page to the docs.
W. Trevor King [Wed, 25 May 2011 12:54:53 +0000 (08:54 -0400)]
Add 'Power features' page to the docs.

13 years agoRework summary handling in `be commit`.
W. Trevor King [Wed, 25 May 2011 12:37:03 +0000 (08:37 -0400)]
Rework summary handling in `be commit`.

Now you can run `be commit` with no options and have the summary split
off the body automatically.  This should be more familiar to most VCS
users.

13 years agoRun update_copyright.py.
W. Trevor King [Wed, 25 May 2011 10:52:09 +0000 (06:52 -0400)]
Run update_copyright.py.

13 years agoMove Tim Guirgies' help for status/severity overrides to .
W. Trevor King [Wed, 25 May 2011 10:46:26 +0000 (06:46 -0400)]
Move Tim Guirgies' help for status/severity overrides to .

13 years agoRemove "be set" reference in favour of actual help
Tim Guirgies [Tue, 24 May 2011 16:15:13 +0000 (02:15 +1000)]
Remove "be set" reference in favour of actual help

Because "be set severity blah" does not actually work, referring users
there to set custom severity levels is just cruel (I spent a half hour
trying to figure out what I was doing wrong). Thus, it is much easier
to, at least for now, state in the help message what they must do in
order to get custom severities and statuses.

13 years agoTeach be status --help to load per tree config
Tim Guirgies [Tue, 24 May 2011 16:15:12 +0000 (02:15 +1000)]
Teach be status --help to load per tree config

Again, there is discrepancy between severity.py and status.py. I thought
this feature was extremely useful in severity.py and it should be put
into status.py too.