Commits

Brandon Sneed  committed 76d6e8f

Fixed add/remove validation.

  • Participants
  • Parent commits 725b654

Comments (0)

Files changed (1)

File Source/RepoController_Actions.m

     } else if( action==@selector(showDiff:) ) {
         HgRevision *revOld,*revNew;
         return [self getSelectedRevisionsOld: &revOld andNew: &revNew];
-    } else if( action==@selector(addToRepository:) ) {
+    } else if( action==@selector(addRemove:) ) {
+		return self.selectedRevision.isUncommitted && ([self anySelectedFilesHaveStatus:kNotTracked] || [self anySelectedFilesHaveStatus:kDeleted]);
+	} else if( action==@selector(addToRepository:) ) {
         return self.selectedRevision.isUncommitted && [self anySelectedFilesHaveStatus: kNotTracked];
     } else if( action==@selector(removeFromRepository:) ) {
         return self.selectedRevision.isUncommitted && self.selectedFiles.count > 0;