[ReviewBoard] Brand new Clear Case implementation
Review Request #1845 — Created Oct. 19, 2010 and submitted
Fixed: * Removed unnecessary adjust_path function - paths should be well formed from outside * Speed up reading files using Python internal open file instead "cat" command * Function unextend_path implemented by compiled regular expression instead unreadable loop * Removed unnecessary functions copied from subversion implementation * Function normalize_path_for_display return path relative to repository * Name of tool changed to ClearCase * DiffViewer print normalized_path insted ClearCase extended_path * Work also under Windows * Recognize binary files * Make use of HEAD * Return appropriate files as PRE-CREATION * Read OIDs and translate to working paths
Linux: * Tested Windows: * Need tests after changes
Change Summary:
Following sanitize of ClearCase ReviewBoard side implementation.
Description: |
|
|||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 2 (+53 -94) |
Change Summary:
Display normalized path instead ClearCase extended_path
Description: |
|
|||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 4 (+57 -95) |
-
-
reviewboard/diffviewer/diffutils.py (Diff revision 4) I'm not happy for getting scmtool each time in loop. I will be glad show me the way to optimize this part. I also noticed only my changes need to recreate scmtool object (I made one more change half year ago in pygments part). So maybe instead this model should be hacked to return normalized_paths in some cases. I don't know... I'm just thinking loud. I'm also wondering to rename "tool" to "scmtool".
Change Summary:
Fix typo in description
Description: |
|
---|
-
-
reviewboard/scmtools/clearcase.py (Diff revision 5) I'm not 100% convinced that implementation with so complicated regular expression is more readable and easiest to understand then version with loop. I will be appreciated for discussion in this manner.
Change Summary:
* Sanitize syntax of list comprehension * Remove doubled realpath call and join it with os.path.join
Diff: |
Revision 6 (+74 -95) |
---|
-
Awesome, Jan! Glad to see some of this cleaned up. Got some changes to make (mostly stylistic and documentation), and a couple questions. Regarding your TODO entry on get_filenames_in_revision... You can ignore this function. It's from a long, long time ago and isn't even used anymore. I really should get rid of it.
-
-
reviewboard/scmtools/clearcase.py (Diff revision 7) No need to import os.path, since you're already importing os and it brings path with it.
-
-
reviewboard/scmtools/clearcase.py (Diff revision 7) The first line of a doc block should be a very short summary about what it does. Ideally one line. Then, a blank line, and then the rest of the description. The first line of the summary should be on the line containing the """
-
reviewboard/scmtools/clearcase.py (Diff revision 7) For better documentation generation, each indented area should be separated by a blank line, and the preceding text with a ":" should actually do "::". This will tell Sphinx/ReST that the following text should be marked up as monospaced text.
-
-
-
reviewboard/scmtools/clearcase.py (Diff revision 7) Condense this to one statement. return os.path.relpath( ... )
-
-
reviewboard/scmtools/clearcase.py (Diff revision 7) Is there never an equivalent to PRE_CREATION? How are new files marked up?
-
reviewboard/scmtools/clearcase.py (Diff revision 7) Use 'f' instead of 'file', since file is meant to be reserved in Python.
DJ
-
-
reviewboard/diffviewer/diffutils.py (Diff revision 7) I guess you figured out how to change the displayed filename! On the other hand, what's the point in storing the extended path if we don't display it? Why not remove it in post-review?
Description: |
|
---|
Change Summary:
Using cpath instead os.path
Description: |
|
|||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 9 (+80 -100) |
Change Summary:
Fix regular expression to clear ClearCase paths more aggressive. This method can loose some parts of path.
Diff: |
Revision 10 (+80 -100) |
---|
Change Summary:
Please review this implementation. After final fixes I will update documentation and it will be ready to release.
Description: |
|
||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 12 (+157 -120) |
-
Just a few (mostly cosmetic) changes.
-
-
reviewboard/scmtools/clearcase.py (Diff revision 13) Switch these two (we try to keep these alphabetized).
-
reviewboard/scmtools/clearcase.py (Diff revision 13) This looks like it should fit on a single line.
-
-
-
reviewboard/scmtools/clearcase.py (Diff revision 13) Can you make the docstring summary fit on a single line?
-
reviewboard/scmtools/clearcase.py (Diff revision 13) Can you put "cmdline" on the next line, so that all the argument line up?
Change Summary:
Fix multiplatform issues for ClearCase implementation.
Diff: |
Revision 14 (+241 -145) |
---|
-
If I didn't done something stupid it is ready to release for me. I developed it on 1.6beta1 branch but I hope it is possible to backport this stuff into ReviewBoard 1.5.x. This should be backward compatible - but I don't give my head for this. I hope fix will be fast :) I don't like keep my own version of ReviewBoard on branch.