You need to log in before you can comment on or make changes to this bug.
Product Version: NetBeans IDE 6.0 Beta 2 (Build 200710181000) Java: 1.6.0_03; Java HotSpot(TM) Client VM 1.6.0_03-b05 System: Windows XP version 5.1 running on x86; Cp1252; en_GB (nb) Userdir: D:\ide\60beta\user Mercurial plugin = 1.4.0.42.1 Steps: 1. Clone project and open it. 2. Add/Commit some files in to the original repository. 3. Select the cloned project and invoke "Mercurial | Pull from" action. 4. Confirm dialog. Files are added - (anyway they are locally modified - is it ok) 5. Select such a file and invoke "Mercurial | Show Annotations" actions. SOOBE is thrown. SEVERE [org.openide.util.RequestProcessor] java.lang.StringIndexOutOfBoundsException: String index out of range: -76 at java.lang.String.substring(String.java:1938) at org.netbeans.modules.mercurial.ui.annotate.AnnotateAction.toAnnotateLines(AnnotateAction.java:254) at org.netbeans.modules.mercurial.ui.annotate.AnnotateAction.computeAnnotations(AnnotateAction.java:168) at org.netbeans.modules.mercurial.ui.annotate.AnnotateAction.access$000(AnnotateAction.java:76) at org.netbeans.modules.mercurial.ui.annotate.AnnotateAction$1.perform(AnnotateAction.java:144) at org.netbeans.modules.mercurial.HgProgressSupport.performIntern(HgProgressSupport.java:96) at org.netbeans.modules.mercurial.HgProgressSupport.run(HgProgressSupport.java:89) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561) [catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986)
I am confused by Step 4 here. What files are Locally Modified? This sounds wrong. Can you supply what is output in the Mercurial tab and the contents of the messages.log file with -J-Dorg.netbeans.modules.mercurial.level=100 added to netbeans_default_options in etc/netbeans.conf
Step 4. - there was a dialog whether I'd want to update the sources. Currently I am switched to "VSS" support (VCS generics so mercurial plugin is disabled, unfortunately user dir has been deleted) Later I will try to reproduce it and attach all required information.
Created an attachment (id=51293) [details] messages.log
Steps: 1. Create new project. (Project) 2. Select it and invoke "Versioning | Mercurial | Init" action on it. 3. Create a clone of it. (Project_clone) 4. (Project) - create new package and JFrame in it and commit changes. 5. (Project_clone) - select the project root and invoke "Pull from default" action. Confirm "Merge after Pull" dialog - "Yes". "Project_clone" - shows also the new JFrame - it's locally modified. Invoking "Mercurial | Show Annotations" action leads to SIOOBE.
Created an attachment (id=51427) [details] proposed patch
Tnis patch is for a different issue.
I have looked at the message log and I see you creating a new project. However, before the project is created I see evidence that the project is in the cache. is this possible? Did you previously have a project of that name? At what point did you invoke Status and on what project? I see evidence that it was open when you created the project. From the message log I see that you did a initial commit before doing the clone. I also see that the creation of the new package (a) and new file (NewClass.java) happened in the cloned project. I then see a push from the cloned project to the original project. I then see another new package (b) and a new file NewInterface.java being added to the cloned project. Then a new package (c) and new files NewJPanel.java and NewJPanel.form are added to the original project. Then pull from original project. We get two heads and the file in package c in cloned project is listed as Locally Modified. When I attempt to annotate it I get the SOOBE.
The problem is that the hg annotate call fails with "No such file" error because the file being annotated is not in the revision being used by default for hg annotate. We do not catch the error which explains why we get the SIOOBE. I think that the solution is to catch the error and in that case, find the latest revision which contains the file and annotate that.
> before the project is created I see evidence that the project is in the cache. is this possible? yes, you are right. > At what point did you invoke Status and on what project? I've invoked it on project's root node. I could happen that it was invoked for the closed project but then I've run "Status" on the opened one when I wanted to see current status.
Created an attachment (id=51504) [details] proposed patch
bash-3.00$ cat output IDE:------------------------------------------------- IDE: [10/23/07 3:49 PM] Committing "HgCommand.java" started Checking in HgCommand.java; /shared/data/ccvs/repository/versioncontrol/mercurial/src/org/netbeans/modules/mercurial/util/HgCommand.java,v <-- HgCommand.java new revision: 1.48; previous revision: 1.47 done IDE: [10/23/07 3:49 PM] Committing "HgCommand.java" finished
Verified.