-
-
-
No point in having a class here. The module suffices. Every function in here should just be a top-level function, and all import sites should import the specific functions needed.
-
Is this used? How about the other functions? Let's only put in here what we need for this specific change. I suspect most of these we won't want to keep anyway.
-
-
-
-
I don't think we should do the util thing. At some point we'll want to clean up the SCMClients so that some of the functions they otherwise call from util will go through another mechanism, but I don't want util there in the meantime.
-
-
-
-
-
-
-
-
-
-
-
-
-
This is maybe not the right name for this, since what we're doing is scanning for the appropriate client giving a checkout. Instead, maybe call this "scan_usable_client". I feel there should be a better name, but I can't think of it right now.
-
These should probably not be here. This function is intended to get the client, in a working state, not validate options. That should be elsewhere. In fact, ideally, SCMClient would have a validate_options function that does this, and we can just pass the options (in postreview) to this.
-
-
-
-
-
-
-
-
This leads to too much to type. It should always be a "from * import *". I'll have some suggestions below about what we're importing.
-
< 80 chars. For multi-line if statements, wrap in the form of: if (foo and bar and baz): Also, I know it was this way before, but can you make this: If (DEBUG or (options and options.debug): ?
-
-
-
Pull out code of SCM clients from postreview into separate files
Review Request #2399 — Created June 14, 2011 and submitted
As the preliminary step for releasing 'api' branch SCM clients code from postreviews is pulled out into rbtools/clients/*. In the future those clients should be merged with ones from 'api', for now it lets us separate theirs code and hence simplify maintaining of 'api' clients up-to-date with master's. git history is at http://github.com/mbait/rbtools/tree/new-clients
rbtools/tests.py passes all tests except two suspicious which fail on master and perhaps should be reviewed
Description | From | Last Updated |
---|---|---|
Two blank lines. |
chipx86 | |
Can you change this to logging.error? |
chipx86 | |
Not your fault, but while you're here, "Repository's" |
chipx86 | |
Can you fix this indentation? |
chipx86 | |
I think the contents of this file should also go in clients/__init__.py. That way, clients is the base module for … |
chipx86 | |
logging.error |
chipx86 | |
logging.info |
chipx86 | |
The first rbtools.clients should be grouped with the others, in alphabetical order. |
chipx86 | |
This should go before the others. Shallow depth first. |
chipx86 | |
Import only what you need. |
chipx86 | |
Actually, importing a global is kinda bad. Instead, I'd add a new clean_tempfiles function in rbtools.utils.files, which die() can call. |
chipx86 | |
Should be two blank lines before this, rather than one. |
chipx86 | |
So this will actually set the local variable and not the global one. Did you test post-review after this change? … |
chipx86 | |
Same here. All other files too. |
chipx86 | |
RepositoryInfo moved, so this shouldn't still work. Make sure you've deleted the client.pyc file and re-run both pyflakes and the … |
chipx86 | |
Two blank lines. |
chipx86 |
- Change Summary:
-
Met review notes.
- Description:
-
As the preliminary step for releasing 'api' branch SCM clients code from postreviews is pulled out into rbtools/clients/*. In the future those clients should be merged with ones from 'api', for now it lets us separate theirs code and hence simplify maintaining of 'api' clients up-to-date with master's.
~ git history is at http://github.com/mbait/rbtools/tree/update-clients
~ git history is at http://github.com/mbait/rbtools/tree/new-clients
-
This is looking great! A few small things left. A couple things I just want to check. These are up-to-date with the clients on master, right? (I don't believe we've touched them since you started, just want to make sure you synced them when you did). Also, is pyflakes still happy?
-
-
-
-
-
I think the contents of this file should also go in clients/__init__.py. That way, clients is the base module for what you need to make a client, rather than it being a sub-module of it.
-
-
-
-
-
-
I would import postreview above. from rbtools import postreview Then it's just a matter of accessing postreview.options.
-
-
- Change Summary:
-
Pull global options through to SCM clients constructors, mark SCMCLIENTS global in local scope, style cleanup.
-
This looks good but no longer applies. I think some changes were submitted the Subversion the other day. Can you make sure those are applied and then merge with master?