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.
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.
W. Trevor King [Tue, 29 Dec 2009 11:40:38 +0000 (06:40 -0500)]
Adjust Git._vcs_isdir() to Python-2.5-compatible syntax
W. Trevor King [Tue, 29 Dec 2009 11:36:23 +0000 (06:36 -0500)]
Updated Hg backend to support .children(revision).
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
W. Trevor King [Tue, 29 Dec 2009 09:43:42 +0000 (04:43 -0500)]
Adapted BugDir.duplicate_bugdir() to use revision-dependend Storage.children()
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.
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...
W. Trevor King [Mon, 28 Dec 2009 16:13:49 +0000 (11:13 -0500)]
Added VersionedStorage_commit_TestCase.test_commit_revision_ids()
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
W. Trevor King [Mon, 28 Dec 2009 15:40:48 +0000 (10:40 -0500)]
Restore comment stripping to libbe.ui.util.editor.editor_string()
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.
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()
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.
W. Trevor King [Mon, 28 Dec 2009 12:10:47 +0000 (07:10 -0500)]
Add most comments with ignore_missing_references=True.
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.
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().
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.
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.
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.
W. Trevor King [Tue, 15 Dec 2009 09:32:19 +0000 (04:32 -0500)]
Fixed libbe.command.subscribe
W. Trevor King [Tue, 15 Dec 2009 08:57:54 +0000 (03:57 -0500)]
Fixed up libbe.diff
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.
W. Trevor King [Tue, 15 Dec 2009 08:05:34 +0000 (03:05 -0500)]
Transitioned set to Command-format
W. Trevor King [Tue, 15 Dec 2009 07:38:51 +0000 (02:38 -0500)]
Transitioned target to Command-format
W. Trevor King [Tue, 15 Dec 2009 06:52:17 +0000 (01:52 -0500)]
Transitioned tag 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.
W. Trevor King [Tue, 15 Dec 2009 05:04:55 +0000 (00:04 -0500)]
Transitioned show to Command-format
W. Trevor King [Tue, 15 Dec 2009 04:31:57 +0000 (23:31 -0500)]
Transitioned status to Command-format
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...
W. Trevor King [Tue, 15 Dec 2009 02:29:48 +0000 (21:29 -0500)]
Transitioned remove to Command-format
W. Trevor King [Tue, 15 Dec 2009 02:18:06 +0000 (21:18 -0500)]
Transitioned new to Command-format
W. Trevor King [Tue, 15 Dec 2009 02:03:47 +0000 (21:03 -0500)]
Transitioned html to Command-format
W. Trevor King [Tue, 15 Dec 2009 01:33:35 +0000 (20:33 -0500)]
Transitioned help to Command-format
W. Trevor King [Tue, 15 Dec 2009 01:13:30 +0000 (20:13 -0500)]
Transitioned merge to Command-format
W. Trevor King [Mon, 14 Dec 2009 23:25:28 +0000 (18:25 -0500)]
Transitioned import_xml to Command-format
W. Trevor King [Mon, 14 Dec 2009 13:48:28 +0000 (08:48 -0500)]
Removed email_bugs, to be replaced by assorted storage backends.
W. Trevor King [Mon, 14 Dec 2009 13:45:20 +0000 (08:45 -0500)]
Transitioned due to Command format
W. Trevor King [Mon, 14 Dec 2009 13:33:43 +0000 (08:33 -0500)]
Transitioned depend to Command format
W. Trevor King [Mon, 14 Dec 2009 12:37:51 +0000 (07:37 -0500)]
Transitioned comment to Command format
W. Trevor King [Mon, 14 Dec 2009 08:29:20 +0000 (03:29 -0500)]
Transitioned init to Command format
W. Trevor King [Mon, 14 Dec 2009 07:01:06 +0000 (02:01 -0500)]
Added parse_user() calls to Assign
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 ;).
W. Trevor King [Mon, 14 Dec 2009 06:12:08 +0000 (01:12 -0500)]
Transitioned assign to Command format
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...
W. Trevor King [Mon, 14 Dec 2009 04:14:06 +0000 (23:14 -0500)]
Moved Arch 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)
W. Trevor King [Mon, 14 Dec 2009 01:35:14 +0000 (20:35 -0500)]
Check for repo existence before initializing VCS
W. Trevor King [Mon, 14 Dec 2009 01:24:21 +0000 (20:24 -0500)]
Adjust Bzr._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.
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 ;).
W. Trevor King [Mon, 14 Dec 2009 00:40:06 +0000 (19:40 -0500)]
Work around mercurial (hg) issue 618.
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.
W. Trevor King [Sun, 13 Dec 2009 13:31:33 +0000 (08:31 -0500)]
Fix Git._vcs_revision_id() offset bug.
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.
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
W. Trevor King [Sun, 13 Dec 2009 12:53:17 +0000 (07:53 -0500)]
Use detect rather than catching errors in _vcs_root().
W. Trevor King [Sun, 13 Dec 2009 12:45:43 +0000 (07:45 -0500)]
.bzr transition.
W. Trevor King [Sun, 13 Dec 2009 12:39:55 +0000 (07:39 -0500)]
More fixes for libbe.storage.vcs.hg + .git transition.
W. Trevor King [Sun, 13 Dec 2009 12:26:37 +0000 (07:26 -0500)]
Fixes to get libbe.storage.vcs.hg passing tests.
W. Trevor King [Sun, 13 Dec 2009 12:20:31 +0000 (07:20 -0500)]
Converted libbe.storage.vcs.hg to new Storage format.
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
W. Trevor King [Sun, 13 Dec 2009 11:19:23 +0000 (06:19 -0500)]
Converted libbe.storage.vcs.base to new Storage format.
W. Trevor King [Sun, 13 Dec 2009 01:57:59 +0000 (20:57 -0500)]
Moved be to libbe.ui.command_line and transitioned to Command format.
W. Trevor King [Sat, 12 Dec 2009 06:46:22 +0000 (01:46 -0500)]
Use get_input/output_encoding() in libbe.command.base.Command
W. Trevor King [Sat, 12 Dec 2009 06:43:20 +0000 (01:43 -0500)]
Added libbe.ui.util.user for managing user ids.
W. Trevor King [Sat, 12 Dec 2009 06:12:17 +0000 (01:12 -0500)]
Moved command completion from libbe.ui.util to libbe.command.util
W. Trevor King [Sat, 12 Dec 2009 05:31:55 +0000 (00:31 -0500)]
Added libbe.command.base (with Command class) and moved list command to new format.
W. Trevor King [Fri, 11 Dec 2009 00:31:47 +0000 (19:31 -0500)]
Moved bugdir, bug, and comment over to new id implementation.
W. Trevor King [Wed, 9 Dec 2009 12:23:54 +0000 (07:23 -0500)]
Rethought libbe.util.id module
W. Trevor King [Wed, 9 Dec 2009 01:02:34 +0000 (20:02 -0500)]
Reworked test.py to handle deeper directory structure
W. Trevor King [Tue, 8 Dec 2009 14:01:26 +0000 (09:01 -0500)]
Moved properties.py and settings_object.py to libbe/storage/util/
W. Trevor King [Tue, 8 Dec 2009 13:54:50 +0000 (08:54 -0500)]
Transitioned bugdir.py to new storage format.
W. Trevor King [Tue, 8 Dec 2009 09:33:49 +0000 (04:33 -0500)]
Transitioned bug.py to new storage format.
W. Trevor King [Tue, 8 Dec 2009 09:10:10 +0000 (04:10 -0500)]
Transitioned comment.py to new storage format.
W. Trevor King [Tue, 8 Dec 2009 09:01:38 +0000 (04:01 -0500)]
Use .storage.is_read/writeable() rather than .sync_with_disk() in settings_object.py
W. Trevor King [Tue, 8 Dec 2009 08:58:36 +0000 (03:58 -0500)]
Use mapfile to only create & parse mapfile strings, not files
W. Trevor King [Tue, 8 Dec 2009 08:52:37 +0000 (03:52 -0500)]
Extended libbe.storage.base for separate read/write control.
Rather than just having .read_only to set write permissions and
assuming that read was always legal. We also added user and backend
control of both readable and writeable:
do you want to read/write?
and
can you read/write?
Specialized NotSupported into NotWriteable and NotReadable.
Added automatic unicode encoding on .set(), and decode option on
.get().
W. Trevor King [Tue, 8 Dec 2009 08:51:27 +0000 (03:51 -0500)]
Extend libbe.util.id to handle id (path) creation.
W. Trevor King [Tue, 8 Dec 2009 06:49:06 +0000 (01:49 -0500)]
Added libbe.storage.base and test suite.
W. Trevor King [Tue, 8 Dec 2009 01:07:55 +0000 (20:07 -0500)]
Initial directory restructuring to clarify dependencies
W. Trevor King [Tue, 8 Dec 2009 01:07:36 +0000 (20:07 -0500)]
Reorganization bug created
W. Trevor King [Mon, 7 Dec 2009 12:36:14 +0000 (07:36 -0500)]
Added libbe.pager and --paginate/--no-pager options to be.
W. Trevor King [Mon, 7 Dec 2009 12:34:14 +0000 (07:34 -0500)]
Updated NEWS
W. Trevor King [Mon, 7 Dec 2009 12:25:18 +0000 (07:25 -0500)]
Added --paginate and --no-pager to be
W. Trevor King [Mon, 7 Dec 2009 12:20:23 +0000 (07:20 -0500)]
Use 'auto' for run_pager default rather than None
W. Trevor King [Mon, 7 Dec 2009 12:18:48 +0000 (07:18 -0500)]
be --dir DIR COMMAND now roots the bugdir in DIR without changing directories.
Previously, for the directory structure
A
|-- X
`-- Y
You could do something like
A$ be --dir X diff --dir ../Y
Now it's
A$ be --dir X diff --dir Y
The --root option to `be init` has been removed as redundant. Replace
calls like
be init --root DIR
with
be --dir DIR init
W. Trevor King [Mon, 7 Dec 2009 12:02:15 +0000 (07:02 -0500)]
Update libbe.pager copyright
W. Trevor King [Mon, 7 Dec 2009 12:00:34 +0000 (07:00 -0500)]
Added libbe.pager
W. Trevor King [Sun, 6 Dec 2009 22:20:39 +0000 (17:20 -0500)]
be --dir DIR COMMAND now roots the bugdir in DIR without changing directories.
Previously, for the directory structure
A
|-- X
`-- Y
You could do something like
A$ be --dir X diff --dir ../Y
Now it's
A$ be --dir X diff --dir Y
The --root option to `be init` has been removed as redundant. Replace
calls like
be init --root DIR
with
be --dir DIR init
W. Trevor King [Sun, 6 Dec 2009 09:24:07 +0000 (04:24 -0500)]
Set BugDir(root=X) instead of os.chdir(X) in
W. Trevor King [Sun, 6 Dec 2009 08:11:39 +0000 (03:11 -0500)]
becommands.target.bug_target(TARGET-BUG) now returns TARGET-BUG
W. Trevor King [Sun, 6 Dec 2009 05:44:22 +0000 (00:44 -0500)]
Merged be.target-as-bug
Highlights:
* targets are now a special type of bug (severity 'target'), so you
can do all the things you do with normal bugs to them as well
(e.g. comment on them, link them into dependency trees, etc.)
* new command `be due` to get/set bug due dates.
* changes to `be depend`
* added options --status, --severity
* changes to `be list`
* added blacklist capability to --status, --severity, --assigned
* removed options --target, --cur-target
Replace:
'be list --target TARGET' with
'be depend --status -closed,fixed,wontfix --severity -target \
$(be target --resolve TARGET)'
'be list --cur-target' with
'be depend --status -closed,fixed,wontfix --severity -target \
$(be target --resolve)'
* changes to `be target`
* added option --resolve
* removed option --list
Replace:
'be target --list' with 'be list --status all --severity target'
* new function cmdutil.select_values() for whitelist/blacklist selection.
* assorted cleanups and bugfixes
W. Trevor King [Sun, 6 Dec 2009 05:43:59 +0000 (00:43 -0500)]
Marked as fixed 22b: Sorting targets chronologically
W. Trevor King [Sun, 6 Dec 2009 05:28:22 +0000 (00:28 -0500)]
Updated NEWS.
W. Trevor King [Sun, 6 Dec 2009 05:27:24 +0000 (00:27 -0500)]
Updated becommands/due.py copyright.
W. Trevor King [Sun, 6 Dec 2009 05:21:07 +0000 (00:21 -0500)]
Added becommands/due.py to manage bug due dates.
This fulfills the following part of 22b:7
* "due_by"
We could add "due-by" to Bug.extra_strings as well, so that anyone
could set due dates for any issue they wanted.
Currently there's not much going on, but perhaps other people will
have ideas for useful extensions. Maybe
be due --sort BUG-ID [BUG-ID ...]
or
be --due-in-days 7
W. Trevor King [Sun, 6 Dec 2009 04:52:07 +0000 (23:52 -0500)]
`be target` gains --resolve and loses --list.
`be target` now works with bug-style targets.
W. Trevor King [Sun, 6 Dec 2009 04:51:43 +0000 (23:51 -0500)]
Docstring clarification in becommands.depend.get_blocked_by()
W. Trevor King [Sun, 6 Dec 2009 03:00:04 +0000 (22:00 -0500)]
Removed target stuff from becommands/list.py and tweaked options.
Now --status, --severity, and --assigned all use
cmdutil.select_values() for nice whitelist/blacklist selection.