Changeset 13517 in josm for trunk/scripts


Ignore:
Timestamp:
2018-03-11T22:26:23+01:00 (6 years ago)
Author:
stoecker
Message:

don't issue error for http/https switches in JOSM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/scripts/SyncEditorLayerIndex.groovy

    r13511 r13517  
    332332    }
    333333
    334     List inOneButNotTheOther(Map m1, Map m2) {
     334    List inOneButNotTheOther(Map m1, Map m2, String code, String https) {
    335335        def l = []
    336336        for (def url : m1.keySet()) {
    337337            if (!m2.containsKey(url)) {
    338                 def name = getName(m1.get(url))
    339                 l += "  "+getDescription(m1.get(url))
     338                String urlhttps = url.replace("http:","https:")
     339                if(!https || !m2.containsKey(urlhttps))
     340                {
     341                    def name = getName(m1.get(url))
     342                    l += code+"  "+getDescription(m1.get(url))
     343                }
     344                else
     345                {
     346                    l += https+" Missing https: "+getDescription(m1.get(url))
     347                }
    340348            }
    341349        }
     
    344352
    345353    void checkInOneButNotTheOther() {
    346         def l1 = inOneButNotTheOther(eliUrls, josmUrls)
     354        def l1 = inOneButNotTheOther(eliUrls, josmUrls, "-", "+")
    347355        myprintln "*** URLs found in ELI but not in JOSM (${l1.size()}): ***"
    348356        if (!l1.isEmpty()) {
    349357            for (def l : l1) {
    350                 myprintln "-" + l
    351             }
    352         }
    353 
    354         def l2 = inOneButNotTheOther(josmUrls, eliUrls)
     358                myprintln l
     359            }
     360        }
     361
     362        def l2 = inOneButNotTheOther(josmUrls, eliUrls, "+", "")
    355363        myprintln "*** URLs found in JOSM but not in ELI (${l2.size()}): ***"
    356364        if (!l2.isEmpty()) {
    357365            for (def l : l2) {
    358                 myprintln "+" + l
     366                myprintln l
    359367            }
    360368        }
Note: See TracChangeset for help on using the changeset viewer.