ClearCase Linux Integration

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bgattra
    Visitor
    • Aug 2008
    • 3

    ClearCase Linux Integration

    Anybody try to integrate BC3 with ClearCase for Linux. Since the Linux flavor does not have the map file that Windows ClearCase does, I am assuming that the symbolic links in /opt/Rational/libs/mngr/<file type>/<command> need to be changed.

    If anyone has successfully done this, please let me know what needs to be done to make BC3 the merge/diff tool for Linux ClearCase.
  • Zoë
    Team Scooter
    • Oct 2007
    • 2666

    #2
    We haven't tested it inhouse, but changing the symbolic links is how one of the beta testers mentioned making it work. Just change the xdiff & xmerge links to point towards the bcompare.sh script.
    Zoë P Scooter Software

    Comment

    • bgattra
      Visitor
      • Aug 2008
      • 3

      #3
      I just tried it out using the diff portion in ClearCase. It does open BC3, but BC3 opens the merge tool instead of the diff tool. BC3 then cannot open the files. It seems a file with a mangled name gets opened in the center window, and the files that were supposed to be diffed just don't open (although I see the ClearCase path name above <file>@@<streamVersion>)The Windows version of BC3 works fine in the same operation.

      Comment

      • Aaron
        Team Scooter
        • Oct 2007
        • 15997

        #4
        Does this help?
        A summarized answer from one of our ClearCase users:

        Clearcase for windows :-

        Edit the following file, changing the xcompare and xmerge programs under text file delta to point to beyond compare :-

        C:\Program Files\Rational\ClearCase\lib\mgrs\map


        Clearcase for Linux :-

        As root, Change the xcompare and xmerge symbolic links in the text file delta to point to bcompare :-

        Under : /opt/rational/clearcase/lib/mgrs/text_file_delta

        lrwxrwxrwx 1 root + 25 Apr 16 09:32 xcompare -> /home/rclark/bin/bcompare
        lrwxrwxrwx 1 root + 25 Apr 16 09:32 xmerge -> /home/rclark/bin/bcompare

        Both of these steps will affect everyone who uses the machine. Under Linux, this is more likely to affect multiple users, so it may be best to put a shell script in the way which runs xcleardiff or bcompare based on the existence of an environment variable or similar,
        Aaron P Scooter Software

        Comment

        • bgattra
          Visitor
          • Aug 2008
          • 3

          #5
          I've tried that already for Linux. It does open BC3, but BC3 for Linux seems to have trouble opening versioned files.

          I tried running from the terminal with command line inputs as such:

          bcompare /home/me/workfolder/file@@/stream/2 home/me/workfolder/file@@/stream/3

          BC3 has an error opening the versioned types (same file, different version after the @@). This same scoping works fine on the Windows version of BC3.

          Comment

          • Zoë
            Team Scooter
            • Oct 2007
            • 2666

            #6
            Do you have an enviromental variable set named "CLEARCASE_HOME", or any other ClearCase variables?
            Zoë P Scooter Software

            Comment

            • nsinger
              New User
              • Oct 2008
              • 1

              #7
              I am also experiencing the same issue?
              Could a script be used instead of the xcompare link?

              Comment

              • Zoë
                Team Scooter
                • Oct 2007
                • 2666

                #8
                You can do anything you want in a script first, but it's just going to duplicate what BC already has code for. As I asked previously: if you're running into this, do you have any environmental variables set that begin with CLEARCASE_? BC checks that before enabling it's ClearCase specific behavior.
                Zoë P Scooter Software

                Comment

                • spaceman
                  Visitor
                  • Oct 2009
                  • 7

                  #9
                  Has anyone managed to get this working on linux? If so, can they offer me the necessary incantations?

                  Can someone also please explain the relevence of the CLEARCASE_HOME env? Should I create one, remove it if it exists?

                  Thanks in advance...

                  Comment

                  • Zoë
                    Team Scooter
                    • Oct 2007
                    • 2666

                    #10
                    Hi Spaceman,

                    The directions Aaron posted above were from a customer that got ClearCase running under Linux. BC checks for the CLEARCASE_HOME variable before it enables extra ClearCase handling. If you don't have one you should create it. If you have any other CLEARCASE_* environmental variables let me know and I can add a check for those instead.
                    Zoë P Scooter Software

                    Comment

                    • spaceman
                      Visitor
                      • Oct 2009
                      • 7

                      #11
                      Thanks Craig. My client version was such that no CLEARCASE_HOME variable was created, so I just added one! It now works correctly.

                      Just a point to note. I can understand that you require a mechanism to identify the "mode" BC3 should run in, i.e Clearcase, SVN, etc, but what whould happen if I had a machine on which I needed to do both? Would it not be better to somehow extract information from the parent process that is triggering the BC3 launch? For example, does the parent command line contain the "clear". Just a thought....

                      P.S Been using BC on windows for years....probably the best value for money S/W I have ever bought.... keep it up !!

                      Comment

                      • Zoë
                        Team Scooter
                        • Oct 2007
                        • 2666

                        #12
                        Were there any CLEARCASE_ variables that I can check for already defined? I have to check two different values in Windows, so I don't mind doing the same on Linux.

                        When we detect that ClearCase is installed we handle version-extended paths (@@) differently and parse ClearCase-specific command lines. The behavior is pretty specific, so it shouldn't conflict with Subversion or anything else you're doing. It's mostly disabled in general to avoid problems for people who actually have filenames with @@ in them that aren't ClearCase specific (an unlikely case, I know).
                        Zoë P Scooter Software

                        Comment

                        • spaceman
                          Visitor
                          • Oct 2009
                          • 7

                          #13
                          I see... so it really just to guard against general unexpected behaviour.

                          I had no CLEARCASE_ variables at all... but this is only the Clearcase LT version that handles local snapshot views only. IBM are about to dump this variant anyway, so I wouldn't worry too much!

                          Thanks,

                          Comment

                          Working...