Part 1 of merge r1025:r1064 from release branch into trunk: Some modifications to Repository library
Updated 8 months, 2 weeks ago
| Severin Gehwolf | Reviewers | ||
| trunk | markus_developers | ||
| None | MarkUs Source Code Repository | ||
When I merged the changes from the release_0.5 branch into trunk and ran the unit tests, I got approximately 90 failures/errors. The reason for all these changes are: Get test to pass again. Simplify/Unify repository library configuration. It takes a configuration hash now, when the factory is called (e.g. Repository.get_class("svn", conf)). I also removed the repository_factory.rb file and merged it into repository.rb
Please take your time when looking at it (there are more parts to come) Aside: The diff of my local changes 3000 something lines is probably to big for ReviewBoard. It seg-faults or whatever when trying to create a review with the large diff. Feedback is very welcome!
for this part: lib/repo/test/memory_repository_test.rb lib/repo/test/subversion_repository_test.rb both pass.
Posted 8 months, 3 weeks ago (November 8th, 2009, 4:29 p.m.)
-
trunk/lib/repo/subversion_repository.rb (Diff revision 1) -
Since it is now called with absolute paths to repositories. That's why I use File.basename here now. Mike, hope this is OK. It makes things a lot easier for testing using MemoryRepository.
-
trunk/lib/repo/subversion_repository.rb (Diff revision 1) -
Added the "__" prefix to the class methods, since they shouldn't be called directly...
Posted 8 months, 3 weeks ago (November 8th, 2009, 11:03 p.m.)
I've got really minor critiques below. It's absolutely brilliant - this is huge work, Severin. Great job!
-
trunk/lib/repo/memory_repository.rb (Diff revision 1) -
Yes, this looks wayyy better. :)
-
trunk/lib/repo/repository.rb (Diff revision 1) -
I'd suggest putting those strings into an Array, like this: CONFIG_KEYS = ['REPOSITORY_PERMISSION_FILE', 'IS_REPOSITORY_ADMIN', 'REPOSITORY_STORAGE'] if CONFIG_KEYS.include?(k) @CONF[k.to_sym] = v
-
trunk/lib/repo/subversion_repository.rb (Diff revision 1) -
Who said stuff? It was probably me. :)
-
trunk/lib/repo/subversion_repository.rb (Diff revision 1) -
Yeah, I like Repository.conf way better. Great idea.
-
trunk/lib/repo/subversion_repository.rb (Diff revision 1) -
I'd put spaces on either side of that + for readability.
Posted 8 months, 3 weeks ago (November 9th, 2009, 7:51 a.m.)
-
trunk/lib/repo/repository.rb (Diff revision 1) -
Nice idea, thanks!
Review request changed
Updated 8 months, 3 weeks ago (November 9th, 2009, 11:09 p.m.)
-
- added Diff r2
Changed according to feedback, added some more tests. Fixed defined? problem. It doesn't work for a Hash (if the key does not exist, nil is returned).
