This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 216110 - clearcase uncheckout fails
Summary: clearcase uncheckout fails
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Filesystems (show other bugs)
Version: 7.2
Hardware: PC Windows 7
: P1 normal with 2 votes (vote)
Assignee: Jaroslav Tulach
URL:
Keywords:
: 216170 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-07-29 23:12 UTC by davti
Modified: 2012-09-07 13:06 UTC (History)
7 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
screenshot of file being automatically cehcked out post uncheckout (171.82 KB, image/png)
2012-07-29 23:12 UTC, davti
Details
test demonstrating the issue (1.86 KB, patch)
2012-07-31 10:35 UTC, Tomas Stupka
Details | Diff
possible fix (2.74 KB, patch)
2012-07-31 10:36 UTC, Tomas Stupka
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description davti 2012-07-29 23:12:51 UTC
Created attachment 122507 [details]
screenshot of file being automatically cehcked out post uncheckout

under 7.2 uncheckout fails for non .java files.

when trying to uncheckout a .jsp file the I get the following

==[IDE]== 30/07/2012 8:51:59 AM Preparing for Undoing Checkout...


==[IDE]== 30/07/2012 8:51:59 AM Preparing for Undoing Checkout... finished.


==[IDE]== 30/07/2012 8:51:59 AM Undoing Checkout...


---------------------------------------------------
Private version of "BestSellersTile.jsp" saved in "BestSellersTile.jsp.keep".
Loading "java\tesco_mobile\konakart\konakart_war\src\main\webapp\WEB-INF\jsp\BestSellersTile.jsp" (2607 bytes).
cleartool: Warning: This uncheckout left only version zero on branch "\main\tesco\tesco_7.10".
Checkout cancelled for "BestSellersTile.jsp".
---------------------------------------------------

==[IDE]== 30/07/2012 8:52:00 AM Undoing Checkout... finished.

the files are then automatically checked out again after this process has been completed (see attached screenshot).

Using the native clearcase tools outsode the ide does undoo the checkout, but as soon as the project is reopened in Netbeans 7.2 the selected files are imediatly checked out again.

This behavour is making the 7.2 version unusable in out workplace, and as the 7.1.2 version does not exibit this behavour we have reverted back to using it. 

and from teh IDE log.

INFO [org.netbeans.modules.clearcase]
org.netbeans.modules.clearcase.ClearcaseException: Clearcase Command Failure: "uncheckout -rm BestSellersTile.jsp AccountCreatedBody.jsp CartTile.jsp CatalogCheckoutConfirmationBody.jsp AlsoPurchasedBody.jsp"
cleartool: Warning: This uncheckout left only version zero on branch "\main\tesco\tesco_7.10".
	at org.netbeans.modules.clearcase.client.ClearcaseClient$CommandRunnable.handleCommandError(ClearcaseClient.java:279)
	at org.netbeans.modules.clearcase.client.ClearcaseClient$CommandRunnable.run(ClearcaseClient.java:245)
	at org.netbeans.modules.clearcase.client.ClearcaseClient.execImpl(ClearcaseClient.java:168)
	at org.netbeans.modules.clearcase.client.ClearcaseClient.access$000(ClearcaseClient.java:77)
	at org.netbeans.modules.clearcase.client.ClearcaseClient$1.perform(ClearcaseClient.java:124)
	at org.netbeans.modules.clearcase.util.ProgressSupport.run(ProgressSupport.java:142)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1452)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2032)


2. JSP files are being checkedout without modification, just by selecting them in the project tree view.

please contact me if any further info is required.
Comment 1 davti 2012-07-29 23:19:43 UTC
this appears to be .jsp files only.
Comment 2 Tomas Stupka 2012-07-30 10:52:16 UTC
could reproduce - just by selecting a jsp file in the projects view beforeEdit was is invoked in clearcase, which invokes the checkout.

the contract between VCS modules and filesystems is that on FileObject.lock() VCS expects that a file is going to be changed => hence the checkout is triggered. (or another equivalent action in case the particular VCS typically keeps files r/o)

the call comes from FastOpenInfoParser.getJspOpenInfo() -> fo.isLocked() -> fo.lock() -> ClearCaseInterceptor.beforeEdit()

a possible workaround could be:
options  > misc > versioning > clearcase > Disable on demand checkouts. 

unfortunately, that will also disable automatic checkout in case of refactoring
Comment 3 Martin Fousek 2012-07-30 12:26:14 UTC
> the call comes from FastOpenInfoParser.getJspOpenInfo() -> fo.isLocked() ->
> fo.lock() -> ClearCaseInterceptor.beforeEdit()

Theoretically the "fo.isLocked()" check in the JSP could be removed here but at least from my point of view different implementation of "isLocked()" makes better sense to me.
Comment 4 Tomas Stupka 2012-07-31 09:36:11 UTC
*** Bug 216170 has been marked as a duplicate of this bug. ***
Comment 5 Tomas Stupka 2012-07-31 10:33:45 UTC
> Theoretically the "fo.isLocked()" check in the JSP could be removed here but at
> least from my point of view different implementation of "isLocked()" makes
> better sense to me.
agree with Martin. The optimal fix would be that filesystems would not trigger beforeEdit in case that the locked state is only checked. 

please evaluate
Comment 6 Tomas Stupka 2012-07-31 10:35:31 UTC
Created attachment 122568 [details]
test demonstrating the issue
Comment 7 Tomas Stupka 2012-07-31 10:36:26 UTC
Created attachment 122569 [details]
possible fix

possible fix (suggested by Radek)
Comment 8 Tomas Stupka 2012-07-31 10:38:18 UTC
btw - after applying the patch with the test run FileVCSTest in versioning.masterfs
Comment 9 Martin Fousek 2012-07-31 14:02:48 UTC
For sure it requires evaluation from Jarda.
Just FYI, the possible fix looks good to me.
Comment 10 davti 2012-08-09 03:06:42 UTC
fantastic turn around!!!!

couple of things, this issue occurs if you open a a project with jsp files! the files are all checked out automatically.

second thing, when will the fix be available?

thanks, 

Tim
Comment 11 Jaroslav Tulach 2012-08-10 13:18:55 UTC
core-main#0183315b7f03
Comment 12 Martin Fousek 2012-08-10 15:00:18 UTC
(In reply to comment #10)
> second thing, when will the fix be available?

According to the severity and the issue whiteboard it should be in patch1 of NetBeans 7.2.
Comment 13 Quality Engineering 2012-08-11 02:37:45 UTC
Integrated into 'main-golden', will be available in build *201208110001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/0183315b7f03
User: Jaroslav Tulach <jtulach@netbeans.org>
Log: #216110: isLocked should not try to lock the file
Comment 14 Tomas Danek 2012-08-28 11:53:09 UTC
Tim, can you please download dev build (link is in comment above) and try if issue is fixed? We would like to integrate fix to 7.2 patch1, but we need to be sure that fix really works. Deadline for this is friday 08/31. 
Thanks in advance

(In reply to comment #10)
> fantastic turn around!!!!
> 
> couple of things, this issue occurs if you open a a project with jsp files! the
> files are all checked out automatically.
> 
> second thing, when will the fix be available?
> 
> thanks, 
> 
> Tim
Comment 15 mouse256 2012-08-28 14:29:55 UTC
Just verified on latest developer build.
The issue is solved for me. (I basically checked the issue reported in 216170, which was marked as a duplicate of this)
Comment 16 Tomas Danek 2012-08-30 14:14:09 UTC
Marking verified, as confirmed by two reporters. Thanks.
Jardo, please proceed with backport. (http://wiki.netbeans.org/NetBeansPatchesProcess)
Comment 17 davti 2012-08-31 01:51:30 UTC
Apologies, is on my to do list this morning, have been using the nightly build an fix is good.

Tim Davenport
Comment 18 Jaroslav Tulach 2012-08-31 17:01:53 UTC
Merged as 0bcbf3be6ebe
Comment 19 Quality Engineering 2012-09-01 11:08:54 UTC
Integrated into 'releases', will be available in build *201209010822* or newer. Wait for official and publicly available build.
Changeset: http://hg.netbeans.org/releases/rev/0183315b7f03
User: Jaroslav Tulach <jtulach@netbeans.org>
Log: #216110: isLocked should not try to lock the file
Comment 20 Tomas Danek 2012-09-07 13:06:13 UTC
org.netbeans.modules.versioning.spi.VCSInterceptorTest passes in releases72