Add support for VersionVault
Review Request #11582 — Created April 7, 2021 and submitted
We will soon be adding a new SCMTool implementation to Power Pack to connect to
HCL VersionVault and IBM ClearCase, supplanting the old community-driven
ClearCase support. This change adds RBTools-side support for this.This is based on code delivered to us in partnership with HCL, but has had
significant changes. The largest change is that instead of having a completely
separate SCMClient implementation in RBTools, this is built into the same
ClearCase client. Most of the code paths are the same between the two types of
backends, and the major difference is that the diff output for VersionVault
includes additional information in the headers (the VOB OID for each changed
element, and a JSON-encoded blob to drop into the FileDiff's extra_data in order
to do better post-processing on the diff display).There's still more to do for unit testing but functionality should be
relatively complete at this point.
- Posted changes from the current checkout (rbt post with no args) including
new, modified, deleted, renamed, and binary files. - Posted changes that spanned multiple VOBs.
- Posted a change that spanned multiple VOBs, including one that was not
configured as part of the server-side repository. Saw expected
warning. - Posted changes for UCM activities for both a single and multiple
revisions. - Ran unit tests.
Summary | ID |
---|---|
59075254cdddca197daf45ba385804472eb78471 |
Description | From | Last Updated |
---|---|---|
E501 line too long (81 > 79 characters) |
reviewbot | |
E722 do not use bare except' |
reviewbot | |
, optional? |
chipx86 | |
F401 'rbtools.api.errors.AuthorizationError' imported but unused |
reviewbot | |
Blank line after class docstring. |
chipx86 | |
These are so close. Can we build up the cmdline based on self.label and then pass in to execute()? |
chipx86 | |
Should be is_ucm. |
chipx86 | |
Can you specify explicitly which is which? |
chipx86 | |
Can you update this to point to the full class path? |
chipx86 | |
E501 line too long (81 > 79 characters) |
reviewbot | |
I think we can just use os.pathsep for this, which is for things like $PATH. Same with the earlier usage … |
chipx86 | |
Is Qp part of this? |
chipx86 | |
These are pretty close. Can we build up a cmdline and then pass it to execute()? |
chipx86 | |
F821 undefined name 're' |
reviewbot | |
Let's compile the regex right before and then reuse that. I don't think we need the [ and ] though. |
chipx86 | |
You can pass a tuple of choices here. |
chipx86 | |
You can use os.pathsep here too. Kinda wonder if we should predefine constants for the environment variables on the class … |
chipx86 | |
Given how simple this logic is, how about just: if label != 'LATEST' and not self._is_a_label(label, tag): labels_present = False |
chipx86 | |
Small nit, but mind alphabetizing these? We also build the string twice. Might as well do it once and then … |
chipx86 | |
We can just pass split_lines=True to execute(). |
chipx86 | |
F821 undefined name 're' |
reviewbot | |
Just to check, are we splitting on \s, :, or @? Or on \s:@? The [] will give us the … |
chipx86 | |
Instead of setting twice, maybe have the second do: extra_data['new'] = extra_data['old'].copy() |
chipx86 | |
No need for , None on these. |
chipx86 | |
E722 do not use bare except' |
reviewbot | |
E201 whitespace after '{' |
reviewbot | |
E202 whitespace before '}' |
reviewbot | |
E272 multiple spaces before keyword |
reviewbot | |
E272 multiple spaces before keyword |
reviewbot | |
F841 local variable 'CLEARCASE_PN' is assigned to but never used |
reviewbot | |
F841 local variable 'commmand' is assigned to but never used |
reviewbot | |
F821 undefined name 'command' |
reviewbot | |
E501 line too long (91 > 79 characters) |
reviewbot | |
E501 line too long (97 > 79 characters) |
reviewbot | |
E501 line too long (97 > 79 characters) |
reviewbot | |
E501 line too long (109 > 79 characters) |
reviewbot | |
E501 line too long (107 > 79 characters) |
reviewbot | |
E501 line too long (115 > 79 characters) |
reviewbot | |
E201 whitespace after '{' |
reviewbot | |
E202 whitespace before '}' |
reviewbot | |
E501 line too long (91 > 79 characters) |
reviewbot | |
E501 line too long (97 > 79 characters) |
reviewbot | |
E501 line too long (97 > 79 characters) |
reviewbot | |
E501 line too long (107 > 79 characters) |
reviewbot | |
E201 whitespace after '{' |
reviewbot | |
E202 whitespace before '}' |
reviewbot | |
F811 redefinition of unused 'test_get_repository_info_dynamic' from line 107 |
reviewbot | |
E501 line too long (84 > 79 characters) |
reviewbot | |
E501 line too long (91 > 79 characters) |
reviewbot | |
E501 line too long (97 > 79 characters) |
reviewbot | |
E501 line too long (97 > 79 characters) |
reviewbot | |
E501 line too long (107 > 79 characters) |
reviewbot | |
E201 whitespace after '{' |
reviewbot | |
E202 whitespace before '}' |
reviewbot | |
E501 line too long (84 > 79 characters) |
reviewbot | |
E501 line too long (91 > 79 characters) |
reviewbot | |
E501 line too long (97 > 79 characters) |
reviewbot | |
E501 line too long (97 > 79 characters) |
reviewbot | |
E501 line too long (107 > 79 characters) |
reviewbot | |
E131 continuation line unaligned for hanging indent |
reviewbot | |
E201 whitespace after '{' |
reviewbot | |
E202 whitespace before '}' |
reviewbot | |
Probably should be , optional. |
chipx86 | |
The common part was split out, but these are overriding instead of appending to it. |
chipx86 | |
No blank line here. |
chipx86 | |
Typo: "becaue" -> "because" |
chipx86 | |
To ensure doc building works right, the format: should be format::. This will turn this into a code block. |
chipx86 | |
I have no idea if it's faster or not, but we can probably just have this be: if '%s/' % … |
chipx86 | |
Is "base clearcase" correct? Drawing a blank on the term. Is this just IBM ClearCase? |
chipx86 | |
Can we update these to use the formal capitalization of these names? |
chipx86 | |
Small nit: Alphabetical order? |
chipx86 | |
E303 too many blank lines (2) |
reviewbot | |
E501 line too long (89 > 79 characters) |
reviewbot | |
F401 'json' imported but unused |
reviewbot | |
E501 line too long (80 > 79 characters) |
reviewbot | |
E501 line too long (81 > 79 characters) |
reviewbot | |
E501 line too long (80 > 79 characters) |
reviewbot | |
E501 line too long (81 > 79 characters) |
reviewbot | |
F841 local variable 'diffx_file' is assigned to but never used |
reviewbot | |
F841 local variable 'file_split_re' is assigned to but never used |
reviewbot | |
E501 line too long (81 > 79 characters) |
reviewbot | |
E501 line too long (81 > 79 characters) |
reviewbot | |
Given how old this is, let's nuke it and instead put 3.0, and mention the new support. |
chipx86 | |
Definitions generally go at the bottom of the section (the rest of our docs do this). |
chipx86 | |
The "3.0" has to be on the next line for section parsing to consider this correctly. |
chipx86 | |
Can you add "Version Added"? |
chipx86 | |
I don't know what's really correct, but historically we've put __init__ before @properties. We should probably err on the side … |
chipx86 | |
Minor thing, but should these have quotes around the examples? |
chipx86 | |
Maybe double backticks around teh <...> bits? |
chipx86 | |
"a was removed" -> "was removed" |
chipx86 | |
This isn't true anymore, right? Given the docs in the function. |
chipx86 | |
Is there supposed to be a trailing comma on -predecessor? |
chipx86 | |
Can we maek this a standard private function? I feel like this doesn't really need to be inline like this. |
chipx86 | |
These could be combined. |
chipx86 | |
"Return ..." better describes what this is doing. |
chipx86 | |
Given that we never really need i, this can probably just be a standard for f in files. |
chipx86 | |
Same as above. |
chipx86 | |
Same as above. |
chipx86 | |
This is repeated a lot. How about building the base command line outside the loop, then just do cmdline + … |
chipx86 | |
Just to check, is the extra space on the 3rd line here intentional? It shows up on the other examples … |
chipx86 | |
E265 block comment should start with '# ' |
reviewbot | |
F821 undefined name '_get_content_snapshot' |
reviewbot | |
F821 undefined name '_get_content_snapshot' |
reviewbot | |
E303 too many blank lines (2) |
reviewbot | |
F821 undefined name 'i' |
reviewbot |
- Summary:
-
WIP integrating ClearCase/VersionVault[WIP] Add support for VersionVault
- Description:
-
~ WIP integrating ClearCase/VersionVault
~ We will soon be adding a new SCMTool implementation to Power Pack to connect to
+ HCL VersionVault and IBM ClearCase, supplanting the old community-driven + ClearCase support. This change adds RBTools-side support for this. + + This is based on code delivered to us in partnership with HCL, but has had
+ significant changes. The largest change is that instead of having a completely + separate SCMClient implementation in RBTools, this is built into the same + ClearCase client. Most of the code paths are the same between the two types of + backends, and the major difference is that the diff output for VersionVault + includes additional information in the headers (the VOB OID for each changed + element, and a JSON-encoded blob to drop into the FileDiff's extra_data in order + to do better post-processing on the diff display). + + There's still significant testing (manual and automatic) and documentation work
+ to do on this, hence the WIP. - Commits:
-
Summary ID 21e833e925330f4744519f9589a302558eb1c157 10b83aad42568cb813f7e55e9f64c0224e329945
Checks run (1 failed, 1 succeeded)
flake8
-
-
-
-
-
-
-
-
I think we can just use
os.pathsep
for this, which is for things like$PATH
.Same with the earlier usage as well.
-
-
-
-
-
You can use
os.pathsep
here too.Kinda wonder if we should predefine constants for the environment variables on the class on first use or something, cut down on the conditionals further. Super not important, but just a food-for-thought thing.
-
Given how simple this logic is, how about just:
if label != 'LATEST' and not self._is_a_label(label, tag): labels_present = False
-
Small nit, but mind alphabetizing these?
We also build the string twice. Might as well do it once and then set.
-
-
-
-
- Change Summary:
-
Continued progress
- Commits:
-
Summary ID 10b83aad42568cb813f7e55e9f64c0224e329945 e31e376b3d67b0c5ee8306cb42f2d2df37e47c7f
Checks run (1 failed, 1 succeeded)
flake8
-
Warning: Showing 30 of 38 failures.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Change Summary:
-
Review Bot
- Commits:
-
Summary ID e31e376b3d67b0c5ee8306cb42f2d2df37e47c7f 86aeec0ffda74cbad866091290f4e730f50c3c90
- Change Summary:
-
More Review Bot
- Commits:
-
Summary ID 86aeec0ffda74cbad866091290f4e730f50c3c90 e7c9d00f53deb081be659b1e91ffff1a187b53ec
Checks run (2 succeeded)
- Change Summary:
-
- Fix up revision handling and parsing for UCM activities.
- Add multi-vob support for activities.
- Add new handling for checked-out files inside the current activity.
- Fix directory element skipping when using dynamic views.
- Commits:
-
Summary ID e7c9d00f53deb081be659b1e91ffff1a187b53ec 28a2ed0bccb82093911f4374be8c119e2fd4dd7f
Checks run (2 succeeded)
- Change Summary:
-
- Simplify branch name parsing when posting a stream.
- Skip adding upmodified files to the diff (but print a warning).
- Commits:
-
Summary ID 28a2ed0bccb82093911f4374be8c119e2fd4dd7f 7e306ed82845f0d5b69d792163c4c3abd9d9aa11
Checks run (2 succeeded)
-
This is looking great. A few small things.
-
-
-
-
-
To ensure doc building works right, the
format:
should beformat::
. This will turn this into a code block. -
I have no idea if it's faster or not, but we can probably just have this be:
if '%s/' % tag in path: break
-
Purely a suggestion, and not important for this change: Might be nice to have a
_run_cleartool()
command or something that takes the vobs or other things we need and builds them in a platform-dependent way in one place, so we can consolidate this sort of logic.The environment variable constants we define elsewhere could maybe be done on a class level.
-
-
-
- Change Summary:
-
- Add in documentation for various posting modes.
- Fix for when /main/1 has been
rmver
ed. - Fix for finding the correct predecessor version in a UCM activity when revisions have been
rmver
ed. - Fix up various comments and other minor things.
- Summary:
-
[WIP] Add support for VersionVaultAdd support for VersionVault
- Description:
-
We will soon be adding a new SCMTool implementation to Power Pack to connect to
HCL VersionVault and IBM ClearCase, supplanting the old community-driven ClearCase support. This change adds RBTools-side support for this. This is based on code delivered to us in partnership with HCL, but has had
significant changes. The largest change is that instead of having a completely separate SCMClient implementation in RBTools, this is built into the same ClearCase client. Most of the code paths are the same between the two types of backends, and the major difference is that the diff output for VersionVault includes additional information in the headers (the VOB OID for each changed element, and a JSON-encoded blob to drop into the FileDiff's extra_data in order to do better post-processing on the diff display). - - There's still significant testing (manual and automatic) and documentation work
- to do on this, hence the WIP. - Testing Done:
-
+ - Posted changes from the current checkout (rbt post with no args) including
new, modified, deleted, and binary files.
+ - Posted changes that spanned multiple VOBs.
+ - Posted a change that spanned multiple VOBs, including one that was not
configured as part of the server-side repository. Saw expected
warning.
+ - Posted changes for UCM activities for both a single and multiple
revisions.
+ + More testing to come.
- Posted changes from the current checkout (rbt post with no args) including
- Commits:
-
Summary ID 7e306ed82845f0d5b69d792163c4c3abd9d9aa11 bde4a7bc0ef4d2ecda01082b8c934e2a573cf5b6
- Commits:
-
Summary ID bde4a7bc0ef4d2ecda01082b8c934e2a573cf5b6 a64891d4216d0679c58dd1004f88618d5d48d295
Checks run (2 succeeded)
- Change Summary:
-
- Switch to DiffX
- Add support for renamed and deleted files
- Lots of bugfixing and cleanup
- Description:
-
We will soon be adding a new SCMTool implementation to Power Pack to connect to
HCL VersionVault and IBM ClearCase, supplanting the old community-driven ClearCase support. This change adds RBTools-side support for this. This is based on code delivered to us in partnership with HCL, but has had
significant changes. The largest change is that instead of having a completely separate SCMClient implementation in RBTools, this is built into the same ClearCase client. Most of the code paths are the same between the two types of backends, and the major difference is that the diff output for VersionVault includes additional information in the headers (the VOB OID for each changed element, and a JSON-encoded blob to drop into the FileDiff's extra_data in order to do better post-processing on the diff display). + + There's still more to do for unit testing but functionality should be
+ relatively complete at this point. - Testing Done:
-
~ - Posted changes from the current checkout (rbt post with no args) including
new, modified, deleted, and binary files.
~ - Posted changes from the current checkout (rbt post with no args) including
new, modified, deleted, renamed, and binary files.
- Posted changes that spanned multiple VOBs.
- Posted a change that spanned multiple VOBs, including one that was not
configured as part of the server-side repository. Saw expected
warning.
- Posted changes for UCM activities for both a single and multiple
revisions.
~ ~ - Ran unit tests.
- More testing to come.
- Posted changes from the current checkout (rbt post with no args) including
- Commits:
-
Summary ID a64891d4216d0679c58dd1004f88618d5d48d295 b9e115117fdd860fa9ce143bcfe611eab5e7643e
Checks run (1 failed, 1 succeeded)
flake8
- Change Summary:
-
ReviewBot
- Commits:
-
Summary ID b9e115117fdd860fa9ce143bcfe611eab5e7643e f81650abb73d868ea522905bd3aaae38493eebdf
Checks run (2 succeeded)
-
-
-
-
I don't know what's really correct, but historically we've put
__init__
before@properties
. We should probably err on the side of consistency. -
-
-
-
-
Can we maek this a standard private function? I feel like this doesn't really need to be inline like this.
-
-
-
-
-
This is repeated a lot. How about building the base command line outside the loop, then just do
cmdline + [old_file]
(etc)? -
Just to check, is the extra space on the 3rd line here intentional? It shows up on the other examples below as well.
- Commits:
-
Summary ID f81650abb73d868ea522905bd3aaae38493eebdf 2471c774ee43c7e8aa3ecad97bb8f388b9cc3a5a
- Commits:
-
Summary ID 2471c774ee43c7e8aa3ecad97bb8f388b9cc3a5a f6f6a0a273e9b710c22650ec0611d1f07ba1a6cf