From d402afd7e50e00ff8ff75cd9cdca1dbb427e8d4f Mon Sep 17 00:00:00 2001 From: GRMrGecko Date: Wed, 9 Oct 2013 10:56:58 -0500 Subject: [PATCH] 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. --- Classes/MGMController.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Classes/MGMController.m b/Classes/MGMController.m index a3c7622..672a00f 100644 --- a/Classes/MGMController.m +++ b/Classes/MGMController.m @@ -157,6 +157,7 @@ NSString * const MGMUBCancel = @"Cancel"; handler = [MGMURLBasicHandler handlerWithRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]] delegate:self]; [handler setFailWithError:@selector(revisions:didFailWithError:)]; [handler setFinish:@selector(revisionsFinished:)]; + [statusField setStringValue:@"Loading Revisions"]; [connectionManager addHandler:handler]; } @@ -267,6 +268,8 @@ NSString * const MGMUBCancel = @"Cancel"; NSArray *parsed = [[[prefix objectAtIndex:0] stringValue] componentsSeparatedByString:@"/"]; if ([parsed count]<2) continue; + if ([[parsed objectAtIndex:1] length]>=40) + continue; [revisionsArray addObject:[parsed objectAtIndex:1]]; } NSArray *nextMarkers = [rootElement elementsForName:@"NextMarker"]; @@ -291,6 +294,7 @@ NSString * const MGMUBCancel = @"Cancel"; [items release]; [revisionsArray release]; revisionsArray = nil; + [statusField setStringValue:@""]; [self channelSelect:self]; } }