Fix a few issues with connecting to the legacy ClearCase backend.

Review Request #12305 — Created May 29, 2022 and submitted

Information

RBTools
master

Reviewers

A few bugs slipped in at the last moment which broke posting changes in ClearCase
repositories when using the legacy community-driven ClearCase backend on the server.
This change fixes them up:

  • The return for the diff lines got indented one space too far, which meant we
    were never returning it for the legacy case. This resulted in always getting a
    "there don't seem to be any diffs" error.
  • The backend has diffs_use_absolute_paths=False (by virtue of not changing the
    default). This means that it's expected to send a basedir along with any diffs.
    The old implementation of the repository info structure set the base_path to
    be the vob tag, but this got lost when we redid everything. Since we only need
    this for the legacy implementation, I've made it so we set base_path after we
    negotiate with the server about which backend we're talking to.
  • The filenames listed in the diff header used to contain the vob tag. This of
    course duplicates information which is already present in both the server-side
    configuration of the repository AND the basedir, but not including it in the
    filenames causes the diff parser to hit an infinite loop.

Posted changes against a repository configured with the legacy backend (along
with some changes to that backend which will be coming in a separate review
request).

Summary ID
Fix a few issues with connecting to the legacy ClearCase backend.
A few bugs slipped in at the last moment which broke posting changes in ClearCase repositories when using the legacy community-driven ClearCase backend on the server. This change fixes them up: - The return for the diff lines got indented one space too far, which meant we were never returning it for the legacy case. This resulted in always getting a "there don't seem to be any diffs" error. - The backend has `diffs_use_absolute_paths=False` (by virtue of not changing the default). This means that it's expected to send a basedir along with any diffs. The old implementation of the repository info structure set the `base_path` to be the vob tag, but this got lost when we redid everything. Since we only need this for the legacy implementation, I've made it so we set base_path after we negotiate with the server about which backend we're talking to. - The filenames listed in the diff header used to contain the vob tag. This of course duplicates information which is already present in both the server-side configuration of the repository AND the basedir, but not including it in the filenames causes the diff parser to hit an infinite loop. Testing Done: Posted changes against a repository configured with the legacy backend (along with some changes to that backend which will be coming in a separate review request).
46ea909d1fae88ccf0d631725ea8c158d1af6842
Description From Last Updated

E501 line too long (81 > 79 characters)

reviewbotreviewbot

E501 line too long (81 > 79 characters)

reviewbotreviewbot
Checks run (1 failed, 1 succeeded)
flake8 failed.
JSHint passed.

flake8

david
chipx86
  1. Ship It!
  2. 
      
david
Review request changed
Status:
Completed
Change Summary:
Pushed to release-3.x (073b366)