2

The background is that our company uses clearcase for version control. But our team prefer git. So we created a clearcase git bridge to automatically convert git check in to clearcase check in. (We indeed have a plan to migrate to the pure git, but it's a long way to go.)

Anyway, we created a snapshot view using cleartool, and then configured a git server based on it. So all the clearcase check in were supposed via the snapshot view. The problem was that we wanted to check in to clearcase with different accounts. Then it will not affect the company's clearcase histories. But after looking up the official documents of clearcase, it seems not possible.

In general, the question is as follows. Is it possible to check in with a different account than the account creating the clearcase view?

Or is there any practical idea about the clearcase git bridge? Thanks.

Landys
  • 7,169
  • 3
  • 25
  • 34
  • Yes you can, but I'd ask another question since you plan a bridge: do you mind about auditing? If so, you'd better not to checkin with one account for all users. – Tamir Gefen Aug 28 '14 at 07:35
  • Thanks Gefen. As a SE I never thought about it before. I'll consider it. – Landys Aug 28 '14 at 08:59
  • As a matter of interest, @Landys, what approach did you take in the end? I'm looking at doing precisely the same thing and would love to connect with you and learn from your experience. – Brendan Dec 19 '15 at 09:45
  • 1
    @Brendan I created a git server bundle with scripts to automatically and periodically bridge and synchronize git repository, clear case (cc) view and cc server. You can find it in https://github.com/landys/git-cc-robot. At that time, it's just a demo, but not in practise, due to some management issues. And I have left the company after that, and now they have migrated completely to Git. So I think no one use it now. – Landys Dec 20 '15 at 11:56

2 Answers2

1

ClearCase relies on the OS for username/group authentication, so one way to do so would be to execute the cleartool checkout/checkin as a different user.

That means launching the script as a different user, which is an OS-specific tasks, not a ClearCase feature.
(sudo -u anotherUser on Unix, runas /user:anotherUser on Windows)

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Thanks! It works well, though seems still a problem that we need everyone's password. Anyway, the answer to the question is great. – Landys Aug 28 '14 at 08:55
1

Another option would be to store information about the originating commit as attribute metadata on each version created using cleartool mkattr (documentation).

Something like:

cleartool mkattype –nc –vtype string author
cleartool mkattype –nc –vtype string sha1
cleartool mkattr author \"John Doe\" hello.java@@\main\4
cleartool mkattr sha1 \"6329964d55d6c71ec646dfb8154fe02eae2cf201\" hello.java@@\main\4
Mike Robinet
  • 823
  • 6
  • 19