You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "neilcsmith-net (via GitHub)" <gi...@apache.org> on 2023/10/11 16:34:57 UTC
[PR] Limit auto-import to recent versions [netbeans]
neilcsmith-net opened a new pull request, #6559:
URL: https://github.com/apache/netbeans/pull/6559
Address #6135 by limiting auto-upgrade importing of settings to latest 3 versions. Does not stop manual importing of settings from earlier versions.
Have tested this ignores 8.2 and 13, but suggests more recent.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [PR] Limit auto-import to recent versions [netbeans]
Posted by "neilcsmith-net (via GitHub)" <gi...@apache.org>.
neilcsmith-net merged PR #6559:
URL: https://github.com/apache/netbeans/pull/6559
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [PR] Limit auto-import to recent versions [netbeans]
Posted by "neilcsmith-net (via GitHub)" <gi...@apache.org>.
neilcsmith-net commented on PR #6559:
URL: https://github.com/apache/netbeans/pull/6559#issuecomment-1762781231
Thanks @ebarboni On web better if we could static archive and permalink the old versions, as well as limit the number of previous versions shown in the top bar.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [PR] Limit auto-import to recent versions [netbeans]
Posted by "neilcsmith-net (via GitHub)" <gi...@apache.org>.
neilcsmith-net commented on code in PR #6559:
URL: https://github.com/apache/netbeans/pull/6559#discussion_r1356651455
##########
nb/o.n.upgrader/src/org/netbeans/upgrade/AutoUpgrade.java:
##########
@@ -91,21 +85,11 @@ private static void upgradeBuildProperties(final File sourceFolder, final String
userdir, regexForSelection);
}
- // the order of VERSION_TO_CHECK here defines the precedence of imports
- // the first one will be choosen for import
- private static final List<String> VERSION_TO_CHECK =
- Arrays.asList ( ".netbeans/7.1.2", ".netbeans/7.1.1", ".netbeans/7.1", ".netbeans/7.0", ".netbeans/6.9" );//NOI18N
-
- // userdir on OS specific root of userdir (see issue 196075)
- static final List<String> PRE_APACHE_NEWER_VERSION_TO_CHECK =
- Arrays.asList ("8.2", "8.1", "8.0.2", "8.0.1", "8.0", "7.4", "7.3.1", "7.3", "7.2.1", "7.2"); //NOI18N
- // XXX: copy to autoupgrade.pluginimporter
-
static final Comparator<String> APACHE_VERSION_COMPARATOR = (v1, v2) -> new SpecificationVersion(v1).compareTo(new SpecificationVersion(v2));
static final List<String> APACHE_VERSION_TO_CHECK = Arrays.asList(NbBundle.getMessage(AutoUpgrade.class, "apachenetbeanspreviousversion").split(",")).stream().sorted(APACHE_VERSION_COMPARATOR.reversed()).collect(Collectors.toList());
- static final List<String> NEWER_VERSION_TO_CHECK = Stream.concat(APACHE_VERSION_TO_CHECK.stream(), PRE_APACHE_NEWER_VERSION_TO_CHECK.stream()).collect(Collectors.toList());
+ static final List<String> NEWER_VERSION_TO_CHECK = APACHE_VERSION_TO_CHECK.stream().collect(Collectors.toList());
Review Comment:
Doh! :laughing: Not quite sure how that passed me by at the time ...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [PR] Limit auto-import to recent versions [netbeans]
Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on code in PR #6559:
URL: https://github.com/apache/netbeans/pull/6559#discussion_r1356048625
##########
nb/o.n.upgrader/src/org/netbeans/upgrade/AutoUpgrade.java:
##########
@@ -65,10 +63,6 @@ public static void main (String[] args) throws Exception {
// try new place
File sourceFolder = checkPreviousOnOsSpecificPlace (NEWER_VERSION_TO_CHECK);
- if (sourceFolder == null) {
- // try former place
- sourceFolder = checkPrevious (VERSION_TO_CHECK);
Review Comment:
i think `checkPrevious` is now no longer used and can be removed, same with `upgradeBuildProperties`, `doNonStandardUpgrade`, potentially more
##########
nb/o.n.upgrader/src/org/netbeans/upgrade/AutoUpgrade.java:
##########
@@ -91,21 +85,11 @@ private static void upgradeBuildProperties(final File sourceFolder, final String
userdir, regexForSelection);
}
- // the order of VERSION_TO_CHECK here defines the precedence of imports
- // the first one will be choosen for import
- private static final List<String> VERSION_TO_CHECK =
- Arrays.asList ( ".netbeans/7.1.2", ".netbeans/7.1.1", ".netbeans/7.1", ".netbeans/7.0", ".netbeans/6.9" );//NOI18N
-
- // userdir on OS specific root of userdir (see issue 196075)
- static final List<String> PRE_APACHE_NEWER_VERSION_TO_CHECK =
- Arrays.asList ("8.2", "8.1", "8.0.2", "8.0.1", "8.0", "7.4", "7.3.1", "7.3", "7.2.1", "7.2"); //NOI18N
- // XXX: copy to autoupgrade.pluginimporter
-
static final Comparator<String> APACHE_VERSION_COMPARATOR = (v1, v2) -> new SpecificationVersion(v1).compareTo(new SpecificationVersion(v2));
static final List<String> APACHE_VERSION_TO_CHECK = Arrays.asList(NbBundle.getMessage(AutoUpgrade.class, "apachenetbeanspreviousversion").split(",")).stream().sorted(APACHE_VERSION_COMPARATOR.reversed()).collect(Collectors.toList());
- static final List<String> NEWER_VERSION_TO_CHECK = Stream.concat(APACHE_VERSION_TO_CHECK.stream(), PRE_APACHE_NEWER_VERSION_TO_CHECK.stream()).collect(Collectors.toList());
+ static final List<String> NEWER_VERSION_TO_CHECK = APACHE_VERSION_TO_CHECK.stream().collect(Collectors.toList());
Review Comment:
`APACHE_VERSION_TO_CHECK` can be used now instead, `NEWER_VERSION_TO_CHECK` is just a copy at this point
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [PR] Limit auto-import to recent versions [netbeans]
Posted by "neilcsmith-net (via GitHub)" <gi...@apache.org>.
neilcsmith-net commented on code in PR #6559:
URL: https://github.com/apache/netbeans/pull/6559#discussion_r1356647963
##########
nb/o.n.upgrader/src/org/netbeans/upgrade/AutoUpgrade.java:
##########
@@ -65,10 +63,6 @@ public static void main (String[] args) throws Exception {
// try new place
File sourceFolder = checkPreviousOnOsSpecificPlace (NEWER_VERSION_TO_CHECK);
- if (sourceFolder == null) {
- // try former place
- sourceFolder = checkPrevious (VERSION_TO_CHECK);
Review Comment:
True! Done heavier cleanup, and resolved a couple of other issues that were hinted - try-with-resources (missing close on exception) and new Integer.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists