| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
$ 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'
...
|
|
|
|
| |
For clearer handling of the "Tried to load but failed" case.
|
| |
|
|
|
|
|
|
| |
The earlier implementation only copied in the currently loaded
properties and the required ones. The new implementation copies
in _all_ the non-default properties.
|
| |
|
|
|
|
| |
Now commands automatically check for storage version compatibility.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|