Commits

Jens Alfke committed fefc3fa

Ignore unparseable URLs in hgrc instead of throwing an exception. Fixes #141.

  • Participants
  • Parent commits 9e61b6d

Comments (0)

Files changed (1)

File Source/HgConfigFile.m

     NSEnumerator* urlStrings = [values objectEnumerator];
     NSString* urlString;
     while( ( urlString = [urlStrings nextObject] ) ) {
-    [urls addObject: [NSURL URLWithString: urlString]];
+        NSURL *url = [NSURL URLWithString: urlString];
+        if (url)
+            [urls addObject: url];
+        else
+            Warn(@"Couldn't parse URL <%@> in hgrc", urlString);
     }
     return [urls autorelease];
 }