aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fixed update_copyright.py's subproc import and updated copyrightsW. Trevor King2010-01-013-6/+3
|
* Serve.handle_*() now raise _HandlerError so the .do_*() methods know.W. Trevor King2010-01-011-8/+17
| | | | | Before there wasn't a good way to tell if the handler had experienced an error, or just didn't want to return anything.
* Fixed commit handling in commands.serve and storage.httpW. Trevor King2010-01-012-5/+9
|
* Use more kwargs in libbe.command.serveW. Trevor King2010-01-012-12/+11
| | | | | | | | kwargs make things easier to maintain. Also make sure the .handle_*() methods return two items (content,ctype) even when both are None.
* Improved POST and error handling in `be serve`W. Trevor King2010-01-011-22/+43
| | | | | | | | | | | | | | 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
* Fixed some stupid typos in libbe/storage/http.pyW. Trevor King2010-01-011-2/+2
|
* Improved POST parsing, fixed Serve._long_help(), added --read-only.W. Trevor King2010-01-011-49/+40
| | | | | POST parsing via cgi.FieldStorage from Doug Hellmann's http://blog.doughellmann.com/2007/12/pymotw-basehttpserver.html
* Added libbe.command.serve and libbe.storage.http for HTTP backend.W. Trevor King2010-01-014-5/+622
| | | | | | | | | | 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 :).
* Hand nonexistent paths in VCS._u_search_parent_directories().W. Trevor King2010-01-011-1/+5
| | | | | search_parent_directries raises an AssertionError if the original path doesn't exist.
* Return a meaningful Storage.version()W. Trevor King2010-01-011-1/+2
|
* Updated copyright informationW. Trevor King2010-01-0167-71/+241
|
* Merged be.restructure, major internal reorganization.W. Trevor King2009-12-31666-8801/+9459
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * Use fragment in base command completion + command io fixups.W. Trevor King2009-12-312-7/+16
| |
| * Updated NEWS and closed #bea/110#W. Trevor King2009-12-312-1/+13
| |
| * Brought be-handle-mail up to dateW. Trevor King2009-12-311-262/+229
| |
| * Added UserInterface and other improved abstractions for command handlingW. Trevor King2009-12-3124-249/+433
| |
| * Better import error messages in test.pyW. Trevor King2009-12-311-1/+5
| |
| * Track connection status to allow multiple Storage.disconnect() calls.W. Trevor King2009-12-312-5/+18
| | | | | | | | This makes cleaning up UIs easier: just call disconnect() :p.
| * Removed libbe/ui/base.py. Basic UI definitions are in libbe/command/base.py.W. Trevor King2009-12-311-1/+0
| |
| * Emptied interfaces directoryW. Trevor King2009-12-2983-2128/+0
| | | | | | | | | | Mostly throwing out a bunch of outdated GUIs. The email interface hasn't been moved over to the new 'Command' format yet...
| * Correct for possible directory changes in mercurial.dispatch.dispatch()W. Trevor King2009-12-291-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
| * Disable mercurial.demandimport, since it breaks BzrW. Trevor King2009-12-291-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Use ._vcs_is_versioned() in VCS._children()W. Trevor King2009-12-291-0/+3
| | | | | | | | Otherwise Arch will return '.arch-ids' in its list, etc.
| * Fixed make_*_testcase_subclasses() to avoid duplication.W. Trevor King2009-12-292-14/+17
| | | | | | | | | | | | 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.
| * We don't do much with Mercurial's ui, so _dispatch -> dispatchW. Trevor King2009-12-291-2/+1
| |
| * Don't chdir() in libbe/command/html.py doctests.W. Trevor King2009-12-291-10/+7
| |
| * Don't worry about whitespace in `be --help`W. Trevor King2009-12-291-1/+1
| |
| * Remove libbe.ui.util.cmdutilW. Trevor King2009-12-292-140/+4
| | | | | | | | All of its functionality has moved off into more focused modules.
| * Propogate long_to_short_user() -> long_to_short_text() and inverseW. Trevor King2009-12-291-2/+2
| | | | | | | | I'd missed some calls when I made the changes.
| * Restored post-colon spaces in doctestsW. Trevor King2009-12-293-15/+15
| |
| * Fixed up the completion helpers in libbe.command.utilW. Trevor King2009-12-295-106/+296
| | | | | | | | | | | | | | | | | | | | 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...
| * Commented #bea/110/781# on why I'm not supporting Arch.child(revision)W. Trevor King2009-12-292-0/+25
| |
| * Updated Darcs backend towards supporting .children(revision).W. Trevor King2009-12-291-40/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ._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.
| * Added an additional VCS._u_rel_path() unittest.W. Trevor King2009-12-291-2/+3
| | | | | | | | | | Also re-enabled the unitsuite in libbe.storage.vcs.base, which I'd disabled while testing the VCS unittests.
| * Added root directory handling to VCS._u_rel_path().W. Trevor King2009-12-291-3/+8
| | | | | | | | | | Now it returns '.' when you ask for the relative path from root to itself. It used to raise AssertionError or InvalidPath.
| * Adjust Git._vcs_isdir() to Python-2.5-compatible syntaxW. Trevor King2009-12-291-1/+2
| |
| * Updated Hg backend to support .children(revision).W. Trevor King2009-12-292-5/+37
| |
| * Hg storage now based off mercurial module, not 'hg' executible.W. Trevor King2009-12-292-22/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Adapted BugDir.duplicate_bugdir() to use revision-dependend Storage.children()W. Trevor King2009-12-291-3/+9
| |
| * Updated Git backend to support .children(revision).W. Trevor King2009-12-284-292/+26
| | | | | | | | | | | | | | + 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.
| * Fixed VCS.children() and Bzr.children() for non-None revisions.W. Trevor King2009-12-283-12/+102
| | | | | | | | | | | | | | | | 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...
| * Added VersionedStorage_commit_TestCase.test_commit_revision_ids()W. Trevor King2009-12-281-0/+23
| |
| * Allow external use of Command.usage() and use CmdOptionParser.set_usage()W. Trevor King2009-12-283-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Restore comment stripping to libbe.ui.util.editor.editor_string()W. Trevor King2009-12-284-0/+317
| |
| * Bzr storage now based off bzrlib module, not 'bzr' executible.W. Trevor King2009-12-281-38/+76
| | | | | | | | | | This should make repeated calls to Bzr storage instances _much_ faster, since we avoid repeatedly loading and tearing down a python subprocess.
| * VersionedStorage_commit_TestCase now allows for versioned files created by ↵W. Trevor King2009-12-281-4/+17
| | | | | | | | self.s.init()
| * libbe.storage.vcs.base.VCS._init() now creates the '.be/version' file.W. Trevor King2009-12-282-17/+34
| | | | | | | | | | | | And python test.py libbe.storage.vcs.base passes again.
| * Add most comments with ignore_missing_references=True.W. Trevor King2009-12-282-2/+2
| |
| * Don't run pager for the 'comment' command.W. Trevor King2009-12-281-7/+11
| | | | | | | | It may need access to the tty for the spawned editor.
| * Moved InvalidStorageVersion from libbe.command to libbe.storageW. Trevor King2009-12-277-21/+33
| | | | | | | | | | | | Also added ConnectionError pretty-print to ui.command_line, storage version checking to BugDir.duplicate_bugdir(), and optional revision argument to Storage.storage_version().