Book a Demo

Author Topic: Losing information when forgetting to check in?  (Read 4775 times)

Frank Horn

  • EA User
  • **
  • Posts: 535
  • Karma: +1/-0
    • View Profile
Losing information when forgetting to check in?
« on: August 01, 2008, 12:13:44 am »
Sometimes I'm working on a model with nested version controlled packages and forget to check in before I go home. It's not a big issue when these are actually packages nobody else is working on. OK, one should not forget to check in, but it happens.

Usually, when I open my private eap file again in the morning, the packages are still checked out (well, of course they are in a version control sense, but I mean EA still knows they are checked out to me). Once in a while however EA shows them with a lock symbol, i.e. they appear checked in. Maybe EA fails to retrieve the status from the SVN server.

In this case, when I forget that I've forgotten to check in, I try to check out, of course. And then EA retrieves the packages from the server, overwrites the local working copy, overwrites the packages in my local eap file, and all the previous day's work is lost.

I think when EA cannot determine whether an xml file in the local working copy is checked out, it should show this instead of simply showing the package as though it was checked in.

I can't reproduce it though. Happened to me today for the second time, but I've no idea how to provoke it.

HowardB

  • EA Administrator
  • EA User
  • *****
  • Posts: 55
  • Karma: +0/-0
  • I love YaBBies!
    • View Profile
Re: Losing information when forgetting to check in
« Reply #1 on: August 12, 2008, 06:08:46 pm »
Hello Frank,

The only way that EA can retrieve the package file from the SVN server and import it, is if there is no lock on the file in the SVN repository.

If you are not connected to the server, then the file status query that occurs when building the Package Control menu will fail, with an error message.  If you got past that, the "checkout" operation would fail with an error message.  The import would not happen!

If you were connected to the server, then the file status should be reported as locked by you and the menu item "check-out", should be disabled.

When EA constructs the Package Control menu, it queries SVN for the file status.  If there is no connection to the server, you will see an error message at this stage.  If there is a connection, then the Check-in and Check-out menu items are enabled and disabled in accordance with who holds a lock on this file.  If you checked-out a package, it should be locked by you.  If the file is not locked by you, it will be shown as VC-locked and the check-out menu item will be enabled.

If you have left a package checked-out to yourself, then the only way that you will see this "VC locked" package icon and have the check-out menu item enabled when you re-open a model the next day, is when another user has broken or stolen the lock from you, using Subversion directly, and then subsequently released the lock.

There is some fine print in the EA User Guide that says, "we strongly urge you not to directly manipulate EA's version controlled package files, outside of EA."  This is the reason for that fine print.

If you find that this is the cause of this problem and you realise that a package is checked-in, when it should be check-out to you, it is possible to use Subversion directly to put the package file back into the correct state and then reload the package from the model database (as opposed to reloading from the package XMI file) to refresh the package icon.  (Right-click - "Contents | Reload package")

At this point the package will be shown as "checked-out" to you and you can subsequently "check-in" the previous days modifications.

You can also use the command "Compare with version on disk" to show the differences between what is in your model and what is in the HEAD revision in version control.


I hope this helps.


best regards,
Howard Britten.

Frank Horn

  • EA User
  • **
  • Posts: 535
  • Karma: +1/-0
    • View Profile
Re: Losing information when forgetting to check in
« Reply #2 on: August 18, 2008, 04:54:48 pm »
Howard,

according to what you say the thing I described should never happen unless the lock on the xml file for a controlled package has been released from outside EA. In this case it does happen indeed, as I just verified.

Anyway I'm sure it happened without the lock being released, but so far I've no idea how to reproduce it. If I ever find out, I'll post it.

Frank