More robust parsing of SVN client version
Review Request #7182 — Created April 7, 2015 and submitted
A user of SlikSvn reported an error when parsing the svn client version string. For SlikSvn the version string is of the form: 1.6.1-SlikSvn-tag-1.6.1 which is more complicated than the version string produced by other svn clients where the format is: 1.6.1 String parsing is updated to extract exactly the first three numbers in the version string. If less than three numbers are present, which is an unlikely occurrence based on historical SVN version numbers (https://subversion.apache.org/docs/release-notes/release-history.html) then a warning is logged and a default version number of 0.0.0 is assumed.
1) Tested with simple version string produced by stock subversion client in CentOS 7.x. 2) Stepped through code and manually tested with more complicated SlikSvn version string. 3) Ran unit tests.
Description | From | Last Updated |
---|---|---|
This should have a leading underscore. |
brennie | |
This code is getting a bit messy. Can we perhaps add a constant on the class that specifically captures the … |
brennie | |
Blank line between these. (I know there's stuff violating this right above, but that can be fixed later.) |
brennie | |
Use double quotes here for the inner string. |
brennie | |
Col: 48 E231 missing whitespace after ',' |
reviewbot | |
Col: 50 E231 missing whitespace after ',' |
reviewbot |
- Description:
-
A user of SlikSvn reported an error when parsing the svn client
version string. For SlikSvn the version string is of the form: 1.6.1-SlikSvn-tag-1.6.1 which is more complicated than the version string produced by other svn clients where the format is: 1.6.1 ~ String parsing is updated to extract the first three decimal
~ components of the version string. ~ String parsing is updated to extract exactly the first three
~ numbers in the version string. If less than three numbers are + present, which is an unlikely occurrence based on historical + SVN version numbers (https://subversion.apache.org/docs/release-notes/release-history.html) + then a warning is logged and a default version number of + 0.0.0 is assumed. - Commit:
-
29fe8218f11de2b44f65709b57e7296fe32431a2ac34cc4792d1db99c6763eaa70adf197a54e76e5
- Diff:
-
Revision 2 (+12 -2)
- Change Summary:
-
Fix Review Bot issues.
- Commit:
-
ac34cc4792d1db99c6763eaa70adf197a54e76e5ab73882d1fddda656c1a34e55bb810e4bf08662d
- Diff:
-
Revision 3 (+12 -2)
-
Tool: Pyflakes Processed Files: rbtools/clients/svn.py Tool: PEP8 Style Checker Processed Files: rbtools/clients/svn.py
- Change Summary:
-
Address issues from Barret's review.
- Commit:
-
ab73882d1fddda656c1a34e55bb810e4bf08662ddbd0aacff2ebf20b75cd64f2efb5e21f49c25567
- Diff:
-
Revision 4 (+13 -2)