aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/storage
Commit message (Collapse)AuthorAgeFilesLines
* Used PyCharms inspectors.Matěj Cepl2024-03-3011-107/+197
|
* WIP plenty of clean-ups and porting to Python 3.Matěj Cepl2024-01-216-60/+63
|
* conversion of cmp() functionMatěj Cepl2024-01-185-78/+104
|
* 2to3 conversion of the repo.Matěj Cepl2024-01-1813-282/+279
|
* remove serve-storage and HTTP storage driverMatthew Fernandez2017-11-072-374/+1
| | | | | | This functionality is now better fulfilled by using an off-the-shelf network file system technology to share the BE object directory. This has the advantage of a more comprehensive and integrated security model as well.
* Minor clean up of Git back endMatthew Fernandez2017-10-301-15/+1
|
* remove unused exceptionMatthew Fernandez2017-10-251-5/+0
|
* remove now-unused method _vcs_is_versionedMatthew Fernandez2017-10-251-8/+0
|
* remove support for interspersed files in VCSesMatthew Fernandez2017-10-251-13/+1
| | | | Arch was the only VCS that needed this peculiarity.
* remove support for ArchMatthew Fernandez2017-10-253-449/+2
| | | | | | The last release of GNU Arch was in 2006, over ten years ago at time of writing. GNU suggests users should migrate repositories to Bazaar. This commit removes all support for Arch to reduce ongoing maintenance overheads.
* Transition to libbe.LOG for loggingW. Trevor King2013-01-241-7/+6
| | | | | | | This makes it easier to tweak log verbosity and redirect logs to other handlers. For example, the WSGI servers are unstable with stderr closed, and crash with an IOError if they try to print a warning to stderr.
* storage:util:upgrade: Strip any trailing space from the versionW. Trevor King2013-01-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Not just '\n'. Mark Mikofski reported an error on the upgrade from 1.4 to 1.5 on MS Windows: > upgrading bugdir from "Bugs Everywhere Directory v1.4" to "Bugs Everywhere Directory v1.5" > Traceback (most recent call last): > ... > File "c:\...\libbe\storage\util\upgrade.py", line 141, in check_initial_version > assert version == self.initial_version, '%s: %s' % (path, version) > AssertionError: c:\...\.be\version: Bugs Everywhere Directory v1.4 > > **notes:** I set a breakpoint and it does seem that they are not the same > (Pdb) self.initial_version > 'Bugs Everywhere Directory v1.4' > (Pdb) version > u'Bugs Everywhere Directory v1.4\r' We don't need to convert to Unicode, because on Python 2.7: $ python2.7 -c "print('a' == u'a')" True Strange, but true ;). One day we'll migrate BE to Python 3...
* storage:base: convert to Python 3.3 compatibilityW. Trevor King2012-11-121-6/+8
|
* storage: convert to Python 3 compatibilityW. Trevor King2012-11-121-9/+9
|
* storage:util:upgrade: use YAML parser to get BE Tree 1 0 settingsW. Trevor King2012-10-271-1/+1
| | | | | | | | | | | This fixes the "Bugs Everywhere Tree 1 0" -> "Bugs Everywhere Directory v1.1" upgrade broken by the switch to JSON in: commit a95915c6c7d6a4e29c1e5547580e0c1fed2467e1 Author: W. Trevor King <wking@tremily.us> Date: Mon Sep 17 08:14:21 2012 -0400 storage:util:mapfile: convert YAML settings to JSON.
* storage:vcs:git: don't accept pygit2 version 0.17.3.W. Trevor King2012-10-271-2/+2
| | | | | | | | | | | | | | | | My Repository.revparse_single() series was merged into pygit2 with: Merge: 3e9daa4 0238fb7 Author: J. David Ibáñez <jdavid.ibp@gmail.com> Date: Tue Sep 25 15:10:55 2012 +0200 Merge remote-tracking branch 'wking/revparse' But this happened after the 0.17.3 release. The next pygit2 release should contain the .revparse_single() code. The getattr() hackery works because versions of pygit2 before 0.17.3 lacked a __version__ attribute.
* storage:util:upgrade: make yaml import optional (unless it isn't)W. Trevor King2012-10-261-1/+9
| | | | | | Importing `yaml` may fail (if the user doesn't have PyYAML installed), but don't die until we need to use it. This way users without the old YAML formats on disk can run BE without installing PyYAML.
* storage:util:mapfile: add `context` argument to generate()W. Trevor King2012-10-261-23/+19
|
* doc: update :data: to :py:data: for modern Sphinx.W. Trevor King2012-10-262-7/+7
|
* doc: update :class: to :py:class: for modern Sphinx.W. Trevor King2012-10-2612-23/+23
|
* storage:vcs:base: avoid `is not a item name` Sphinx error.W. Trevor King2012-10-261-1/+1
|
* doc: update :mod: to :py:mod: for modern Sphinx.W. Trevor King2012-10-265-8/+8
|
* doc: update :func: to :py:func: for modern Sphinx.W. Trevor King2012-10-261-2/+2
|
* storage:util:config: path() now defaults to ~/.config/bugs-everywhereW. Trevor King2012-10-261-2/+13
| | | | | Add a documentation section discussing the config file, respect XDG_CONFIG_HOME, and add BE_CONFIG_PATH.
* storage:util:mapfile: fix YAML -> JSON in docstrings.W. Trevor King2012-10-251-2/+4
| | | | | | | | | | | | This should have been done back in: commit a95915c6c7d6a4e29c1e5547580e0c1fed2467e1 Author: W. Trevor King <wking@tremily.us> Date: Mon Sep 17 08:14:21 2012 -0400 storage:util:mapfile: convert YAML settings to JSON. I also add an empty-settings generation as a sanity check.
* Ran update-copyright.py.W. Trevor King2012-10-1616-16/+16
|
* storage:vcs:git: check for existence of pygit2.__version__.W. Trevor King2012-09-171-0/+5
| | | | | | | | | | Now that my pull request has been accepted, we can be fairly confident that future releases of pygit2 will expose this attribute. The accepted patch was a bit different from the original submission: Add 'pygit2.__version__' for easy access from client software. https://github.com/libgit2/pygit2/pull/128 commit f10d2b7b3f0c67d81b175326035e4813420156bd
* storage:util:mapfile: convert YAML settings to JSON.W. Trevor King2012-09-173-84/+181
| | | | | | | | | This is faster and still readable. I also add an upgrader to convert bug directories from: Bugs Everywhere Directory v1.4 to: Bugs Everywhere Directory v1.5 but I haven't upgraded the local bugdir yet.
* storage:vcs:git: move Git to ExecGit and add PygitGit using pygit2.W. Trevor King2012-09-131-11/+238
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If `pygit2` is installed, use it (via PygitGit) rather than calling the stand-alone `git` executable for all the Git (via ExecGit) for all the Git storage stuff. This saves one serializing/deserializing and process setup/teardown. I timed each test suite by commenting out one of the `make_vcs_testcase_subclasses()` calls at the end of `git.py` and running $ time python test.py libbe.storage.vcs.git The ExecGit tests ran in 13.7s and the PygitGit tests ran in 3.6s for a 3.8x speedup. I had to stretch pygit2 a bit to get a clean fit, so if you want to test this, you'll need to build pygit2 with the following merge requests: Add 'pygit2.__version__' for easy access from client software. https://github.com/libgit2/pygit2/pull/128 commit 0238fb72dfdf2a2308f2da347717cbaafddc4b83 signature: Add keyword argument parsing to Signature(). https://github.com/libgit2/pygit2/pull/129 commit c934858b629f40221406f34166dd77e881b9d5fd repository: add Repository.revparse_single() https://github.com/libgit2/pygit2/pull/131 commit 3afdc8b2f59ed137531671fedde36f3a39cbcc9d
* storage:vcs:base: fix _gets_ -> _get_ typo in test_gets_existing_user_id.W. Trevor King2012-09-131-1/+1
| | | | | VCS_get_user_id_TestCase.test_gets_existing_user_id is now VCS_get_user_id_TestCase.test_get_existing_user_id
* storage:vcs:base: fix realtive -> relative typo in _u_abspath docstring.W. Trevor King2012-09-131-1/+1
|
* command:serve-storage: rename `be serve` -> `be serve-storage`.W. Trevor King2012-08-291-5/+5
| | | | | | | | | | This will help avoid confusion between be serve-storage and be serve-commands
* util:wsgi: add BEExceptionApp for translating storage exceptions.W. Trevor King2012-08-291-1/+3
| | | | | | 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.
* Allow symlinks in bugdir directories.W. Trevor King2012-08-281-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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 ;).
* libbe:util:wsgi: extract WSGI utilities into a separate module.W. Trevor King2012-08-271-2/+8
|
* util:http: pull HTTP helpers from libbe.storage.http into their own module.W. Trevor King2012-08-241-103/+11
| | | | This way they can be shared with the upcoming Command._run_remote.
* storage:http: use an explicit relative import for base.W. Trevor King2012-08-241-2/+3
|
* storage:http: adjust HTTPError message in get_post_url.W. Trevor King2012-08-241-2/+2
| | | | | | 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.
* storage:http: add agent argument to get_post_url.W. Trevor King2012-08-241-2/+4
| | | | | This allows us to set an appropriate user agent if we use this function in other places (e.g. upcoming Command._run_remote).
* storage:vcs:hg: remove grandchildren from Hg._vcs_listdir.W. Trevor King2012-08-231-1/+4
| | | | | | | | | | | | | | | 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). ...
* storage:base: add tests to catch grandchildren in .children() output.W. Trevor King2012-08-231-1/+51
| | | | | | | | | | | 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.
* storage:vcs:hg: fix missformed file_a -> file_b message typo.W. Trevor King2012-08-231-1/+1
|
* Ran update-copyright.py.W. Trevor King2012-02-1616-160/+160
|
* Fix my busted 1512c0e2a64e patch to libbe/util/encoding.py.W. Trevor King2011-11-132-4/+4
| | | | | | | | | | | | | | 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.
* Ran update_copyright.py.W. Trevor King2011-11-092-0/+2
|
* Oops, that forgot the equals part of Mercurial 1.9 or greater.W. Trevor King2011-09-071-1/+1
|
* Adjust Mercurial execution so it works with version 1.9 and earlier.W. Trevor King2011-09-071-3/+9
| | | | | | | 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.
* Move Bzr.version_cmp to VCS.version_cmp.W. Trevor King2011-09-072-92/+91
| | | | The version comparison code will be useful for all VCSs.
* Merge remote branch 'pschumms/master'W. Trevor King2011-09-071-6/+4
|\
| * Fixed problem with Hg support under version 1.9 ↵Phil Schumm2011-07-281-6/+4
| | | | | | | | (mercurial.dispatch.dispatch() now takes a single request object with option for capturing output stream)