Can a Version Control lock be released?

435 views
Skip to first unread message

shimon

unread,
May 11, 2014, 7:34:00 AM5/11/14
to sparx-enterprise-archite...@googlegroups.com
Using the security within EA, I eas able to release locks of other users. I want to implement Version Control using SVN, but I find no way of releasing a user's lock even if I steal the locks within SVN.
I can write and check in the XMI file that is related to that Package, but within EA it is still locked by the user that checked it out.
Is there no way for an adminitratir to release a lock of a user?

[original message]

qwerty

unread,
May 11, 2014, 4:52:00 PM5/11/14
to sparx-enterprise-archite...@googlegroups.com
IIRC the VC / Synch is the only way to get rid of it (after having released the lock with native VC methods).

q.

[original message]

M@localhost Simon M

unread,
May 12, 2014, 8:05:00 AM5/12/14
to sparx-enterprise-archite...@googlegroups.com
There is a manage locks permission and associated dialog that allows releasing locks owned by other people.
[original message]

shimon

unread,
May 12, 2014, 7:27:00 AM5/12/14
to sparx-enterprise-archite...@googlegroups.com

22383C3E3F3C510 wrote:
There is a manage locks permission and associated dialog that allows releasing locks owned by other people.



I know about that, but that can only be used if the EA security is being used, not if you're using Version Control.
[original message]

Ortmann@localhost Helmut Ortmann

unread,
May 12, 2014, 7:33:00 AM5/12/14
to sparx-enterprise-archite...@googlegroups.com
Try:
Package Control,
Re-synch Status with VC provider

Helmut

[original message]

shimon

unread,
May 12, 2014, 7:39:00 AM5/12/14
to sparx-enterprise-archite...@googlegroups.com

686E7C6B6D60190 wrote:
IIRC the VC / Synch is the only way to get rid of it (after having released the lock with native VC methods).

q.



This is not enough, as in the EA repository it is still locked. The only way I was able to do this was by manipulating the DB directly and deleting part of the value in the t_Package record "locked by: username".
After that I had to steal and release the locks in VC.
Now I was able to Check-out from another computer.

The only problem was that on the first station from where I did the original Check-out, it is still checked out and I cannot "Undo check out" as the SVN repository is unlocked. So I am stuck there too.
Not a very pretty situation.

I have to give my customer a solution for this, and it won't be pretty.


I guess I'll have my programmer write a script that does all this, but it won't be simple.

[original message]

Bellekens@localhost Geert Bellekens

unread,
May 11, 2014, 8:51:00 PM5/11/14
to sparx-enterprise-archite...@googlegroups.com
It actually is pretty simple.
I've written an unlock function in C# that does following

Code:
       /// <summary>
       /// unlocks this element
       /// </summary>
       public override void unLock()
       {
           if (this.isLocked() && !this.isReadOnly())
           {
               this.wrappedElement.ReleaseUserLock();
           }
           //EA doesn't want to release user locks from other users, so we do it directly in the database
           string SQLDeleteLock = @"delete from t_seclocks where EntityID = '" + this.getGUID() + "'";
           ((EAModel)this.model).getWrappedModel().Execute(SQLDeleteLock);

       }

So if it is locked by the current user then we ask the API to release the user lock.
If not I just delete the entry in t_seclocks.

Geert

[original message]

shimon

unread,
May 12, 2014, 10:16:00 AM5/12/14
to sparx-enterprise-archite...@googlegroups.com
I'm quite sure that when using Version Control, the variable that is checked is "locked by: username" in the t_Package table.
We do have a script to release locks made by EA where the regular Project -> Security -> manage locks don't show the locks.

In the case of Version Control it doesn't work.

[original message]

qwerty

unread,
May 12, 2014, 1:57:00 PM5/12/14
to sparx-enterprise-archite...@googlegroups.com
You actually need to release the lock in the VC with a native VC command. Once you have done that you can run the VC / Sync inside EA. The VC locks are not kept inside EA but the VC provider.

q.

[original message]

shimon

unread,
May 13, 2014, 11:45:00 AM5/13/14
to sparx-enterprise-archite...@googlegroups.com

6C6A786F69641D0 wrote:
You actually need to release the lock in the VC with a native VC command. Once you have done that you can run the VC / Sync inside EA. The VC locks are not kept inside EA but the VC provider.

q.



This is true only if the same user locked the EA unit from another location. If another user "Checked out" the package, the lock is registered in EA in addition to in VC.
I mentioned before where the lock is held.

[original message]

Ortmann@localhost Helmut Ortmann

unread,
May 13, 2014, 3:24:00 PM5/13/14
to sparx-enterprise-archite...@googlegroups.com
As far as only VC is concerned you can solve this by an Addin.

I was sick of jumping between EA and my VC tool (svn). Therefore I wrote an Addin for svn. Now I have all information on my finger tip in EA. To update the EA information of a checked out package is, with the right knowhow, easy. It works also for private repositories.

Working with EA und VC has some nasty issues like:
- Change *.xml file of a versioned controlled package
- Get the user of a checked out package (private repository)
- Get the VC information from the VC Service Provider
- Where are my *.xml files after reorgnisation of my package structure?

Write a change request for some simple functions:
- Rename/Move *.xml file
- Update package flags for checked out packages (privat repositories)
 (the existing function don't properly do the job)
- Show Log of *.xml file (the history)
- Show repository entry of *.xml file
- Show Folder of *.xml file
- With the VCC interface it shouldn't been to complicated

I'have done it for svn.


Helmut






[original message]

shimon

unread,
May 25, 2014, 4:15:06 AM5/25/14
to sparx-enterprise-archite...@googlegroups.com
Did you post this addin anywhere?
Would you mind sharing it? We ARE using SVN.


[original message]
Reply all
Reply to author
Forward
0 new messages