Commits

Jens Alfke committed a62138f

Fixed bug #1: "release config doesn't build. Warnings are treated as errors and there is a warning about an uninitialized variable being used." This was an actual crashing bug, ick.

  • Participants
  • Parent commits efb726d

Comments (0)

Files changed (1)

File Source/HgRepository.m

 {
     // Run "hg parents" to get current revision number:
     NSError *error;
-    HgRevision *curRev;
     int curRevNo, curParent2;
     if( ! [self _getParent1: &curRevNo parent2: &curParent2] )
         return NO;
         if( unc )
             [_revisions addObject: _uncommittedRevision];
         
-        curRev = [_revisions objectAtIndex: curRevNo];
-        _uncommittedRevision.parent = curRev;
+        _currentRevision = [_revisions objectAtIndex: curRevNo];
+        _uncommittedRevision.parent = _currentRevision;
         _uncommittedRevision.parent2 = curParent2>=0 ?[_revisions objectAtIndex: curParent2] :nil;
                 
-        _currentRevision = curRev;
         [self didChangeValueForKey: @"revisions"];
         [self _checkWorkingTree: &error];
         return YES;
         // A different revision is current!
         [self willChangeValueForKey: @"revisions"];
         _currentRevision = [_revisions objectAtIndex: curRevNo];
-        _uncommittedRevision.parent = curRev;
+        _uncommittedRevision.parent = _currentRevision;
         _uncommittedRevision.parent2 = curParent2>=0 ?[_revisions objectAtIndex: curParent2] :nil;
         [self didChangeValueForKey: @"revisions"];
         [self _checkWorkingTree: &error];