be.git
14 years agoAdded doc/distributed_bugtracking with some simple use-case notes
W. Trevor King [Sun, 3 Jan 2010 16:06:48 +0000 (11:06 -0500)]
Added doc/distributed_bugtracking with some simple use-case notes

14 years agoAdd #bea/814# : Add Roundup-like flexibility
W. Trevor King [Sun, 3 Jan 2010 16:05:57 +0000 (11:05 -0500)]
Add #bea/814# : Add Roundup-like flexibility

14 years agoAdd #bea/ed5# : Slow and ugly diff implementation
W. Trevor King [Sun, 3 Jan 2010 16:04:50 +0000 (11:04 -0500)]
Add #bea/ed5# : Slow and ugly diff implementation

14 years agoMerged be.html-storage
W. Trevor King [Fri, 1 Jan 2010 21:54:30 +0000 (16:54 -0500)]
Merged be.html-storage

Added HTTP storage backend and server
Serve a local repo on http://localhost:8000
  be --repo REPO serve
Then connect from other be calls, for example
  be --repo http://localhost:8000 list

14 years agoUpdated NEWS
W. Trevor King [Fri, 1 Jan 2010 21:54:01 +0000 (16:54 -0500)]
Updated NEWS

14 years agoFixed update_copyright.py's subproc import and updated copyrights
W. Trevor King [Fri, 1 Jan 2010 21:51:13 +0000 (16:51 -0500)]
Fixed update_copyright.py's subproc import and updated copyrights

14 years agoServe.handle_*() now raise _HandlerError so the .do_*() methods know.
W. Trevor King [Fri, 1 Jan 2010 21:55:49 +0000 (16:55 -0500)]
Serve.handle_*() now raise _HandlerError so the .do_*() methods know.

Before there wasn't a good way to tell if the handler had experienced
an error, or just didn't want to return anything.

14 years agoFixed commit handling in commands.serve and storage.http
W. Trevor King [Fri, 1 Jan 2010 21:48:03 +0000 (16:48 -0500)]
Fixed commit handling in commands.serve and storage.http

14 years agoUse more kwargs in libbe.command.serve
W. Trevor King [Fri, 1 Jan 2010 21:33:39 +0000 (16:33 -0500)]
Use more kwargs in libbe.command.serve

kwargs make things easier to maintain.

Also make sure the .handle_*() methods return two items
  (content,ctype)
even when both are None.

14 years agoImproved POST and error handling in `be serve`
W. Trevor King [Fri, 1 Jan 2010 21:11:48 +0000 (16:11 -0500)]
Improved POST and error handling in `be serve`

POST handling:

Drop the cgi.FieldStorage() in favor of the old urlparse.parse_qs().
We need a dictionary, which FieldStorage is not.  However, I added
.read_post_data() since my old self.rfile.read() was hanging.  The
read_post_data() implementation comes from the
FieldStorage.__init__().

Error handling:

wrap .handle_*() blocks in try/except to handle Storage errors

14 years agoFixed some stupid typos in libbe/storage/http.py
W. Trevor King [Fri, 1 Jan 2010 21:10:45 +0000 (16:10 -0500)]
Fixed some stupid typos in libbe/storage/http.py

14 years agoImproved POST parsing, fixed Serve._long_help(), added --read-only.
W. Trevor King [Fri, 1 Jan 2010 20:33:23 +0000 (15:33 -0500)]
Improved POST parsing, fixed Serve._long_help(), added --read-only.

POST parsing via cgi.FieldStorage from Doug Hellmann's
  http://blog.doughellmann.com/2007/12/pymotw-basehttpserver.html

14 years agoAdded libbe.command.serve and libbe.storage.http for HTTP backend.
W. Trevor King [Fri, 1 Jan 2010 19:43:03 +0000 (14:43 -0500)]
Added libbe.command.serve and libbe.storage.http for HTTP backend.

Now the following works:
  some-BE-dir$ ./be serve
  $ ./be --repo http://localhost:8000 list

I haven't come up with a clean idea for testing this yet, so other
commands may be broken, but once we get the testing working, it
shouldn't be too hard to get everything working over HTTP :).

14 years agoHand nonexistent paths in VCS._u_search_parent_directories().
W. Trevor King [Fri, 1 Jan 2010 19:41:01 +0000 (14:41 -0500)]
Hand nonexistent paths in VCS._u_search_parent_directories().

search_parent_directries raises an AssertionError if the original path
doesn't exist.

14 years agoReturn a meaningful Storage.version()
W. Trevor King [Fri, 1 Jan 2010 15:46:23 +0000 (10:46 -0500)]
Return a meaningful Storage.version()

14 years agoUpdated copyright information
W. Trevor King [Fri, 1 Jan 2010 13:11:08 +0000 (08:11 -0500)]
Updated copyright information

14 years agoMerged be.restructure, major internal reorganization.
W. Trevor King [Thu, 31 Dec 2009 20:54:12 +0000 (15:54 -0500)]
Merged be.restructure, major internal reorganization.

Added a bunch of classes to make the commands, user interfaces, and
storage backends more abstract and distinct.  This should make it much
easier to extend and maintain BE.

Features:
 * Directory restructured:
   becommands/ -> libbe/commands
   submods sorted by functionality.
 * Lots of new classes:
   Option, Argument, Command
   InputOutput, StorageCallbacks, UserInterface
   Storage
 * Consolidated ID handling in libbe.util.id
 * Transitioned VCS backends for Python-based VCSs from subprocess
   calss to internal python calls.

Plus the user-visible changes:
 * New bugdir/bug/comment ID format replaces old bug:comment format.
 * Deprecated support for `be diff` on Arch and Darcs <= 2.3.1.  A new
   backend abstraction (Storage) makes the former implementation
   ungainly.
 * Improved command completion.
 * Removed commands close, open, email_bugs,
 * Flipped some arguments
   `be assign BUG-ID [ASSIGNEE]` -> `be status ASSIGNED BUG-ID ...`
   `be severity BUG-ID SEVERITY` -> `be severity SEVERITY BUG-ID ...`
   `be status BUG-ID STATUS` -> `be status STATUS BUG-ID ...`

In the merge:
  * Added 'commit' to list of pagerless commands.
  * Updated doc/README.dev

See
#bea86499-824e-4e77-b085-2d581fa9ccab/1100c966-9671-4bc6-8b68-6d408a910da1#
for a discussion of why the changes were made and some of the
difficulties en-route.

14 years agoUse fragment in base command completion + command io fixups.
W. Trevor King [Thu, 31 Dec 2009 20:33:39 +0000 (15:33 -0500)]
Use fragment in base command completion + command io fixups.

14 years agoUpdated NEWS and closed #bea/110#
W. Trevor King [Thu, 31 Dec 2009 19:49:58 +0000 (14:49 -0500)]
Updated NEWS and closed #bea/110#

14 years agoBrought be-handle-mail up to date
W. Trevor King [Thu, 31 Dec 2009 19:33:30 +0000 (14:33 -0500)]
Brought be-handle-mail up to date

14 years agoAdded UserInterface and other improved abstractions for command handling
W. Trevor King [Thu, 31 Dec 2009 19:32:39 +0000 (14:32 -0500)]
Added UserInterface and other improved abstractions for command handling

14 years agoBetter import error messages in test.py
W. Trevor King [Thu, 31 Dec 2009 17:36:29 +0000 (12:36 -0500)]
Better import error messages in test.py

14 years agoTrack connection status to allow multiple Storage.disconnect() calls.
W. Trevor King [Thu, 31 Dec 2009 16:47:33 +0000 (11:47 -0500)]
Track connection status to allow multiple Storage.disconnect() calls.

This makes cleaning up UIs easier: just call disconnect() :p.

14 years agoRemoved libbe/ui/base.py. Basic UI definitions are in libbe/command/base.py.
W. Trevor King [Thu, 31 Dec 2009 11:51:27 +0000 (06:51 -0500)]
Removed libbe/ui/base.py.  Basic UI definitions are in libbe/command/base.py.

14 years agoEmptied interfaces directory
W. Trevor King [Wed, 30 Dec 2009 02:53:58 +0000 (21:53 -0500)]
Emptied interfaces directory

Mostly throwing out a bunch of outdated GUIs.  The email interface
hasn't been moved over to the new 'Command' format yet...

14 years agoCorrect for possible directory changes in mercurial.dispatch.dispatch()
W. Trevor King [Wed, 30 Dec 2009 02:37:14 +0000 (21:37 -0500)]
Correct for possible directory changes in mercurial.dispatch.dispatch()

I ran across this when the hg unittests broke the vcs.base unittests:
  $ python test.py libbe.storage.vcs.base libbe.storage.vcs.hg
  ...
  OK
  $ python test.py libbe.storage.vcs.hg libbe.storage.vcs.base
  ...
  File ".../libbe/storage/vcs/base.py", line 914, in libbe.storage.vcs.base.VCSTestCase.Class._u_rel_path
  Failed example:
      vcs._u_rel_path("./a", ".")
  Exception raised:
      Traceback (most recent call last):
        File "/usr/lib/python2.5/doctest.py", line 1228, in __run
          compileflags, 1) in test.globs
        File "<doctest libbe.storage.vcs.base.VCSTestCase.Class._u_rel_path[4]>", line 1, in <module>
          vcs._u_rel_path("./a", ".")
        File ".../libbe/storage/vcs/base.py", line 921, in _u_rel_path
          path = os.path.abspath(path)
        File "/usr/lib/python2.5/posixpath.py", line 403, in abspath
          path = join(os.getcwd(), path)
      OSError: [Errno 2] No such file or directory
  ...
  FAILED (failures=1)

14 years agoDisable mercurial.demandimport, since it breaks Bzr
W. Trevor King [Wed, 30 Dec 2009 02:25:33 +0000 (21:25 -0500)]
Disable mercurial.demandimport, since it breaks Bzr

Running
  python test.py libbe.storage.vcs.hg libbe.storage.vcs.bzr
with the old setup produced lots of
  Traceback (most recent call last):
    File ".../libbe/storage/vcs/base.py", line 1010, in setUp
      self.s.init()
    File ".../libbe/storage/base.py", line 170, in init
      return self._init()
    File ".../libbe/storage/vcs/base.py", line 664, in _init
      self._vcs_init(self.repo)
    File ".../libbe/storage/vcs/bzr.py", line 88, in _vcs_init
      cmd.run(location=path)
    File ".../python2.5/site-packages/bzrlib/builtins.py", line 1685, in run
      format = bzrdir.format_registry.make_bzrdir('default')
    File ".../python2.5/site-packages/bzrlib/bzrdir.py", line 3452, in make_bzrdir
      return self.get(key)()
    File ".../python2.5/site-packages/bzrlib/bzrdir.py", line 3398, in helper
      bd.set_branch_format(_load(branch_format))
    File ".../python2.5/site-packages/bzrlib/bzrdir.py", line 3385, in _load
      [factory_name])
    File "/var/lib/python-support/python2.5/mercurial/demandimport.py", line 108, in _demandimport
      setattr(mod, x, _demandmod(x, mod.__dict__, locals))
    File ".../python2.5/site-packages/bzrlib/lazy_import.py", line 106, in __getattribute__
      obj = _replace()
    File ".../python2.5/site-packages/bzrlib/lazy_import.py", line 88, in _replace
      extra=e)
  IllegalUseOfScopeReplacer: ScopeReplacer object 'branch' was used incorrectly: Object already cleaned up, did you assign it to another variable?: _factory

14 years agoUse ._vcs_is_versioned() in VCS._children()
W. Trevor King [Wed, 30 Dec 2009 02:17:39 +0000 (21:17 -0500)]
Use ._vcs_is_versioned() in VCS._children()

Otherwise Arch will return '.arch-ids' in its list, etc.

14 years agoFixed make_*_testcase_subclasses() to avoid duplication.
W. Trevor King [Wed, 30 Dec 2009 02:12:12 +0000 (21:12 -0500)]
Fixed make_*_testcase_subclasses() to avoid duplication.

Also removed final check for 'parent' existence in
  Storage_add_remove_TestCase.test_remove_nonrooted()
because some VCSs (e.g. Git) don't keep track of blank directories.

14 years agoWe don't do much with Mercurial's ui, so _dispatch -> dispatch
W. Trevor King [Wed, 30 Dec 2009 01:13:43 +0000 (20:13 -0500)]
We don't do much with Mercurial's ui, so _dispatch -> dispatch

14 years agoDon't chdir() in libbe/command/html.py doctests.
W. Trevor King [Wed, 30 Dec 2009 01:06:27 +0000 (20:06 -0500)]
Don't chdir() in libbe/command/html.py doctests.

14 years agoDon't worry about whitespace in `be --help`
W. Trevor King [Wed, 30 Dec 2009 00:53:13 +0000 (19:53 -0500)]
Don't worry about whitespace in `be --help`

14 years agoRemove libbe.ui.util.cmdutil
W. Trevor King [Wed, 30 Dec 2009 00:49:50 +0000 (19:49 -0500)]
Remove libbe.ui.util.cmdutil

All of its functionality has moved off into more focused modules.

14 years agoPropogate long_to_short_user() -> long_to_short_text() and inverse
W. Trevor King [Wed, 30 Dec 2009 00:48:33 +0000 (19:48 -0500)]
Propogate long_to_short_user() -> long_to_short_text() and inverse

I'd missed some calls when I made the changes.

14 years agoRestored post-colon spaces in doctests
W. Trevor King [Wed, 30 Dec 2009 00:19:15 +0000 (19:19 -0500)]
Restored post-colon spaces in doctests

14 years agoFixed up the completion helpers in libbe.command.util
W. Trevor King [Wed, 30 Dec 2009 00:00:40 +0000 (19:00 -0500)]
Fixed up the completion helpers in libbe.command.util

This entailed a fairly thorough cleanup of libbe.util.id.

Remaining unimplemented completion helpers:
  * complete_assigned()
  * complete_extra_strings()
Since these would require scanning all (active?) bugs to compile
lists, and I was feeling lazy...

14 years agoCommented #bea/110/781# on why I'm not supporting Arch.child(revision)
W. Trevor King [Tue, 29 Dec 2009 16:28:40 +0000 (11:28 -0500)]
Commented #bea/110/781# on why I'm not supporting Arch.child(revision)

14 years agoUpdated Darcs backend towards supporting .children(revision).
W. Trevor King [Tue, 29 Dec 2009 15:39:09 +0000 (10:39 -0500)]
Updated Darcs backend towards supporting .children(revision).

._vcs_isdir() and ._vcs_listdir() will need to parse the output of
  darcs show files [options] --patch REVISION PATH
but both the --patch option and the PATH argument are new, and I can't
get a recent enough version of Darcs to compile on my system.
Theoretically they will work, but they remain untested for now.

I don't think it's worth rolling my own
  darcs show files --patch REVISION
to support earlier versions of Darcs, since the only solution I can
think of now would be to check out the given revision and use
os.walk() or some such, and that would be really ugly...

Also added .version_cmp() for easy version comparison.

Reindented ._vcs_get_file_contents() to remove trailing elses since
the if clauses all contain returns.

14 years agoAdded an additional VCS._u_rel_path() unittest.
W. Trevor King [Tue, 29 Dec 2009 15:18:20 +0000 (10:18 -0500)]
Added an additional VCS._u_rel_path() unittest.

Also re-enabled the unitsuite in libbe.storage.vcs.base, which
I'd disabled while testing the VCS unittests.

14 years agoAdded root directory handling to VCS._u_rel_path().
W. Trevor King [Tue, 29 Dec 2009 14:46:59 +0000 (09:46 -0500)]
Added root directory handling to VCS._u_rel_path().

Now it returns '.' when you ask for the relative path from root to
itself.  It used to raise AssertionError or InvalidPath.

14 years agoAdjust Git._vcs_isdir() to Python-2.5-compatible syntax
W. Trevor King [Tue, 29 Dec 2009 11:40:38 +0000 (06:40 -0500)]
Adjust Git._vcs_isdir() to Python-2.5-compatible syntax

14 years agoUpdated Hg backend to support .children(revision).
W. Trevor King [Tue, 29 Dec 2009 11:36:23 +0000 (06:36 -0500)]
Updated Hg backend to support .children(revision).

14 years agoHg storage now based off mercurial module, not 'hg' executible.
W. Trevor King [Tue, 29 Dec 2009 10:52:27 +0000 (05:52 -0500)]
Hg storage now based off mercurial module, not 'hg' executible.

This should make repeated calls to Hg storage instances _much_ faster,
since we avoid repeatedly loading and tearing down a python subprocess.
For example, the testsuite runs ~6x faster on my box.

Here's a run with the old Hg implementation:
  $ python test.py libbe.storage.vcs.hg
  ...
  =================================
  ERROR: test_get_previous_children
  ---------------------------------
  Traceback (most recent call last):
    ...
  NotImplementedError

  ---------------------------------
  Ran 49 tests in 133.285s

  FAILED (errors=1)

A run with the new implementation gives the same results, except for:
  Ran 49 tests in 22.328s

14 years agoAdapted BugDir.duplicate_bugdir() to use revision-dependend Storage.children()
W. Trevor King [Tue, 29 Dec 2009 09:43:42 +0000 (04:43 -0500)]
Adapted BugDir.duplicate_bugdir() to use revision-dependend Storage.children()

14 years agoUpdated Git backend to support .children(revision).
W. Trevor King [Mon, 28 Dec 2009 18:22:27 +0000 (13:22 -0500)]
Updated Git backend to support .children(revision).

+ some minor fixes to vcs/base.py and vcs/bzr.py

Also removed .be/id-cache, which should never have been versioned in
the first place.

14 years agoFixed VCS.children() and Bzr.children() for non-None revisions.
W. Trevor King [Mon, 28 Dec 2009 17:30:19 +0000 (12:30 -0500)]
Fixed VCS.children() and Bzr.children() for non-None revisions.

Now they both pass
  VersionedStorage_commit_TestCase.test_commit_revision_ids()

The .children() implementation for previous revisions lacks the
working directory's id<->path cache, so it's fairly slow...

14 years agoAdded VersionedStorage_commit_TestCase.test_commit_revision_ids()
W. Trevor King [Mon, 28 Dec 2009 16:13:49 +0000 (11:13 -0500)]
Added VersionedStorage_commit_TestCase.test_commit_revision_ids()

14 years agoAllow external use of Command.usage() and use CmdOptionParser.set_usage()
W. Trevor King [Mon, 28 Dec 2009 15:56:04 +0000 (10:56 -0500)]
Allow external use of Command.usage() and use CmdOptionParser.set_usage()

This fixes
  $ python be diff -2
  Usage: be [options]

  be: error: no such option: -2
and we now get the correct output
  $ python be diff -2
  Usage: be diff [options] [REVISION]

  be: error: no such option: -2

14 years agoRestore comment stripping to libbe.ui.util.editor.editor_string()
W. Trevor King [Mon, 28 Dec 2009 15:40:48 +0000 (10:40 -0500)]
Restore comment stripping to libbe.ui.util.editor.editor_string()

14 years agoBzr storage now based off bzrlib module, not 'bzr' executible.
W. Trevor King [Mon, 28 Dec 2009 15:28:58 +0000 (10:28 -0500)]
Bzr storage now based off bzrlib module, not 'bzr' executible.

This should make repeated calls to Bzr storage instances _much_ faster,
since we avoid repeatedly loading and tearing down a python subprocess.

14 years agoVersionedStorage_commit_TestCase now allows for versioned files created by self.s...
W. Trevor King [Mon, 28 Dec 2009 15:24:57 +0000 (10:24 -0500)]
VersionedStorage_commit_TestCase now allows for versioned files created by self.s.init()

14 years agolibbe.storage.vcs.base.VCS._init() now creates the '.be/version' file.
W. Trevor King [Mon, 28 Dec 2009 15:06:40 +0000 (10:06 -0500)]
libbe.storage.vcs.base.VCS._init() now creates the '.be/version' file.

And
  python test.py libbe.storage.vcs.base
passes again.

14 years agoAdd most comments with ignore_missing_references=True.
W. Trevor King [Mon, 28 Dec 2009 12:10:47 +0000 (07:10 -0500)]
Add most comments with ignore_missing_references=True.

14 years agoDon't run pager for the 'comment' command.
W. Trevor King [Mon, 28 Dec 2009 12:09:18 +0000 (07:09 -0500)]
Don't run pager for the 'comment' command.

It may need access to the tty for the spawned editor.

14 years agoMoved InvalidStorageVersion from libbe.command to libbe.storage
W. Trevor King [Sun, 27 Dec 2009 21:50:36 +0000 (16:50 -0500)]
Moved InvalidStorageVersion from libbe.command to libbe.storage

Also added ConnectionError pretty-print to ui.command_line, storage
version checking to BugDir.duplicate_bugdir(), and optional revision
argument to Storage.storage_version().

14 years agoAdded storage.Storage.storage_version() and command.InvalidStorageVersion.
W. Trevor King [Sun, 27 Dec 2009 21:30:54 +0000 (16:30 -0500)]
Added storage.Storage.storage_version() and command.InvalidStorageVersion.

Now commands automatically check for storage version compatibility.

14 years agoFixed libbe.storage.util.upgrade
W. Trevor King [Sun, 27 Dec 2009 20:58:29 +0000 (15:58 -0500)]
Fixed libbe.storage.util.upgrade

Note that it only upgrades on-disk versions, so you can't use a
non-VCS storage backend whose version isn't your command's current
storage version.  See #bea/110/bd1# for reasoning.  To see the on-disk
storage version, look at
  .be/version
To see your command's supported storage version, look at
  be --full-version

I added test_upgrade.sh to exercise the upgrade mechanism on BE's own
repository.

15 years agoFixed libbe.command.diff + ugly BugDir.duplicate_bugdir implementation
W. Trevor King [Tue, 15 Dec 2009 11:44:20 +0000 (06:44 -0500)]
Fixed libbe.command.diff + ugly BugDir.duplicate_bugdir implementation

duplicate_bugdir() works, but for the vcs backends, it could require
shelling out for _every_ file read.  This could, and probably will, be
horribly slow.  Still it works ;).

I'm not sure what a better implementation would be.  The old
implementation checked out the entire earlier state into a temporary
directory
  pros: single shell out, simple upgrade implementation
  cons: wouldn't work well for HTTP backens

I think a good solution would run along the lines of the currently
commented out code in duplicate_bugdir(), where a
  VersionedStorage.changed_since(revision)
call would give you a list of changed files.  diff could work off of
that directly, without the need to generate a whole duplicate bugdir.
I'm stuck on how to handle upgrades though...

Also removed trailing whitespace from all python files.

15 years agoFixed libbe.command.subscribe
W. Trevor King [Tue, 15 Dec 2009 09:32:19 +0000 (04:32 -0500)]
Fixed libbe.command.subscribe

15 years agoFixed up libbe.diff
W. Trevor King [Tue, 15 Dec 2009 08:57:54 +0000 (03:57 -0500)]
Fixed up libbe.diff

15 years agoTransition to Command-format complete.
W. Trevor King [Tue, 15 Dec 2009 08:31:48 +0000 (03:31 -0500)]
Transition to Command-format complete.

Well, except for going through and updating the _long_help()
strings.
  $ python test.py libbe.command
succeeds for everything except Diff and Subscribe, which is expected
since I haven't fixed up libbe.diff yet.

15 years agoTransitioned set to Command-format
W. Trevor King [Tue, 15 Dec 2009 08:05:34 +0000 (03:05 -0500)]
Transitioned set to Command-format

15 years agoTransitioned target to Command-format
W. Trevor King [Tue, 15 Dec 2009 07:38:51 +0000 (02:38 -0500)]
Transitioned target to Command-format

15 years agoTransitioned tag to Command-format
W. Trevor King [Tue, 15 Dec 2009 06:52:17 +0000 (01:52 -0500)]
Transitioned tag to Command-format

15 years agoTransitioned diff and subscribe to Command-format"
W. Trevor King [Tue, 15 Dec 2009 06:07:18 +0000 (01:07 -0500)]
Transitioned diff and subscribe to Command-format"

They don't work yet, since I still need to fix up libbe.diff and
replace BugDir.duplicate_bugdir() with something based on the new
Storage backend.

15 years agoTransitioned show to Command-format
W. Trevor King [Tue, 15 Dec 2009 05:04:55 +0000 (00:04 -0500)]
Transitioned show to Command-format

15 years agoTransitioned status to Command-format
W. Trevor King [Tue, 15 Dec 2009 04:31:57 +0000 (23:31 -0500)]
Transitioned status to Command-format

15 years agoTransitioned severity to Command-format, also added Command._get_*()
W. Trevor King [Tue, 15 Dec 2009 04:15:58 +0000 (23:15 -0500)]
Transitioned severity to Command-format, also added Command._get_*()

The old
  .requires_*
thing was rediculous.  The new ._get_*() callbacks allow the caller
to provide a means for getting the expensive structures, which the
command can use, or not, as required.  This will also make it easier
to implement the completion callbacks.

The callbacks should probably have matching .set_*() methods, to
avoid the current cache tweaking
  cmd._storage = ...
etc.  But that can wait for now...

15 years agoTransitioned remove to Command-format
W. Trevor King [Tue, 15 Dec 2009 02:29:48 +0000 (21:29 -0500)]
Transitioned remove to Command-format

15 years agoTransitioned new to Command-format
W. Trevor King [Tue, 15 Dec 2009 02:18:06 +0000 (21:18 -0500)]
Transitioned new to Command-format

15 years agoTransitioned html to Command-format
W. Trevor King [Tue, 15 Dec 2009 02:03:47 +0000 (21:03 -0500)]
Transitioned html to Command-format

15 years agoTransitioned help to Command-format
W. Trevor King [Tue, 15 Dec 2009 01:33:35 +0000 (20:33 -0500)]
Transitioned help to Command-format

15 years agoTransitioned merge to Command-format
W. Trevor King [Tue, 15 Dec 2009 01:13:30 +0000 (20:13 -0500)]
Transitioned merge to Command-format

15 years agoTransitioned import_xml to Command-format
W. Trevor King [Mon, 14 Dec 2009 23:25:28 +0000 (18:25 -0500)]
Transitioned import_xml to Command-format

15 years agoRemoved email_bugs, to be replaced by assorted storage backends.
W. Trevor King [Mon, 14 Dec 2009 13:48:28 +0000 (08:48 -0500)]
Removed email_bugs, to be replaced by assorted storage backends.

15 years agoTransitioned due to Command format
W. Trevor King [Mon, 14 Dec 2009 13:45:20 +0000 (08:45 -0500)]
Transitioned due to Command format

15 years agoTransitioned depend to Command format
W. Trevor King [Mon, 14 Dec 2009 13:33:43 +0000 (08:33 -0500)]
Transitioned depend to Command format

15 years agoTransitioned comment to Command format
W. Trevor King [Mon, 14 Dec 2009 12:37:51 +0000 (07:37 -0500)]
Transitioned comment to Command format

15 years agoTransitioned init to Command format
W. Trevor King [Mon, 14 Dec 2009 08:29:20 +0000 (03:29 -0500)]
Transitioned init to Command format

15 years agoAdded parse_user() calls to Assign
W. Trevor King [Mon, 14 Dec 2009 07:01:06 +0000 (02:01 -0500)]
Added parse_user() calls to Assign

15 years agoRemoved `be open` and `be close`. Alias `be status` instead.
W. Trevor King [Mon, 14 Dec 2009 06:13:05 +0000 (01:13 -0500)]
Removed `be open` and `be close`.  Alias `be status` instead.

For example, in Bash
  alias be-open='be status open'

If you need to set options, this won't work, but command completion
with misc/completion/be.bash should make typing out
  be status open
not too painful ;).

15 years agoTransitioned assign to Command format
W. Trevor King [Mon, 14 Dec 2009 06:12:08 +0000 (01:12 -0500)]
Transitioned assign to Command format

15 years agoThe VCS storage backends are all mostly working now.
W. Trevor King [Mon, 14 Dec 2009 04:25:07 +0000 (23:25 -0500)]
The VCS storage backends are all mostly working now.

Running
  python test.py libbe.storage.vcs
yields some EmptyCommit problems, an issue with bzr revision ids, and
some trouble with git's remove(), but nothing too critical.

On the bright side, now
  ./be list
Detects and uses the bzr backend :).

Onwards to moving over the remaining commands...

15 years agoMoved Arch over to Storage format
W. Trevor King [Mon, 14 Dec 2009 04:14:06 +0000 (23:14 -0500)]
Moved Arch over to Storage format

15 years agoMove Darcs over to Storage format.
W. Trevor King [Mon, 14 Dec 2009 02:56:34 +0000 (21:56 -0500)]
Move Darcs over to Storage format.

We have to work around the same issue as mercurial (hg) issue 618.  I
can't find a Darcs bug report for this, but it's been fixed somewhere
between 1.0.9 and 2.3.1.

Example scripts demonstrating the bug:
  $ darcs=/usr/bin/darcs
  $ mkdir x; cd x; $darcs init; echo a > b; $darcs add b; \
    $darcs record --all --author 'x <a@b.com>' --logfile b; \
    echo z>b; $darcs record --all --author 'x <a@b.com>' --logfile b; \
    echo g>b; $darcs record --all --author 'x <a@b.com>' --logfile b; \
    cd ..; rm -rf x > /dev/null; $darcs --version
  Finished recording patch 'a'
  No changes!
  No changes!
  1.0.9 (release)
And showing it's been fixed:
  $ darcs=~/.cabal/bin/darcs
  $ mkdir x; cd x; $darcs init; echo a > b; $darcs add b; \
    $darcs record --all --author 'x <a@b.com>' --logfile b; \
    echo z>b; $darcs record --all --author 'x <a@b.com>' --logfile b; \
    echo g>b; $darcs record --all --author 'x <a@b.com>' --logfile b; \
    cd ..; rm -rf x > /dev/null; $darcs --version
  Finished recording patch 'a'
  Finished recording patch 'z'
  Finished recording patch 'g'
  2.3.1 (release)

15 years agoCheck for repo existence before initializing VCS
W. Trevor King [Mon, 14 Dec 2009 01:35:14 +0000 (20:35 -0500)]
Check for repo existence before initializing VCS

15 years agoAdjust Bzr._vcs_revision_id for 1-indexed revision ids.
W. Trevor King [Mon, 14 Dec 2009 01:24:21 +0000 (20:24 -0500)]
Adjust Bzr._vcs_revision_id for 1-indexed revision ids.

15 years agoAdjust Hg._vcs_revision_id for 1-indexed revision ids.
W. Trevor King [Mon, 14 Dec 2009 01:09:51 +0000 (20:09 -0500)]
Adjust Hg._vcs_revision_id for 1-indexed revision ids.

15 years agoDon't require new revisions on empty commits.
W. Trevor King [Mon, 14 Dec 2009 00:58:50 +0000 (19:58 -0500)]
Don't require new revisions on empty commits.

For example, hg can't:
  $ mkdir x; cd x;
  x$ hg init;
  x$ echo a> b; hg add b;
  x$ hg commit -m 'r1';
  x$ hg commit -m 'r2';
  nothing changed
  x$ hg log;
  changeset:   0:e30558c36fca
  tag:         tip
  user:        W. Trevor King <wking@drexel.edu>
  date:        Sun Dec 13 19:48:47 2009 -0500
  summary:     hi
  x$ cd ..; rm -rf x

We shouldn't need this functionality anyway ;).

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

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

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

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

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

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

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

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

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

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

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

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

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

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