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 88304 - AssertionError in Search History.
Summary: AssertionError in Search History.
Status: VERIFIED FIXED
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: Subversion (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@versioncontrol
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-31 08:50 UTC by Peter Pis
Modified: 2007-02-06 13:04 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Local svn "entries" file. (654 bytes, text/plain)
2006-10-31 16:34 UTC, oneway
Details
.svn directory (note this is from Subversion 1.4) (12.40 KB, application/x-compressed)
2006-11-29 03:47 UTC, _ gtzabari
Details
stack-trace (1020 bytes, text/plain)
2006-11-29 03:48 UTC, _ gtzabari
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Pis 2006-10-31 08:50:46 UTC
NB5.5 (Build 200610171010)

Taken from NBUSERS mailing list:

Steps:
1) Start NB, select File | Open Project, select the project's directory:
"/home/luser/work/project". Note that the "project" is a subdirectory of
"work".
2) Open /home/luser/wor/k/project/package/SomeClass.java in the editor
3) Select from the menu "Subversion | Search History"
4) NB shows the list of changes
5) Clicking on any Diff from the list results in the following exception
6) It appears that NB is looking in the "wor/k/" directory instead of "work".

java.lang.AssertionError: Unable to get repository:
 /home/luser/wor/k/project/package/SomeClass.java is probably unmanaged.
 	at org.netbeans.modules.subversion.Subversion.getClient(Subversion.java:221)
 	at org.netbeans.modules.subversion.Subversion.getClient(Subversion.java:216)
 	at
org.netbeans.modules.subversion.VersionsCache.getFileRevision(VersionsCache.java:88)
 	at

org.netbeans.modules.subversion.ui.diff.DiffStreamSource.init(DiffStreamSource.java:125)
Comment 1 Peter Pis 2006-10-31 08:57:25 UTC
Could you please attach to this issue ".svn" folder from the same location as
"SomeClass.java" is located. And it would be really helpful if you could provide
absolute path on your system to that class file.
Comment 2 oneway 2006-10-31 15:25:10 UTC
Step 2 should read:
2) Open /home/luser/work/project/package/SomeClass.java in the editor
Comment 3 oneway 2006-10-31 15:55:23 UTC
The absolute path to the local dir looks something like:
/home/luser/work/rc/src/test/com/testco/rc/load

# svn --version
svn, version 1.4.0 (r21228)
   compiled Oct 11 2006, 16:48:37

Copyright (C) 2000-2006 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/
This product includes software developed by CollabNet (http://www.Collab.Net/).

The following repository access (RA) modules are available:

* ra_dav : Module for accessing a repository via WebDAV (DeltaV) protocol.
  - handles 'http' scheme
  - handles 'https' scheme
* ra_svn : Module for accessing a repository using the svn network protocol.
  - handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
  - handles 'file' scheme

>Log Session: Monday, October 30, 2006 3:16:02 PM EST
>System Info: 
  Product Version         = NetBeans IDE 5.5 (Build 200610171010)
  Operating System        = Linux version 2.6.17-2-686 running on i386
  Java; VM; Vendor; Home  = 1.5.0_05; Java HotSpot(TM) Client VM 1.5.0_05-b05;
Sun Microsystems Inc.; /opt/sun/jdk1.5.0_05/jre
  System Locale; Encoding = en_US (nb); ISO-8859-1
  Home Dir.; Current Dir. = /home/luser; /home/luser

The local .svn dir I can't really send, it contains the source files, etc. I
will, however, provide you with whatever info you need that may be helpful. The
local .svn dir does NOT contain any references to "wor/k", so NB must be getting
it from some other place. So, what place is it?
Comment 4 Peter Pis 2006-10-31 16:21:30 UTC
I see, could you please attach "entries" file from proper ".svn" folder? It
shouldn't contain any sensitive data. Anyway, have you encountered this behavior
for other files from your sources? Thanks.
Comment 5 oneway 2006-10-31 16:34:45 UTC
Created attachment 35677 [details]
Local svn "entries" file.
Comment 6 oneway 2006-10-31 16:38:32 UTC
I doubt it has anything to do with that particular dir for which I send the
"entries" file. I can repeat the problem for files from other dirs. The problem
seems to be affecting the whole local svn repository, that is, the
"/home/luser/work" directory (NOT "/home/luser/wor/k", as NB mistakenly believes).
Comment 7 Maros Sandor 2006-11-06 15:27:52 UTC
It is hard to tell what went wrong. I can send you a patched module with extra
logging, would you willing to run it?
Comment 8 oneway 2006-11-06 16:46:29 UTC
If there is no other way around it, I should be able to do it.

But maybe I could delete some configuration files and then try to setup the
project again? That would be preferable. Where does NB get that
"/home/luser/wor/k" directory from? That's where the problem is, I think.
Comment 9 Maros Sandor 2006-11-06 17:19:49 UTC
I wish I knew that. Of course you can try to play around with it a bit, maybe
you cound find a way to pinpoint the problem, especially if you find some files
which work and some which do not.
Comment 10 oneway 2006-11-07 00:00:19 UTC
OK, I tried it, I can't come up with a winning configuration. It appears NB
mucks up the repository URLs somewhere.

If you wish, you can attach a JAR (or whatever) with enhanced logging to the
case, I'll see what I can do with it.
Comment 11 oneway 2006-11-08 18:51:07 UTC
Hopeless. Svn plug-in is written by morons.
Comment 12 Maros Sandor 2006-11-08 19:12:48 UTC
You are not authorized to resolve issues. Remove yourself from cc if you are no
longer willing to cooperate.
Comment 13 _ gtzabari 2006-11-29 03:46:12 UTC
Hi,

I just ran into this problem with dev build 200611281900 by simply opening up a
Java file in the editor. I'll attach my stack-trace and .svn directory now.
Please let me know if there is any other information you need from me.

Thank you,
Gili
Comment 14 _ gtzabari 2006-11-29 03:47:42 UTC
Created attachment 36344 [details]
.svn directory (note this is from Subversion 1.4)
Comment 15 _ gtzabari 2006-11-29 03:48:02 UTC
Created attachment 36345 [details]
stack-trace
Comment 16 _ gtzabari 2006-11-29 03:48:54 UTC
The full path to the file that triggered the error for me is "C:\Documents and
Settings\Gili\My
Documents\blueeye\trunk\ninelives\Peer\source\ninelives\peer\config\CreateKeys.java"
Comment 17 _ gtzabari 2006-11-29 04:03:03 UTC
I'm upgrading the priority to P1 because this exception occurs every time I type
a character in the editor, making Netbeans unusable. If you disagree, feel free
to lower the priority again.
Comment 18 Peter Pis 2006-11-29 08:32:47 UTC
Gtzabari, IMHO this seems to be a different issue. Investigating...
Comment 19 Tomas Stupka 2007-01-04 16:29:28 UTC
as much as i can see, the problem reported by gtzabari is a different issue

please open a new issue if you are still able to reproduce it in the dev build

setting priority back
Comment 20 Tomas Stupka 2007-01-05 14:37:01 UTC
gtzabari; it looks like your problem was the same as in #91865
Comment 21 oneway 2007-01-30 23:22:09 UTC
I have some time until the end of this week to help with this issue. 

As far as I can tell, the issue is still present in NetBeans IDE 5.5.1 (Build
200701240600) and NetBeans IDE 6.0 Dev (Build 200701201900)
Comment 22 Peter Pis 2007-01-31 07:46:30 UTC
Cloud you please try to do following: close NetBeans, delete the content of
"svncache" folder (located in Netbeans "<user_dir>/var/cache/svncache") and
start NetBeans again? 
Comment 23 oneway 2007-01-31 12:13:37 UTC
> delete the content of "svncache" folder and start NetBeans again

That doesn't help. However, the issue appears to be dependent on how a project
is checked out. Steps to reproduce (tested with NetBeans IDE 6.0 Dev (Build
200701201900))

1) Versioning | Checkout

2) Subversion repository

   Repository URL: svn://tstsrv/var/lib/svn

3) Folders to checkout
   3.1-error) Repository Folders: trunk/testprj
   3.2-works) Repository Folders: trunk/
   Local folder /home/luser/work

3) Finish


If I checkout just "testprj" project (see 3.1-error), then I get the error.
The "testprj" project will checked out locally in /home/luser/work/testprj dir,
just as I want it.


If I checkout the whole trunk (see 3.2-works), then the error appears to go
away. Obviously, I do not want to checkout ALL projects in the trunk, for
there's a bunch of projects in the trunk that I have nothing to do with.
Additionally, all projects will be checked out into the /home/luser/work/trunk
directory, instead of /home/luser/work.
Comment 24 Peter Pis 2007-01-31 19:01:34 UTC
I have just tried similar scenarios on windows platform and it works fine. I
will try on *nix too. Anyway, have you encountered this problem also for other
subversion actions? Thanks.
Comment 25 oneway 2007-02-01 00:45:21 UTC
Other subversion actions seem to work, the problem appears to be only with
"Subversion | Search History" and then clicking on one of the Diffs.

$ uname -a
Linux tstsrv 2.6.18-3-686 #1 SMP Mon Dec 4 16:41:14 UTC 2006 i686 GNU/Linux
Comment 26 oneway 2007-02-01 09:59:19 UTC
It also appears that the issue depends on the name of the checkout directory.
The checkout directory name of "work" or "wrk" results in the error, in my
setup. However, if the checkout directory name is "wor" or "asdfgh" then the
issue appears to go away.

It's my impression that in case of "Subversion | Search History" NB does some
erroneous manipulations on the repository and/or local file path that result in
the error, that is, if the checkout directory is  "work", then NB mistakenly
believes that the file is
    /home/luser/wor/k/project/package/SomeClass.java
instead of
    /home/luser/work/project/package/SomeClass.java

See details above. Hope that helps.
Comment 27 Tomas Stupka 2007-02-01 10:21:37 UTC
now i could reproduce 

on linux checking out from 
file:///someurl/trunk/project
into 
/home/someuser/work

thanks a lot for your time and investigation
Comment 28 oneway 2007-02-01 23:40:40 UTC
So how long do you think it'll take to fix it? I like my work folder being named
"work".
Comment 29 Tomas Stupka 2007-02-02 08:50:53 UTC
i agree, "work" sounds good

we should at least commit a hotfix in the next days

there is an error in the logic which tries to match the host url given by the
svn log - trunk/project - with the relevant local folder - /home/someuser/work.
we need to do this to e.g. diff the files.

without going deeper into ugly details - the problem is in the overlap between
"trunk" and "work"
trun(k)
 wor(k)

as a workaround for you should, in the meantime, help to checkout into a folder
which _doesn't end_ with the same letters as "trunk" does "k", "nk", ... 
    /home/luser/work1
    /home/luser/work/src
    ... 

Comment 30 Tomas Stupka 2007-02-02 15:21:08 UTC
fixed 

feel free to reopen if there still should be a problem

thanks again

Checking in SearchExecutor.java;
/cvs/subversion/main/src/org/netbeans/modules/subversion/ui/history/SearchExecutor.java,v
 <--  SearchExecutor.java
new revision: 1.12; previous revision: 1.11





Comment 31 Peter Pis 2007-02-05 10:28:04 UTC
Verified in 
NetBeans IDE Dev (Build 200702041900)
1.5.0_11; Java HotSpot(TM) Client VM 1.5.0_11-b03
Windows XP version 5.1 running on x86
en_GB (nb); Cp1252

oneway, could you please verify it too? Thanks.
Comment 32 oneway 2007-02-06 04:15:40 UTC
The exception appears to have been resolved, thanks.

However, I don't think the "Search History" logic works properly though.

Suppose, there's a file "Test.java". "Versioning | Search "Test.java" History"
shows the list of commits in which "Test.java" participated. So, obviously I
want to see how "Test.java" was changed from one revision to another. Selecting
"Test.java" from the list and clicking on "Diff" for some arbitrary revision
does not do that. It appears NB always shows diff for the first file in the
commit. Not exactly what I want. Or am I doing something wrong?
Comment 33 Peter Pis 2007-02-06 09:19:03 UTC
In "Diff" section of "Search History" component there are revision numbers
listed that meet the searching criteria. Expanding the revision numbers you can
select two desired "Test.java" file in particular revision. Then there should be
displayed diff between these revisions. (Select one desired file revision then
hold "Ctrl" and select another file revision in specific revision - it works for
single selection or if there are 2 revisions of the same file selected.)
Comment 34 oneway 2007-02-06 11:18:45 UTC
When I click on "Versioning | Search "Test.java" History" I expect that one way
or another I'll be able to browse through the history of changes for "Test.java". 

> Expanding the revision numbers you can select two desired "Test.java" file in 
> particular revision.

It doesn't work. Suppose that revision 3 has committed 4 files. So, I see
something like the following in the "Summary" tab:

3 luser <some date here>
<Comment message for revision 3 commit>                 [Diff] [Revert]
A.java
B.java
C.txt
Test.java

2 luser <some date here>
<Comment message for revision 2 commit>                 [Diff] [Revert]
D.java
Test.java
Z.java

Selecting "Test.java" from the list above and then clicking on the respective
[Diff] will not get me the diff between 2 revisions of "Test.java". Instead, NB
appears to always show the diff for the first file in the list, in this case,
that will be "A.java". Clicking on the [Diff]  for revision 2 will get you the
diff for "D.java".

The "Diff" tab has the same problem as the "Summary" tab.

Note: I should not even have to select/click on Test.java, for I already
requested The history for "Test.java" to begin with.
Comment 35 Peter Pis 2007-02-06 12:30:08 UTC
AssertionError has been fixed, and recently discussed topic about Diffing
doesn't belong to this issue. So if you feel strongly about your suggestion
please file a new issue for this.
Comment 36 Tomas Stupka 2007-02-06 13:04:33 UTC
there is already an issue suggesting a search history redesign #91815

so i will put the diff "problem" on record there