Is it possible to copy a clearcase element with its full history of merges/versions/labels and other meta data? I have tried clearfsimport
but it seams it only copies one version not the full element history.
Asked
Active
Viewed 1,334 times
1

Pablo Jomer
- 9,870
- 11
- 54
- 102
1 Answers
1
clearsimport won't copy history, only import and create one version in a VOB.
Saving everything is generally at the VOB level (like "Moving VOBs").
Moving one element from one vob to another is called relocate.
But copying doesn't seen to exist.
The easiest way is to manage that element in a branch, which allows you to isolate changes from the main branch, while working on the same element.
Note: Brian Cowan adds in the comments:
Relocate with
-update
will clone elements from one location to another without deleting them from the source VOB.
I would not recommend this if both the source and destination VOBs are to be used in the same audited builds as it WILL confuse build audits

VonC
- 1,262,500
- 529
- 4,410
- 5,250
-
I need to copy an element for the purpose of testing scripts that automaticaly handel branch outs and such. The reson I need to copy the entier history is I have scripts that traverse trees and do different opperations on version bubbles. When testing this it alters the history and I need to reset it. How can I do this? – Pablo Jomer Oct 25 '12 at 13:51
-
1@PabloKarlsson Just create a snapshot view and run your test script on it. – VonC Oct 25 '12 at 13:53
-
What is a snapshot view? How can I create it and how do I remove checkouts and checkins? – Pablo Jomer Oct 25 '12 at 14:07
-
@PabloKarlsson are your testing script generate those checkouts? For creating a snapshot view, see http://stackoverflow.com/questions/1207409/proper-cleartool-mkview-for-clearcase-snapshot-view-creation/1207516#1207516 or http://stackoverflow.com/questions/8703648/get-the-error-when-creating-the-view-cleartool-mkview-tag-view-name-view-nam/8704153#8704153. – VonC Oct 25 '12 at 14:26
-
@PabloKarlsson What version of ClearCase are you using? What brand? Base ClearCase, ClearCase with UCM streams? CCRC (remote client)? – VonC Oct 25 '12 at 14:27
-
Hmm that's a tricky question I use a special implementation for Ericsson I think I am not the owner of the vobs. So im not quite sure. – Pablo Jomer Oct 25 '12 at 14:30
-
1@PabloKarlsson do you have access to the ClearCase Explorer, or to `cleartool`? – VonC Oct 25 '12 at 14:31
-
What I would like to do is create some type of temporary view or folder where I can rage havoc destroy everything and then recreate the hole lot from scratch. So I can create automatic tests for checking in checking out and more. – Pablo Jomer Oct 25 '12 at 14:31
-
Im actualy creating java bindings to cleartool atm thats why I need the tests. – Pablo Jomer Oct 25 '12 at 14:33
-
@PabloKarlsson the surest way is to create a snapshot view with mkbranch rule in order to make sure that any checkout required by your scripts are done in their own branch. See as an example of "sub-branching": http://stackoverflow.com/questions/4635607/sub-branching-in-clearcase/4635864#4635864 – VonC Oct 25 '12 at 14:35
-
I think maby its not possible then becuse I know how to branch and checkout the problem I face here is that im actualy recording the clearcase treastructure in java. I have the branches the version the merge arrows and so on. What I want to do Is make sure these things are done acuratley So I need to test them. It's how ever difficult becuse I need the same environment evry time I test and during the tests I modify the clearcase tree. So I need a way to reset it to its original states preferably without branches since branch creation is an event that I might like to test. – Pablo Jomer Oct 25 '12 at 15:31
-
@PabloKarlsson unless you can duplicate a Vob (which "Moving a Vob" does to a certain extent) and register it under another tag in your ClearCase registry, you cannot do *exactly* what you are after, mainly because those tests *modify* the Vob elements. – VonC Oct 25 '12 at 16:32
-
Ok I have tried contacting my superiors to get access to a vob of my own. Hope fully this vill solve the issue. Thnaks for all the help. – Pablo Jomer Oct 28 '12 at 07:25
-
@VonC Relocate with -update will clone elements from one location to another without deleting them from the source VOB. I would not recommend this if both the source and destination VOBs are to be used in the same audited builds as it WILL confuse build audits. – Brian Cowan Jan 16 '20 at 14:24
-
@BrianCowan Thank you for your comment. I have included it in the answer for more visibility. I don't recall having ever used build audit though. – VonC Jan 16 '20 at 14:27