aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/storage/util/upgrade.py
Commit message (Collapse)AuthorAgeFilesLines
* 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: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: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.
* Ran update-copyright.py.W. Trevor King2012-10-161-1/+1
|
* storage:util:mapfile: convert YAML settings to JSON.W. Trevor King2012-09-171-14/+120
| | | | | | | | | 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-161-10/+10
|
* Run update_copyright.py.W. Trevor King2011-05-251-1/+2
|
* Bumped to version 1.0.01.0.0Chris Ball2011-01-081-1/+1
|
* Ran update_copyright.pyW. Trevor King2010-06-221-12/+14
|
* Updated copyright informationW. Trevor King2010-01-011-1/+1
|
* 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-151-18/+18
| | | | | | | | | | | | | | | | | | | | | 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.
* Converted libbe.storage.vcs.base to new Storage format.W. Trevor King2009-12-131-0/+242