Removed hash revisions

There was an issue where I was sorting by the revision and hashes were sorted after causing the latest revision to be incorrect. Due to the complexity of grabbing the build date beforehand to sort by date, I have decided to just ignore hash revisions. This may cause some newer revisions to not show, but I think it's better than having to go one by one on all the revisions to grab their information.
This commit is contained in:
GRMrGecko 2013-10-09 10:56:58 -05:00
parent 28e9c7a3a5
commit d402afd7e5

View File

@ -157,6 +157,7 @@ NSString * const MGMUBCancel = @"Cancel";
handler = [MGMURLBasicHandler handlerWithRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]] delegate:self]; handler = [MGMURLBasicHandler handlerWithRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]] delegate:self];
[handler setFailWithError:@selector(revisions:didFailWithError:)]; [handler setFailWithError:@selector(revisions:didFailWithError:)];
[handler setFinish:@selector(revisionsFinished:)]; [handler setFinish:@selector(revisionsFinished:)];
[statusField setStringValue:@"Loading Revisions"];
[connectionManager addHandler:handler]; [connectionManager addHandler:handler];
} }
@ -267,6 +268,8 @@ NSString * const MGMUBCancel = @"Cancel";
NSArray *parsed = [[[prefix objectAtIndex:0] stringValue] componentsSeparatedByString:@"/"]; NSArray *parsed = [[[prefix objectAtIndex:0] stringValue] componentsSeparatedByString:@"/"];
if ([parsed count]<2) if ([parsed count]<2)
continue; continue;
if ([[parsed objectAtIndex:1] length]>=40)
continue;
[revisionsArray addObject:[parsed objectAtIndex:1]]; [revisionsArray addObject:[parsed objectAtIndex:1]];
} }
NSArray *nextMarkers = [rootElement elementsForName:@"NextMarker"]; NSArray *nextMarkers = [rootElement elementsForName:@"NextMarker"];
@ -291,6 +294,7 @@ NSString * const MGMUBCancel = @"Cancel";
[items release]; [items release];
[revisionsArray release]; [revisionsArray release];
revisionsArray = nil; revisionsArray = nil;
[statusField setStringValue:@""];
[self channelSelect:self]; [self channelSelect:self];
} }
} }