-
-
-
-
-
How do clearcase views work? Is this an okay assumption to make? What if the Review Board server is talking to multiple clearcase servers?
-
-
-
-
This should all be removed as well. In fact, this whole function should go away so the default SCMClient implementation can be used to determine the server based on config files.
-
-
-
-
Shame the unc path code doesn't exist on non-Windows installs of Python... It would be nice to add comments explaining what's going on here a bit. I have to wonder, though.. Since we're already converting "/" to "\", why not make sure we're using "/" first and then do: s = os.path.normpath(s) s = s.replace("/", "\\")
-
-
-
-
-
-
-
-
-
-
-
Too many spaces after the "=". Also, there's no reason to special-case these on platforms. The code's the same.
-
-
-
-
-
-
-
-
-
-
Only one blank line. Same with other things below. I recommend going through and making sure you're not adding condensed lines.
-
Better as: return [line.rstrip("\r\n") + "\n" for line in data] How necessary is this, though? We should handle line endings in Review Board natively. I'd be a little concerned with doing this in this code.
-
I'm really worried about this causing regressions. Especially when it's perfectly valid for a file to have multiple newlines at the end, and this is assuming we'll only have one. Not to mention that I'm not even sure we'd have any \r\n anyway, given the previous lines. What's the rationale for this?
-
We can't have any SCMTool-specific code in this file. This logic will have to be done in the SCMTool somehow.
-
-
-
This shouldn't be in this change. If you absolutely need debugging, use the standard Python logging support, with a log level of DEBUG.
-
-
-
What's the purpose of this? I noticed you're trying to use it in common code, but it should only ever be used internally. I have a hunch you really want to use os.path stuff for this.
-
-
What's the purpose of the str assignment? And some documentation for the function would be nice, because the name is ambiguous (and doesn't follow the same naming style as other functions).
-
-
-
-
-
-
-
Clearcase module with post-review support
Review Request #653 — Created Dec. 1, 2008 and submitted
Another clearcase integration module with post-review support. It supports windows, linux and cygwin environments, and both snapshot and dynamic views. The module depends on a mounted view on the reviewboard server. It is capable of submit reviews for checked out and checked in elements.
Submitted reviews on linux, windows and cygwin using snapshot and dynamic views.
D.
- Change Summary:
-
I made most of the requested changes. I tried to eliminate as much as possible the platform-dependent choices. I fixed the blank lines, comments and line breaks. There is a couple of debug statements that will be removed on the next review. Most of the changes were on the post-review tool. I couldn't address the diffutils problem yet. I may need some suggestions in this case.
D.
- Change Summary:
-
1 - Simplified the code. 2 - Label submission will search the vobs for the files; 3 - Fixed some path normalization issues; 4 - Removed regexes on the scmtools/clearcase.py;
-
These comments are mostly stylistic issues:
-
-
-
Instead of defining so many variables here, just do: curr_version, pre_version = execute(...).split('\n')
-
-
-
-
A few style issues here. I think this would be much clearer written as: bpath = vkey[:vkey.rfind('vobs') + 4] fpath = vkey[vkey.rfind('vobs') + 5:]
-
-
-
-
-
-
-
-
-
-
-
-
Formatting is a bit odd here. Can you write it like this? if (self.viewtype == 'snapshot' and (sys.platform.startswith('win') or sys.platform.startswith('cygwin'))): ...
-
-
-
-
D.
- Change Summary:
-
Implemented David's suggestions/fixes and ported the changed to the latest post-review from the server.