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 26614 - Versioning explorer doesn't work if file revision doesn't contain a "."
Summary: Versioning explorer doesn't work if file revision doesn't contain a "."
Status: CLOSED FIXED
Alias: None
Product: obsolete
Classification: Unclassified
Component: vcscore (show other bugs)
Version: 3.x
Hardware: All All
: P3 blocker (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-08-19 15:59 UTC by lingram
Modified: 2003-07-01 12:56 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Patch file generated by cvs diff (1.14 KB, patch)
2002-09-23 18:56 UTC, lingram
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description lingram 2002-08-19 15:59:58 UTC
Some VCS implementations, (VSS, CMS for OpenVMS, etc.) do
not use a ".n" format revision number. That is, revision
numbers are positive integers only.

When writing a RevisionListGetter class for a generic VCS
module, it is necessary to add a ".0" to the revision if
the VCS only uses integers. If this is not done, the
Versioning Explorer does not work properly (expanding a 
node has no effect).

Having a ".0" following all revisions in the Versioning
Explorer causes confusion for users of that VCS and doesn't
look very good.
Comment 1 Martin Entlicher 2002-09-02 15:51:08 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".
Comment 2 Jiri Kovalsky 2002-09-16 11:13:35 UTC
Verified as won't fix.
Comment 3 lingram 2002-09-19 23:31:26 UTC
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.
Comment 4 Martin Entlicher 2002-09-20 09:45:16 UTC
Yes, you're right! Thanks for catching this.
Comment 5 lingram 2002-09-23 18:56:08 UTC
Created attachment 7479 [details]
Patch file generated by cvs diff
Comment 6 Martin Entlicher 2002-11-08 14:26:04 UTC
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
Comment 7 Jiri Kovalsky 2002-11-14 10:29:51 UTC
Are you Larry satisfied with the fix ? If your patch was integrated as
you desired, please verify the issue. Thanks !
Comment 8 Jiri Kovalsky 2002-11-15 08:00:16 UTC
Okay, Larry is probably silently satisfied. Verifying in
development build #200211150100 of NetBeans 4.0 instead of him.
Comment 9 lingram 2002-11-15 14:00:29 UTC
Sorry guys, yes verified.
Comment 10 Jaroslav Tulach 2002-12-03 09:54:51 UTC
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.
Comment 11 lingram 2002-12-03 14:44:13 UTC
I'll provide an updated patch.
Comment 12 Martin Entlicher 2002-12-03 15:12:32 UTC
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...)
Comment 13 lingram 2002-12-03 15:38:32 UTC
Ok, thanks.
Comment 14 Martin Entlicher 2002-12-05 13:25:11 UTC
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
Comment 15 Quality Engineering 2003-07-01 12:56:39 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.