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.
Summary: | Versioning explorer doesn't work if file revision doesn't contain a "." | ||
---|---|---|---|
Product: | obsolete | Reporter: | lingram <lingram> |
Component: | vcscore | Assignee: | Martin Entlicher <mentlicher> |
Status: | CLOSED FIXED | ||
Severity: | blocker | CC: | mgarrison, mihmax |
Priority: | P3 | ||
Version: | 3.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: | Patch file generated by cvs diff |
Description
lingram
2002-08-19 15:59:58 UTC
Well, you have two choices to solve this. (1) All VCS implementations use classes org.netbeans.modules.vcscore.versioning.impl.NumDotRevisionItem and org.netbeans.modules.vcscore.versioning.impl.NumDotRevisionList in their RevisionListGetter implementations. These classes are implementations of org.netbeans.modules.vcscore.versioning.RevisionItem and org.netbeans.modules.vcscore.versioning.RevisionList which are suited to revision numbers with a dot. If you need support for revision numbers in a different form, write your own implementations of RevisionItem and RevisionList. (2) The RevisionItem class has setRevisionVCS() method. This can be different from the revision passed in the constructor. This approach is used by org.netbeans.modules.vcs.profiles.vss.commands.VssRevisionListGetter. You can make item = new NumDotRevisionItem("1.0"); and then item.setRevisionVCS("1"). Then the revision will show up as "1". Verified as won't fix. I'm sorry to have to reopen this, but I believe that there is an error in VcsVersioningSystem.displayRevisions() which prevents the proposed fixes from working. VSS in NB as it works today displays revisions as "1.0", "2.0", etc. despite setting revisionVCS to "1", "2", etc. According to (2) above, this is not the proper behavior. displayRevisions() uses the following to create the string that is displayed for each revision: if (isShowMessages()) { String messageString = item.getMessage(); if (messageString != null) { item.setDisplayName(item.getRevision() + " " + cutMessageString(messageString)); //NOI18N } } else { if (item.getMessage() != null) { item.setDisplayName(item.getRevision()); } I believe that both instances of item.getRevision() should be changed to item.getRevisionVCS() in order to work in the intended fashion. Yes, you're right! Thanks for catching this. Created attachment 7479 [details]
Patch file generated by cvs diff
Thanks for the description and patch. Fixed in the main trunk. /cvs/vcscore/src/org/netbeans/modules/vcscore/VcsVersioningSystem.java,v <-- VcsVersioningSystem.java new revision: 1.32; previous revision: 1.31 Are you Larry satisfied with the fix ? If your patch was integrated as you desired, please verify the issue. Thanks ! Okay, Larry is probably silently satisfied. Verifying in development build #200211150100 of NetBeans 4.0 instead of him. Sorry guys, yes verified. Hi. This issue is marked as 3.4.1_CANDIDATE. It means that it should be integrated into release341 one branch. The plan at http://www.netbeans.org/devhome/docs/releases/34/index.html expected beta1 to be produced on Dec01. That did not happen due to a lot of outstanding not integrated candidates like this one. Would it be possible to spend few minutes by backporting this fix? Thank you in advance. I'll provide an updated patch. Larry, it's not necessary. I'll merge the fix into 3.4.1 as soon as I have a time to do it (hopefully today in the evening...) Ok, thanks. Merged into 3.4.1 builds. /cvs/vcscore/src/org/netbeans/modules/vcscore/VcsVersioningSystem.java,v <-- VcsVersioningSystem.java new revision: 1.28.18.1; previous revision: 1.28 Resolved for 3.4.x or earlier, no new info since then -> closing. |