Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Is there a way to detect locked file automatically?

Hi,

Please give a suggestion about following thing about source control.

One user locked a file.
Then, in order for other users to detect that the file is locked, the users have to do either of the following things.

1, Lock another file.
2, Unload and load the repository workspace.

Or there is also this way.
Right click Stream -> Show -> Locks
then, the list of locked files shows up.


But I think it's more useful locked files are detected after refreshing the project.
Is there a way to make it possible?

0 votes



6 answers

Permanent link
If you are going to use locking for certain files, or certain file
types, then the expected way of working is for someone who wants to
modify that file, or a file of that type, to always request a lock
before modifying that file. The lock will fail if someone already is
working on that file in that stream (because they will have already
locked the file).

Is there a reason you are not using that approach?

Cheers,
Geoff

On 9/14/2011 7:53 AM, rice wrote:
Hi,

Please give a suggestion about following thing about source control.

One user locked a file.
Then, in order for other users to detect that the file is locked, the
users have to do either of the following things.

1, Lock another file.
2, Unload and load the repository workspace.

Or there is also this way.
Right click Stream -> Show -> Locks
then, the list of locked files shows up.


But I think it's more useful locked files are detected after
refreshing the project.
Is there a way to make it possible?

0 votes


Permanent link
If you are going to use locking for certain files, or certain file
types, then the expected way of working is for someone who wants to
modify that file, or a file of that type, to always request a lock
before modifying that file. The lock will fail if someone already is
working on that file in that stream (because they will have already
locked the file).

Is there a reason you are not using that approach?

Cheers,
Geoff

On 9/14/2011 7:53 AM, rice wrote:
Hi,

Please give a suggestion about following thing about source control.

One user locked a file.
Then, in order for other users to detect that the file is locked, the
users have to do either of the following things.

1, Lock another file.
2, Unload and load the repository workspace.

Or there is also this way.
Right click Stream -> Show -> Locks
then, the list of locked files shows up.


But I think it's more useful locked files are detected after
refreshing the project.
Is there a way to make it possible?


Hi Geoff,

Thank you for your answer :)
Yes, it's one approach.

The reason why I posted this question was we expected it should work same as other source control tool such as Subversion.

If it's not possible, we will consider your suggestion :)


Thanks

0 votes


Permanent link
Hi:

Just hit "Refresh" in the Pending Changes view - this will ensure you see the latest incoming changes and the latest information about the files locked in the streams you are delivering to in the Pending Changes view.

Note if you do other operations such as check-in, accept, deliver, lock, the pending changes view will automatically refresh the corresponding workspaces and streams, thus automatically detect the new lock and incoming changes. You don't have to unload and reload to detect new locks. If so, please open a bug report, something weird would be happening that we want to figure out...

HTH
Christophe Cornu

0 votes


Permanent link
Hi:

Just hit "Refresh" in the Pending Changes view - this will ensure you see the latest incoming changes and the latest information about the files locked in the streams you are delivering to in the Pending Changes view.

Note if you do other operations such as check-in, accept, deliver, lock, the pending changes view will automatically refresh the corresponding workspaces and streams, thus automatically detect the new lock and incoming changes. You don't have to unload and reload to detect new locks. If so, please open a bug report, something weird would be happening that we want to figure out...

HTH
Christophe Cornu


Thank you for you answer.
Now I may understand.

In order to detect locked files, it is needed to access a stream.

With only refresh a project(eclipse project), locked files are not detected as the operation doesn't access a stream.

Am I rignt?

0 votes


Permanent link
That is correct. A "refresh" on the Project/Package explorer just
rereads the file system, to see if files have changed on disk without
Eclipse having been notified. On the Pending Changes view, you have
options on the "refresh" to either look at the file system, look at the
SCM repository (where the locks are stored), or both.

Cheers,
Geoff

On 9/15/2011 9:53 AM, rice wrote:
chrisxwrote:
Hi:

Just hit "Refresh" in the Pending Changes view - this will
ensure you see the latest incoming changes and the latest information
about the files locked in the streams you are delivering to in the
Pending Changes view.

Note if you do other operations such as check-in, accept, deliver,
lock, the pending changes view will automatically refresh the
corresponding workspaces and streams, thus automatically detect the
new lock and incoming changes. You don't have to unload and reload to
detect new locks. If so, please open a bug report, something weird
would be happening that we want to figure out...

HTH
Christophe Cornu

Thank you for you answer.
Now I may understand.

In order to detect locked files, it is needed to access a stream.

With only refresh a project(eclipse project), locked files are not
detected as the operation doesn't access a stream.

Am I rignt?

0 votes


Permanent link
That is correct. A "refresh" on the Project/Package explorer just
rereads the file system, to see if files have changed on disk without
Eclipse having been notified. On the Pending Changes view, you have
options on the "refresh" to either look at the file system, look at the
SCM repository (where the locks are stored), or both.

Cheers,
Geoff

On 9/15/2011 9:53 AM, rice wrote:
chrisxwrote:
Hi:

Just hit "Refresh" in the Pending Changes view - this will
ensure you see the latest incoming changes and the latest information
about the files locked in the streams you are delivering to in the
Pending Changes view.

Note if you do other operations such as check-in, accept, deliver,
lock, the pending changes view will automatically refresh the
corresponding workspaces and streams, thus automatically detect the
new lock and incoming changes. You don't have to unload and reload to
detect new locks. If so, please open a bug report, something weird
would be happening that we want to figure out...

HTH
Christophe Cornu

Thank you for you answer.
Now I may understand.

In order to detect locked files, it is needed to access a stream.

With only refresh a project(eclipse project), locked files are not
detected as the operation doesn't access a stream.

Am I rignt?


Thank you very much for your advice :)

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Sep 14 '11, 5:09 a.m.

Question was seen: 4,883 times

Last updated: Sep 14 '11, 5:09 a.m.

Confirmation Cancel Confirm