cmd_serve. There's also another, deeper reason why I wanted to do it.Bazaar isn't just a version control system, it's also a very good version control library. It's very easy to figure out, use and test. I'm almost tempted to say "beautiful". In any case, if you're writing a Python library, you should probably copy bzrlib.
Except for bzrlib/builtins.py, which is where all of the built-in commands like "serve" live. For one reason or another, it's full of massive
run() methods. Many of these methods contain logic that plugin authors end up copying and pasting — blech. Hence, refactoring cmd_serve.If you are keen to learn how a version control system works, you could do a lot worse than dive into bzrlib/builtins.py, figure out what a particular command is doing, then refactor that command so the code speaks for itself. There are 64 commands in core Bazaar: get cracking!

1 comments:
IMO its because we conflate UI rendering and UI workflow, in builtins.py. I've thought for a while now that an intermediate layer would help - something containing the program logic that is not about trees/branches/repos/etc.
Post a Comment