Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Jun 2018 02:50:12 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 229325] develop/statsvn dose work on FreeBSD-11-stable
Message-ID:  <bug-229325-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D229325

            Bug ID: 229325
           Summary: develop/statsvn dose work on FreeBSD-11-stable
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: Individual Port(s)
          Assignee: ports-bugs@FreeBSD.org
          Reporter: kensaku.masuda@gmail.com

Created attachment 194618
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D194618&action=
=3Dedit
Patch for SvnStartupUtils.java

StatSVN say

    "Subversion binary is incorrect version. Found: 1.10.0, required: 1.3.0
Updating"

And do nothing.
So, statsvn compare version information with corrupted method.
Collect method is ....

--- src/net/sf/statsvn/util/SvnStartupUtils.java.orig   2018-06-25
10:35:11.895337000 +0900
+++ src/net/sf/statsvn/util/SvnStartupUtils.java        2018-06-25
11:00:44.722623000 +0900
@@ -26,6 +26,9 @@
        private static final String SVN_VERSION_LINE_PATTERN =3D ".*
[0-9]+\\.[0-9]+\\.[0-9]+.*";

        private static final String SVN_VERSION_PATTERN =3D
"[0-9]+\\.[0-9]+\\.[0-9]+";
+       private static final int SVN_MINIMUM_MAJOR_VERSION =3D 1;
+       private static final int SVN_MINIMUM_MINOR_VERSION =3D 3;
+       private static final int SVN_MINIMUM_REVISION_VERSION =3D 0;


     protected ISvnProcessor processor;
@@ -62,7 +65,10 @@
                                                final String versionString =
=3D
line.substring(m.start(), m.end());

                                                // we perform a simple stri=
ng
comparison against the version numbers
-                                               if
(versionString.compareTo(SVN_MINIMUM_VERSION) >=3D 0) {
+                                               final int[] version =3D
parseVersionNumber(versionString);
+                                               if (version[0] >=3D
SVN_MINIMUM_MAJOR_VERSION &&
+                                                   version[1] >=3D
SVN_MINIMUM_MINOR_VERSION &&
+                                                   version[2] >=3D
SVN_MINIMUM_REVISION_VERSION) {
                                                        return versionStrin=
g;
// success
                                                } else {
                                                        throw new
SvnVersionMismatchException(versionString, SVN_MINIMUM_VERSION);
@@ -98,4 +104,25 @@
                // we perform a simple string comparison against the version
numbers
                return version.compareTo(SVN_MINIMUM_VERSION_DIFF_PER_REV) =
>=3D
0;
        }
+
+       /**
+        * Get integer version array from version string.
+        * @param versionString
+        * @return
+        *      triple of version number=20
+        * @exception SvnVersionMismatchException
+        **/
+       static int[] parseVersionNumber(final String versionString) throws
SvnVersionMismatchException {
+               final String[] versionNumberStrings =3D
versionString.split("\\.");
+
+               if(versionNumberStrings.length =3D=3D 3) {
+                       int[] version =3D new int[3];
+                       for(int i =3D 0 ; i < 3 ; i++) {
+                               version[i] =3D
Integer.parseInt(versionNumberStrings[i], 10);
+                       }
+                       return version;
+               } else {
+                       throw new SvnVersionMismatchException(versionString,
SVN_MINIMUM_VERSION);
+               }
+       }
 }

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-229325-7788>