Book a Demo

Author Topic: EA and Clearcase - undo checkout  (Read 5599 times)

EaUser111

  • EA Novice
  • *
  • Posts: 14
  • Karma: +0/-0
    • View Profile
EA and Clearcase - undo checkout
« on: June 17, 2013, 08:18:22 pm »
Hello everybody,

in my company we use EA with Clearcase. We perform version control per package as is supported by EA.

Recently, I did an undo checkout of a package under the assumption that EA would create .keep files with the current - not yet checked in - state of the package. I checked again that EA creates .keep files when I perform "undo checkout". It does.
However, it turned out that the contents of the .keep file is not the current state of the package but exactly the state that Clearcase has gone back to, i.e. the last state that was checked in. Of course, done this way, this functionality is absolutely useless.

I think a .keep file created with "undo checkout" should contain the modified state of the package before it was reverted to the last checked in state. And that's the way CC does it when I perform this operation on windows level.

Or perhaps someone can clear up any misconception that I might have on this feature of EA.

Thorsten

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: EA and Clearcase - undo checkout
« Reply #1 on: June 17, 2013, 08:49:14 pm »
Thorsten,

I think that is exactly what it is supposed to do, and what all version control system mean by "undo checkout".

Suppose you have a file in a state A1.
You check-in the file in state A1, so now the VC repository contains A1.
Then you checkout the file and start working on on.
This creates the file in state A2 on your local working folder.
If you now check-in that file then the VC repository has state A2.
If you undo checkout, you return to the previous state A1.

If don't see how you expect to somehow keep status A2 and still want to do an undo checkout?

Geert

EaUser111

  • EA Novice
  • *
  • Posts: 14
  • Karma: +0/-0
    • View Profile
Re: EA and Clearcase - undo checkout
« Reply #2 on: June 17, 2013, 10:37:44 pm »
Geert,

you are of course right with your description. However, that is not the case which I was trying to describe.
I am not checking my changes in, so A2 is just in my local working folder.
When I now order EA to do an "undo checkout" it - correctly - reverts to state A1.
In such a case, CC used on the file sytem will offer to create a .keep file (adding ".keep" as extension to the file name and putting it into the local working folder) which contains the state A2 as far as I worked on it in my local working folder. At least that's what CC does in Windows if I perform the actions on the file system. That's a feature of some use.
EA does not ask but always instructs CC to create the .keep file. BUT, the contents of the .keep file is A1, the state that has just been reverted to and which is present anyway. The expected contents is A2.

I hope I could make myself understood a little better now.

Thorsten

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: EA and Clearcase - undo checkout
« Reply #3 on: June 17, 2013, 11:12:41 pm »
So CC automatically "shelves" your local changes, whereas EA "shelves" the already checked in version.

OK I see why you are saying that this is useless. There indeed no point in "shelving" something that has already been checked-in.

Geert

EaUser111

  • EA Novice
  • *
  • Posts: 14
  • Karma: +0/-0
    • View Profile
Re: EA and Clearcase - undo checkout
« Reply #4 on: June 17, 2013, 11:23:23 pm »
Exactly. I have no idea if the .keep file mechanism is a feature implemented in EA or if it is EA somehow instructing CC to do it. Usage of the extension .keep may indicate that the latter is the case.

Thorsten

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: EA and Clearcase - undo checkout
« Reply #5 on: June 17, 2013, 11:36:38 pm »
I'm guessing that this was never intentionally implemented by EA.
Normally when doing an undo checkout they just get the package in EA and import the previous version of the xmi file.

Which at that moment is the file in your working directory.
Co I'm guessing CC is doing the .keep stuff, thinking that the xmi file in your working directory is in fact your current work. But of course it isn't. the current state of your work in in the EA model, and will only be reflected in the xmi file once you export the package to xmi.

Seems logical for me now.

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: EA and Clearcase - undo checkout
« Reply #6 on: June 17, 2013, 11:52:13 pm »
The .keep files are a CC feature and eventually useful with source code.

q.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: EA and Clearcase - undo checkout
« Reply #7 on: June 18, 2013, 08:44:07 am »
Geert, absolutely spot on.

If you want to make it work that way you could probably export the file before doing an undo-checkout. If this is the workflow that you need, it would be scriptable. The main downside of it is that, you'd find that the operation would take roughly twice as long. (ie. Export model data then import model data.)
« Last Edit: June 18, 2013, 08:48:26 am by simonm »

EaUser111

  • EA Novice
  • *
  • Posts: 14
  • Karma: +0/-0
    • View Profile
Re: EA and Clearcase - undo checkout
« Reply #8 on: June 18, 2013, 04:58:22 pm »
Thanks a lot for the responses.

@Geert:
I see. I wasn't aware of that. Indeed, the behaviour is pretty clear now. My conclusion: forget about the .keep files since EA's way of working renders this CC feature meaningless. If I want to keep some work that I have done but do undo checkout, I'd have to export the package containing that work.

@qwerty:
The .keep files are not only useful for source code. They could have been of use in this case as well. With a bit of fiddling around, in fact I would have had a good use for it. As it turned out, I just had to redo some of the work I had already done  :(.

If possible, I would suggest that EA disables creation of .keep files through configuration of CC, since they are of no use with EA. That would eliminate a source of potential misconceptions.