From: bert hubert Date: Sun, 17 Apr 2016 17:44:31 +0000 (+0200) Subject: prettyfi the pdnsutil edit-zone diff output by grouping changed names together X-Git-Tag: dnsdist-1.0.0~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3c6ad4e2960a4cfd7112206783e8e761c86d99ac;p=thirdparty%2Fpdns.git prettyfi the pdnsutil edit-zone diff output by grouping changed names together --- diff --git a/pdns/pdnsutil.cc b/pdns/pdnsutil.cc index 2521a3e64e..bd123d28c2 100644 --- a/pdns/pdnsutil.cc +++ b/pdns/pdnsutil.cc @@ -1034,19 +1034,25 @@ int editZone(DNSSECKeeper& dk, const DNSName &zone) { cout<<"Detected the following changes:\n"< diff; - set> changed; + map, string> changed; set_difference(pre.cbegin(), pre.cend(), post.cbegin(), post.cend(), back_inserter(diff)); for(const auto& d : diff) { - changed.insert({d.d_name,d.d_type}); - cout<<'-'<< d.d_name <<" "<getZoneRepresentation(true)<getZoneRepresentation(true)<getZoneRepresentation(true)<getZoneRepresentation(true)< vrr; - for(const DNSRecord& rr : grouped[c]) { + for(const DNSRecord& rr : grouped[c.first]) { DNSResourceRecord drr(rr); drr.domain_id = di.id; vrr.push_back(drr); } - di.backend->replaceRRSet(di.id, c.first, QType(c.second), vrr); + di.backend->replaceRRSet(di.id, c.first.first, QType(c.first.second), vrr); } rectifyZone(dk, zone); return EXIT_SUCCESS;