aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/storage/util
Commit message (Collapse)AuthorAgeFilesLines
* 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-261-2/+2
|
* doc: update :class: to :py:class: for modern Sphinx.W. Trevor King2012-10-262-4/+4
|
* doc: update :mod: to :py:mod: for modern Sphinx.W. Trevor King2012-10-262-2/+2
|
* 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-165-5/+5
|
* storage:util:mapfile: convert YAML settings to JSON.W. Trevor King2012-09-172-84/+180
| | | | | | | | | 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.
* Ran update-copyright.py.W. Trevor King2012-02-165-50/+50
|
* Fix my busted 1512c0e2a64e patch to libbe/util/encoding.py.W. Trevor King2011-11-131-2/+2
| | | | | | | | | | | | | | 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.
* Run update_copyright.py.W. Trevor King2011-05-255-3/+8
|
* Bumped to version 1.0.01.0.0Chris Ball2011-01-085-5/+5
|
* Ran update_copyright.pyW. Trevor King2010-06-226-58/+65
|
* Use os.path.join in libbe.storage.util.config.path.wking2010-06-221-1/+3
| | | | | | | | Versus previous hardcoded "~/.bugs_everywhere". Also improve docstrings for * libbe.storage.util.config.path * libbe.ui.util.user.get_user_id
* Fixed docstrings so only Sphinx errors are "autosummary" and "missing attribute"W. Trevor King2010-02-074-69/+150
|
* Added testSimplePropertySetStorageSave and relavant rewrites to settings_objectW. Trevor King2010-01-221-10/+45
| | | | | | | It hadn't been handling the "attach storage after initializing" technique that BugDir, Bug, and Comment use when from_memory==True. Now it does, by refusing to overwrite self.settings with the newly-loaded settings.
* Reworked settings_object module, but command.init tests still fail:W. Trevor King2010-01-221-119/+226
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | $ python test.py libbe.command.init Doctest: libbe.command.init.Init ... FAIL ... ----------------------- File ".../libbe/command/init.py", line 47, in libbe.command.init.Init Failed example: ui.run(cmd) Exception raised: Traceback (most recent call last): ... File "/tmp/be.wtk/libbe/command/init.py", line 97, in _run bd = libbe.bugdir.BugDir(storage, from_storage=False) File "/tmp/be.wtk/libbe/bugdir.py", line 185, in __init__ self.save() File "/tmp/be.wtk/libbe/bugdir.py", line 228, in save self.save_settings() File "/tmp/be.wtk/libbe/bugdir.py", line 204, in save_settings mf = mapfile.generate(self._get_saved_settings()) File "/tmp/be.wtk/libbe/storage/util/settings_object.py", line 230, in _get_saved_settings self, self._setting_name_to_attr_name(k)) File "/tmp/be.wtk/libbe/storage/util/properties.py", line 194, in _fget value = fget(self) File "/tmp/be.wtk/libbe/storage/util/properties.py", line 329, in _fget primer(self) File "/tmp/be.wtk/libbe/storage/util/settings_object.py", line 69, in prop_load_settings self.load_settings() File "/tmp/be.wtk/libbe/bugdir.py", line 194, in load_settings self.settings = mapfile.parse(settings_mapfile) File "/tmp/be.wtk/libbe/storage/util/mapfile.py", line 123, in parse c = yaml.load(contents) ... File "/usr/lib/python2.6/site-packages/yaml/reader.py", line 213, in update_raw data = self.stream.read(size) AttributeError: 'NoneType' object has no attribute 'read' ...
* Added unprimableVal option to primed_property.W. Trevor King2010-01-221-5/+14
| | | | For clearer handling of the "Tried to load but failed" case.
* Update libbe.storage.util.settings_object tests for new ._get_saved_settingsW. Trevor King2010-01-211-1/+2
|
* Fix not-yet-loaded bug in SavedSettingsObject._get_saved_settings()W. Trevor King2010-01-201-6/+19
| | | | | | The earlier implementation only copied in the currently loaded properties and the required ones. The new implementation copies in _all_ the non-default properties.
* Updated copyright informationW. Trevor King2010-01-015-5/+5
|
* Added storage.Storage.storage_version() and command.InvalidStorageVersion.W. Trevor King2009-12-271-17/+7
| | | | Now commands automatically check for storage version compatibility.
* Fixed libbe.storage.util.upgradeW. Trevor King2009-12-271-54/+153
| | | | | | | | | | | | | 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.
* Fixed libbe.command.diff + ugly BugDir.duplicate_bugdir implementationW. Trevor King2009-12-154-39/+52
| | | | | | | | | | | | | | | | | | | | | 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.
* Transitioned comment to Command formatW. Trevor King2009-12-141-4/+4
|
* Converted libbe.storage.vcs.base to new Storage format.W. Trevor King2009-12-131-0/+242
|
* Moved be to libbe.ui.command_line and transitioned to Command format.W. Trevor King2009-12-121-4/+4
|
* Added libbe.ui.util.user for managing user ids.W. Trevor King2009-12-121-3/+2
|
* Moved properties.py and settings_object.py to libbe/storage/util/W. Trevor King2009-12-082-0/+1075
|
* Transitioned comment.py to new storage format.W. Trevor King2009-12-082-0/+94
|
* Use mapfile to only create & parse mapfile strings, not filesW. Trevor King2009-12-081-0/+116