Merge lp:~jml/testrepository/load-implies-init into lp:~testrepository/testrepository/trunk
Status: | Merged | ||||||||
---|---|---|---|---|---|---|---|---|---|
Merged at revision: | 134 | ||||||||
Proposed branch: | lp:~jml/testrepository/load-implies-init | ||||||||
Merge into: | lp:~testrepository/testrepository/trunk | ||||||||
Diff against target: |
85 lines (+39/-2) 2 files modified
testrepository/commands/load.py (+12/-1) testrepository/tests/commands/test_load.py (+27/-1) |
||||||||
To merge this branch: | bzr merge lp:~jml/testrepository/load-implies-init | ||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Robert Collins | Needs Information | ||
Review via email:
|
Description of the change
I keep being bugged by having to run "testr init" every time I make a new branch. So I've fixed the bug.
The branch does this by modifying the interface to RepositoryFactory, requiring it to raise RepositoryNotFound when it cannot find a repository at the given URL. The branch adds the new exception type and tests for the interface, and then modifies the file and memory repositories to provide the interface correctly.
The upshot of this change is that bug 530010 gets fixed automatically. Which is nice.
The branch then adds a new test for the 'load' command to show that it tries to open a repository and then initializes[1] the repository if it is not found.
[1] Following OED preferred spelling.
I'm really torn on this. I like the potential improvements in repository error output (especially if we use exception chaining or some such).
However, auto-initialising a repo really rubs me badly.
How would you feel if I merged all but the last revision?