BOOL conflict;
Config *mergeInto = self[cfg.name];
for (id key in cfg.entries) {
- if (mergeInto.entries[key]) {
+ if (mergeInto.entries[key]
+ && ![mergeInto.entries[key] isEqual:cfg.entries[key]]) {
conflict = YES;
break;
}
return nil;
}
+- (BOOL)isEqual:(id)object {
+ return [object isKindOfClass:Target.class]
+ && [[self serialize] isEqual:[object serialize]];
+}
+
+- (NSUInteger)hash {
+ return [[self serialize] hash];
+}
+
+ (Target *)targetDeserialize:(NSDictionary *)serialization
withConfigs:(NSArray *)configs {
// Don't crash loading old configs (but don't load them either).