Login | Register
My pages Projects Community openCollabNet

Discussions > issues > [Issue 1403] New - WcVersion mixes up version numbers

subclipse
Discussion topic

There will be a brief maintenance window every Friday at 17:00 Pacific.
For further details, see CollabNet's maintenance and upgrade policy.

Back to topic list

[Issue 1403] New - WcVersion mixes up version numbers

Author johndoe0413
Full name John Doe
Date 2012-04-12 16:56:34 PDT
Message http://subclipse.tig​ris.org/issues/show_​bug.cgi?id=1403
                 Issue #|1403
                 Summary|WcVersion mixes up version numbers
               Component|svnant
                 Version|unspecified
                Platform|All
              OS/Version|All
                     URL|
                  Status|NEW
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|DEFECT
                Priority|P3
            Subcomponent|svnant
             Assigned to|issues@subclipse
             Reported by|johndoe0413






------- Additional comments from johndoe0413 at tigris dot org Thu Apr 12 16:56:33 -0700 2012 -------
Hello,

Min version calculation initial value should be fixed in WcVersion.java. The current implementation (checked
out on the date of bug submission) always keeps min version at 0.
Also the wrong version number item is used for calculating the revision range.

Please, consider changing the code according to e.g. the following diff to keep it in sync with svnversion's
output:

202c202
< protected long minRevision = 0;
---
> protected long minRevision = Long.MAX_VALUE;
248,256c248,258
< SVNRevision.Number rev = status.getLastChange​dRevision();
< long revNum = (rev != null) ? rev.getNumber() : 0;
< if( revNum > this.maxRevision ) {
< this.maxRevision = revNum;
< }
<
< if( revNum < this.minRevision ) {
< this.minRevision = revNum;
< }
---
> SVNRevision.Number rev = status.getRevision();
> if (rev != null) {
> long revNum = rev.getNumber();
> if( revNum > this.maxRevision ) {
> this.maxRevision = revNum;
> }
>
> if( revNum < this.minRevision ) {
> this.minRevision = revNum;
> }
> }
266c268,271
< if( (this.minRevision > 0) && (this.minRevision != this.maxRevision) ) {
---
> if (this.minRevision > this.maxRevision) {
> this.minRevision = this.maxRevision;
> }
> else if( (this.minRevision > 0) && (this.minRevision != this.maxRevision) ) {

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

[Issue 1403] New - WcVersion mixes up version numbers johndoe0413 John Doe 2012-04-12 16:56:34 PDT
Messages per page: